enpt.io package


enpt.io.reader module

Reader module for reading all kinds of EnMAP images.

class enpt.io.reader.L1B_Reader(config: EnPTConfig, logger: Optional[Logger] = None, root_dir_main: Optional[str] = None, root_dir_ext: Optional[str] = None, n_line_ext: Optional[int] = None)[source]

Bases: object

Reader for EnMAP Level-1B products.

Get an instance of L1B_Reader.

  • config – instance of EnPTConfig class

  • logger – instance of logging.Logger (NOTE: This logger is only used to log messages within L1B_Reader. It is not appended to the read L1B EnMAP object).

  • root_dir_main – Root directory of EnMAP Level-1B product (the main image)

  • root_dir_ext – Root directory of EnMAP Level-1B product (to extend the main image)

  • n_line_ext – [Optional] add number of line to be added to the main image from the extended image

static _validate_enmap_l1b_rootdir(rootdir_l1b)[source]

Check for valid EnMAP L1B root directory.

read_inputdata(root_dir_main, root_dir_ext: Optional[str] = None, n_line_ext: Optional[int] = None, compute_snr: bool = True) EnMAPL1Product_SensorGeo[source]

Read L1B EnMAP data. Extend the image by adding a second image (entire, partial).

  • root_dir_main – Root directory of the main EnMAP Level-1B product

  • root_dir_ext – Root directory of the extended EnMAP Level-1B product (optional)

  • n_line_ext – Number of lines to be added to the main image (if None, use the whole image)

  • compute_snr – whether to compute SNR or not (default: True)


instance of EnMAPL1Product_SensorGeo

validate_input(root_dir_main, root_dir_ext)[source]

Validate user inputs.


Validate outputs of L1B_Reader.

enpt.io.reader.Solar_Irradiance_reader(path_solar_irr_model: str, resol_nm: Optional[float] = None, wvl_min_nm: Optional[float] = None, wvl_max_nm: Optional[float] = None) ndarray[source]

Read the given solar irradiance file and return an array of irradiances.

  • path_solar_irr_model

    file path to solar irradiance model

    -> must be arranged like that:

    col0 = Wavelength[nm]; col1 = Solar Irradiance [W/m2/µm])

  • resol_nm – spectral resolution for returned irradiances [nanometers]

  • wvl_min_nm – minimum wavelength of returned irradiances [nanometers]

  • wvl_max_nm – maximum wavelength of returned irradiances [nanometers]


Module contents

EnPT Input / Output module.