enpt.io package

Submodules

enpt.io.reader module

Reader module for reading all kinds of EnMAP images.

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

Bases: object

Reader for EnMAP Level-1B products.

Get an instance of L1B_Reader.

Parameters:
  • 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: str = None, n_line_ext: int = None, compute_snr: bool = True) EnMAPL1Product_SensorGeo[source]

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

Parameters:
  • 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)

Returns:

instance of EnMAPL1Product_SensorGeo

validate_input(root_dir_main, root_dir_ext)[source]

Validate user inputs.

validate_output()[source]

Validate outputs of L1B_Reader.

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

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

Parameters:
  • 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]

Returns:

Module contents

EnPT Input / Output module.