lime_tbx.business.spectral_integration.spectral_integration module

This module performs spectral integrations over spectral response functions and more data.

It exports the following classes:
  • ISpectralIntegration - Interface that contains the methods of this module.

  • SpectralIntegration - Class that implements the methods exported by this module.

class lime_tbx.business.spectral_integration.spectral_integration.ISpectralIntegration[source]

Bases: ABC

Interface that contains the methods of this module.

It exports the following functions:
  • integrate_elis() - Integrate the irradiances and obtain the signal.

  • u_integrate_elis() - Calculate the uncertainties of the irradiances integration.

abstract integrate_cimel(data: ndarray, wlens: ndarray, cimel_wavs: List[float]) ndarray[source]

Integrate the spectrum of x = wlens and y = data over the CIMEL wavelengths specified in cimel_wavs. Internally it obtains the CIMEL spectral response function.

Parameters:
  • data (np.array of float) – Data that is going to be integrated over the CIMEL bands.

  • wlens (np.array of float) – Wavelengths in nm related to the data.

  • cimel_wavs (np.array of float) – Nominal wavelengths of the chosen CIMEL bands.

Returns:

cimel_integ_data – Data integrated over the CIMEL bands

Return type:

np.array of float

abstract integrate_elis(srf: SpectralResponseFunction, elis_lime: SpectralData) List[float] | List[List[float]][source]

Integrate the irradiances and obtain the signal.

Parameters:
Returns:

integr_data – Integrated signals. List of float if elis_lime.data values are floats, list of list of float if they are lists or ndarrays.

Return type:

list of float or list of list of float

abstract u_integrate_elis(srf: SpectralResponseFunction, elis_lime: SpectralData) List[float] | List[List[float]][source]

Calculate the uncertainties of the irradiances integration.

Parameters:
Returns:

u_integr_data – Uncertainties of the integrated signals. List of float if elis_lime.data values are floats, list of list of float if they are lists or ndarrays.

Return type:

list of float or list of list of float

class lime_tbx.business.spectral_integration.spectral_integration.SpectralIntegration(MCsteps=1000)[source]

Bases: ISpectralIntegration

Class that implements the methods exported by this module

integrate_cimel(data: ndarray, wlens: ndarray, cimel_wavs: List[float]) ndarray[source]

Integrate the spectrum of x = wlens and y = data over the CIMEL wavelengths specified in cimel_wavs. Internally it obtains the CIMEL spectral response function.

Parameters:
  • data (np.array of float) – Data that is going to be integrated over the CIMEL bands.

  • wlens (np.array of float) – Wavelengths in nm related to the data.

  • cimel_wavs (np.array of float) – Nominal wavelengths of the chosen CIMEL bands.

Returns:

cimel_integ_data – Data integrated over the CIMEL bands

Return type:

np.array of float

integrate_elis(srf: SpectralResponseFunction, elis_lime: SpectralData) List[float] | List[List[float]][source]

Integrate the irradiances and obtain the signal.

Parameters:
Returns:

integr_data – Integrated signals. List of float if elis_lime.data values are floats, list of list of float if they are lists or ndarrays.

Return type:

list of float or list of list of float

integrate_elis_xy(channels: List[SRFChannel], data: ndarray, wlens: ndarray) ndarray[source]
Parameters:
  • srf

  • data

  • wlens

Returns:

Return type:

integrate_solar_asd(data: ndarray, wlens: ndarray) ndarray[source]
integrate_solar_interpolated_default(data: ndarray, wlens: ndarray) ndarray[source]
integrate_solar_interpolated_gaussian(data: ndarray, wlens: ndarray) ndarray[source]
integrate_solar_interpolated_triangle(data: ndarray, wlens: ndarray) ndarray[source]
set_srf_interpolated(fwhm, sampling, shape, write=False) SpectralResponseFunction[source]

read asd fwhm and make SRF

u_integrate_elis(srf: SpectralResponseFunction, elis_lime: SpectralData) List[float] | List[List[float]][source]

Calculate the uncertainties of the irradiances integration.

Parameters:
Returns:

u_integr_data – Uncertainties of the integrated signals. List of float if elis_lime.data values are floats, list of list of float if they are lists or ndarrays.

Return type:

list of float or list of list of float

lime_tbx.business.spectral_integration.spectral_integration.get_default_srf()[source]