lime_tbx.business.interpolation.spectral_interpolation.spectral_interpolation module

Module in charge of performing spectral interpolation.

It exports the following classes:
  • ISpectralInterpolation - Interface that contains all the abstract functions

    exported by this module.

  • SpectralInterpolation - Class that implements all the functions exported by

    this module.

class lime_tbx.business.interpolation.spectral_interpolation.spectral_interpolation.ISpectralInterpolation[source]

Bases: ABC

Interface that contains all the abstract functions exported by this module.

It exports the following functions:
  • get_best_interp_reference() - Get the best reflectance interpolation reference

    for the given data for the currently selected interpolation spectrum.

  • get_best_polar_interp_reference() - Get the best polarisation interpolation

    reference for the given data for the currently selected interpolation spectrum.

  • get_interpolated_refl() - Interpolates the cimel values to final_wav using the

    given spectrum data as reference.

  • get_interpolated_refl_unc() - Calculate the uncertainties of the interpolation of

    the cimel_refl values to final_wav using the given interpolation spectrum data as reference.

abstract get_best_interp_reference(moon_data: MoonData) SpectralData[source]

Get the best reflectance interpolation reference for the given data for the currently selected interpolation spectrum.

Parameters:

moon_data (MoonData) – Moon data for which the best interpolation reference will be returned.

Returns:

interp_reference – Best interpolation reference for the given data.

Return type:

SpectralData

abstract get_best_polar_interp_reference(moon_data: MoonData) SpectralData[source]

Get the best polarisation interpolation reference for the given data for the currently selected interpolation spectrum.

Parameters:

moon_data (MoonData) – Moon data for which the best interpolation reference will be returned.

Returns:

interp_reference – Best interpolation reference for the given data.

Return type:

SpectralData

abstract get_interpolated_refl(cimel_wav: ndarray[Any, dtype[float64]], cimel_refl: ndarray[Any, dtype[float64]], asd_wav: ndarray[Any, dtype[float64]], asd_refl: ndarray[Any, dtype[float64]], final_wav: ndarray[Any, dtype[float64]]) ndarray[Any, dtype[float64]][source]

Interpolates the cimel_refl values to final_wav using the given interpolation spectrum data as reference.

Parameters:
  • cimel_wav (np.ndarray of float) – Cimel wavelengths.

  • cimel_ref (np.ndarray of float) – Cimel data values.

  • asd_wav (np.ndarray of float) – Interpolation spectrum wavelengths.

  • asd_refl (np.ndarray of float) – Interpolation spectrum data values.

  • final_wav (np.ndarray of float) – Wavelengths at wich the data will be interpolated.

Returns:

interp_refl – Interpolated data values for the final_wav wavelengths.

Return type:

np.ndarray of float

abstract get_interpolated_refl_unc(cimel_wav: ndarray[Any, dtype[float64]], cimel_refl: ndarray[Any, dtype[float64]], asd_wav: ndarray[Any, dtype[float64]], asd_refl: ndarray[Any, dtype[float64]], final_wav: ndarray[Any, dtype[float64]], u_cimel_refl: ndarray[Any, dtype[float64]], u_asd_refl: ndarray[Any, dtype[float64]], corr_cimel_refl=None, corr_asd_refl=None) ndarray[Any, dtype[float64]][source]

Calculate the uncertainties of the interpolation of the cimel_refl values to final_wav using the given interpolation spectrum data as reference.

Parameters:
  • cimel_wav (np.ndarray of float) – Cimel wavelengths.

  • cimel_ref (np.ndarray of float) – Cimel data values.

  • asd_wav (np.ndarray of float) – Interpolation spectrum wavelengths.

  • asd_refl (np.ndarray of float) – Interpolation spectrum data values.

  • final_wav (np.ndarray of float) – Wavelengths at wich the data would be interpolated.

  • u_cimel_refl (np.ndarray of float) – Uncertainties of the cimel data.

  • u_asd_refl (np.ndarray of float) – Uncertainties of the interpolation spectrum data.

  • corr_cimel_refl (np.ndarray of float) – Error correlation of the cimel data

  • corr_asd_refl (np.ndarray of float) – Error correlation of the interpolation spectrum data

