matheo.band_integration.srf_utils#

Functions to read spectral response function data with pyspectral

class matheo.band_integration.srf_utils.SensorSRFUtil(platform_name, sensor_name, detector_name: None | str = 'det-1', band_names: None | List[str] = None)[source]#

Bases: object

Helper class to define repeating functions along a coordinate axis

from pyspectral library.

Parameters:
  • platform_name – satellite name

  • sensor_name – name of instrument on satellite

  • detector_name – (optional) name of sensor detector. Can be used in sensor has SRF data for for different

detectors separately - if not specified in this case different :param band_names: (optional) sensor bands to evaluate band integral for, if omitted band integral evaluated for all bands within spectral range of datar

return_band_centres(min_wl: None | float = None, max_wl: None | float = None) ndarray[source]#

Returns band centres for specified sensor bands

Parameters:
  • min_wl – minimum wavelength to include in range

  • max_wl – maximum wavelength to include in range

Returns:

band centres in nm

return_band_names(band_names: str | None = None, min_wl: None | float = None, max_wl: None | float = None) List[str][source]#

Returns band names for specified sensor bands

Parameters:
  • band_names – if omitted all sensor band names are returned, otherwise submitted band names validated and returned

  • min_wl – minimum wavelength to include in range

  • max_wl – maximum wavelength to include in range

Returns:

band names

return_sensor_band_names() List[str][source]#

Returns list of all sensor band names

Returns:

sensor band names

return_srf(band_name: str) Tuple[ndarray, ndarray][source]#

Returns srf data for specified sensor band

Parameters:

band_name – sensor band name

Returns:

band srf

Returns:

band srf wavelength coordinates

matheo.band_integration.srf_utils.return_band_centres(platform_name: str, sensor_name: str, band_names: None | List[str] = None, detector_name: str | None = None, min_wl: None | float = None, max_wl: None | float = None) ndarray[source]#

Returns band centres for specified sensor from pyspectral library.

Parameters:
  • platform_name – satellite name

  • sensor_name – name of instrument on satellite

  • band_names – name of bands to return band centres of, if omitted all band returned

  • detector_name – name of sensor detector. Can be used in sensor has SRF data for for different

detectors separately - if not specified in this case different :param min_wl: minimum wavelength to include in range :param max_wl: maximum wavelength to include in range

Returns:

band centres in nm

matheo.band_integration.srf_utils.return_band_names(platform_name: str, sensor_name: str, band_names: None | List[str] = None, min_wl: None | float = None, max_wl: None | float = None) List[str][source]#

Returns band names for specified sensor from pyspectral library.

Parameters:
  • platform_name – satellite name

  • sensor_name – name of instrument on satellite

  • band_names – (optional) if omitted all sensor band names are returned, otherwise submitted band names validated and returned

  • min_wl – minimum wavelength to include in range

  • max_wl – maximum wavelength to include in range

Returns:

band names

matheo.band_integration.srf_utils.return_iter_srf(platform_name: str, sensor_name: str, band_names: None | List[str] = None, detector_name: str | None = None) Iterator[source]#

Returns iterable of band srfs for specified sensor from pyspectral library.

Parameters:
  • platform_name – satellite name

  • sensor_name – name of instrument on satellite

  • band_names – name of bands to iterate through, if omitted all bands included

  • detector_name – name of sensor detector. Can be used in sensor has SRF data for for different

detectors separately - if not specified in this case different

Returns:

iterable that returns band srf and srf wavelength coordinates at each iteration

matheo.band_integration.srf_utils.return_srf(platform_name: str, sensor_name: str, band_name: str | None = None, detector_name: str | None = None) Tuple[ndarray, ndarray][source]#

Returns srf data for named band of for specified sensor from pyspectral library.

Parameters:
  • platform_name – satellite name

  • sensor_name – name of instrument on satellite

  • band_name – name of sensor band

  • detector_name – (optional) name of sensor detector. Can be used in sensor has SRF data for for different

detectors separately - if not specified in this case different

Returns:

band srf

Returns:

band srf wavelength coordinates