Returns:

interp_refl_unc – Uncertainties of the interpolated data values for the final_wav wavelengths.

Return type:

np.ndarray of float

class lime_tbx.business.interpolation.spectral_interpolation.spectral_interpolation.SpectralInterpolation(MCsteps=100)[source]

Bases: ISpectralInterpolation

Class that implements all the functions exported by this module.

get_best_interp_reference(moon_data: MoonData)[source]

Get the best reflectance interpolation reference for the given data for the currently selected interpolation spectrum.

Parameters:

moon_data (MoonData) – Moon data for which the best interpolation reference will be returned.

Returns:

interp_reference – Best interpolation reference for the given data.

Return type:

SpectralData

get_best_polar_interp_reference(moon_data: MoonData)[source]

Get the best polarisation interpolation reference for the given data for the currently selected interpolation spectrum.

Parameters:

moon_data (MoonData) – Moon data for which the best interpolation reference will be returned.

Returns:

interp_reference – Best interpolation reference for the given data.

Return type:

SpectralData

get_interpolated_refl(cimel_wav: ndarray[Any, dtype[float64]], cimel_refl: ndarray[Any, dtype[float64]], asd_wav: ndarray[Any, dtype[float64]], asd_refl: ndarray[Any, dtype[float64]], final_wav: ndarray[Any, dtype[float64]]) ndarray[Any, dtype[float64]][source]

Interpolates the cimel_refl values to final_wav using the given interpolation spectrum data as reference.

Parameters:
  • cimel_wav (np.ndarray of float) – Cimel wavelengths.

  • cimel_ref (np.ndarray of float) – Cimel data values.

  • asd_wav (np.ndarray of float) – Interpolation spectrum wavelengths.

  • asd_refl (np.ndarray of float) – Interpolation spectrum data values.

  • final_wav (np.ndarray of float) – Wavelengths at wich the data will be interpolated.

Returns:

interp_refl – Interpolated data values for the final_wav wavelengths.

Return type:

np.ndarray of float

get_interpolated_refl_unc(cimel_wav: ndarray[Any, dtype[float64]], cimel_refl: ndarray[Any, dtype[float64]], asd_wav: ndarray[Any, dtype[float64]], asd_refl: ndarray[Any, dtype[float64]], final_wav: ndarray[Any, dtype[float64]], u_cimel_refl: ndarray[Any, dtype[float64]], u_asd_refl: ndarray[Any, dtype[float64]], corr_cimel_refl: ndarray[Any, dtype[float64]] | None = None, corr_asd_refl: ndarray[Any, dtype[float64]] | None = None) ndarray[Any, dtype[float64]][source]

Calculate the uncertainties of the interpolation of the cimel_refl values to final_wav using the given interpolation spectrum data as reference.

Parameters:
  • cimel_wav (np.ndarray of float) – Cimel wavelengths.

  • cimel_ref (np.ndarray of float) – Cimel data values.

  • asd_wav (np.ndarray of float) – Interpolation spectrum wavelengths.

  • asd_refl (np.ndarray of float) – Interpolation spectrum data values.

  • final_wav (np.ndarray of float) – Wavelengths at wich the data would be interpolated.

  • u_cimel_refl (np.ndarray of float) – Uncertainties of the cimel data.

  • u_asd_refl (np.ndarray of float) – Uncertainties of the interpolation spectrum data.

  • corr_cimel_refl (np.ndarray of float) – Error correlation of the cimel data

  • corr_asd_refl (np.ndarray of float) – Error correlation of the interpolation spectrum data

Returns:

interp_refl_unc – Uncertainties of the interpolated data values for the final_wav wavelengths.

Return type:

np.ndarray of float