lime_tbx.presentation.gui.settings module

describe class

class lime_tbx.presentation.gui.settings.ISettingsManager[source]

Bases: ABC

Object that manages the current settings chosen by the user.

abstract get_available_coeffs() List[LimeCoefficients][source]

Obtain a list with all the lime coefficients available

abstract get_available_dolp_spectra_names() List[str][source]

Obtain a list with all the available dolp spectra names

abstract get_available_interp_SRFs() List[str][source]

Obtain a list with all the available spectra names

abstract get_available_spectra_names() List[str][source]

Obtain a list with all the available spectra names

abstract get_available_srfs() List[SpectralResponseFunction][source]

Obtain a list with all the SRFS the user can choose

abstract get_cimel_coef() ReflectanceCoefficients[source]

Obtain the CimelCoef the CIMEL coefficients and uncertainties

abstract get_coef_version_name() str[source]

Gets the current coefficient version of the current simulation. (If the simulation is loaded, it won’t be the same as of the settings)

Returns:

coef_version_name – Coefficients version.

Return type:

str

abstract get_default_srf() SpectralResponseFunction[source]

Obtain the default SRF

abstract static get_intermediate_results_path() str | None[source]

Checks if the user is debugging the intermediate results and checks for the path they want the data to be stored at.

Returns:

Path selected by the user, or None in case that the user is not debugging the intermediate results.

Return type:

str or None

abstract get_lime_coef() LimeCoefficients[source]

Obtain the LimeCoef coefficients and uncertainties

abstract get_polar_coef() PolarisationCoefficients[source]

Obtain the current PolarisationCoefficients chosen by the user.

abstract get_selected_interp_SRF() str[source]

Obtain the currently selected interpolation SRF name

abstract get_selected_polar_spectrum_name() str[source]

Obtain the currently selected polarisation interpolation spectrum name

abstract get_selected_spectrum_name() str[source]

Obtain the currently selected interpolation spectrum name

abstract get_srf() SpectralResponseFunction[source]

Obtain the current Spectral Response Function chosen by the user.

abstract get_use_wehrli_for_esi() bool[source]

Checks if the user/dev settings are set to use the wehrli spectrum as source for the ESI or if the TSIS will be used instead.

Returns:

use_wehrli – Boolean indicating if the Wehrli spectrum will be used or not.

Return type:

bool

abstract is_show_cimel_points() bool[source]

Checks if the UI should show the CIMEL points used for interpolation.

Returns:

should_show – True if the CIMEL points should be shown.

Return type:

bool

abstract is_show_interp_spectrum() bool[source]

Checks if the UI should show the spectrum used for interpolation.

Returns:

should_show – True if the spectrum should be shown.

Return type:

bool

abstract is_skip_uncertainties() bool[source]

Checks if the user settings are set to skip the uncertainties calculation.

Returns:

should_skip – True if the uncertainties calculation should be skipped.

Return type:

bool

abstract load_srf(srf: SpectralResponseFunction) None[source]

Add the srf to the available srf list.

abstract reload_coeffs() None[source]

Reload the cimel coefficients from file to the logic instance

abstract select_interp_SRF(name: str)[source]

Select the interpolation spectrum to use as SRF

abstract select_interp_polar_spectrum(name: str)[source]

Select the polarisation interpolation spectrum to use

abstract select_interp_spectrum(name: str)[source]

Select the interpolation spectrum to use

abstract select_lime_coeff(index: int) None[source]

Select the cimel_coeff from the cimel coefficients list at the given position.

abstract select_srf(index: int) None[source]

Select the srf from the srf list at the given position.

abstract set_coef_version_name(coef_version_name: str)[source]

Sets the current coefficient version of the current simulation status (not of the settings).

Parameters:

coef_version_name (str) – Coefficients version. None if reset.

abstract set_show_cimel_points(show: bool)[source]

Sets the CIMEL points visibility as <show>.

Parameters:

show (bool) – Visibility of the CIMEL points.

abstract set_show_interp_spectrum(show: bool)[source]

Sets the interpolation spectrum visibility as <show>.

Parameters:

show (bool) – Visibility of the interpolation spectrum.

abstract set_skip_uncertainties(skip: bool)[source]

Sets if the uncertainties should be calculated.

Parameters:

skip (bool) – True if the uncertainties should be skipped.

class lime_tbx.presentation.gui.settings.SettingsManager(previous_coeff_name: str | None = None)[source]

Bases: ISettingsManager

get_available_coeffs() List[LimeCoefficients][source]

Obtain a list with all the lime coefficients available

get_available_dolp_spectra_names() List[str][source]

Obtain a list with all the available dolp spectra names

get_available_interp_SRFs() List[str][source]

Obtain a list with all the available spectra names

get_available_spectra_names() List[str][source]

Obtain a list with all the available spectra names

get_available_srfs() List[SpectralResponseFunction][source]

Obtain a list with all the SRFS the user can choose

get_cimel_coef() ReflectanceCoefficients[source]

Obtain the CimelCoef the CIMEL coefficients and uncertainties

get_coef_version_name() str[source]

Gets the current coefficient version of the current simulation. (If the simulation is loaded, it won’t be the same as of the settings)

Returns:

coef_version_name – Coefficients version.

Return type:

str

get_default_srf() SpectralResponseFunction[source]

Obtain the default SRF

static get_intermediate_results_path() str | None[source]

Checks if the user is debugging the intermediate results and checks for the path they want the data to be stored at.

Returns:

Path selected by the user, or None in case that the user is not debugging the intermediate results.

Return type:

str or None

get_lime_coef() LimeCoefficients[source]

Obtain the LimeCoef coefficients and uncertainties

get_polar_coef() PolarisationCoefficients[source]

Obtain the current PolarisationCoefficients chosen by the user.

get_selected_interp_SRF() str[source]

Obtain the currently selected interpolation SRF name

get_selected_polar_spectrum_name() str[source]

Obtain the currently selected polarisation interpolation spectrum name

get_selected_spectrum_name() str[source]

Obtain the currently selected interpolation spectrum name

get_srf() SpectralResponseFunction[source]

Obtain the current Spectral Response Function chosen by the user.

get_use_wehrli_for_esi() bool[source]

Checks if the user/dev settings are set to use the wehrli spectrum as source for the ESI or if the TSIS will be used instead.

Returns:

use_wehrli – Boolean indicating if the Wehrli spectrum will be used or not.

Return type:

bool

is_show_cimel_points() bool[source]

Checks if the UI should show the CIMEL points used for interpolation.

Returns:

should_show – True if the CIMEL points should be shown.

Return type:

bool

is_show_interp_spectrum() bool[source]

Checks if the UI should show the spectrum used for interpolation.

Returns:

should_show – True if the spectrum should be shown.

Return type:

bool

is_skip_uncertainties() bool[source]

Checks if the user settings are set to skip the uncertainties calculation.

Returns:

should_skip – True if the uncertainties calculation should be skipped.

Return type:

bool

load_srf(srf: SpectralResponseFunction)[source]

Add the srf to the available srf list.

reload_coeffs() None[source]

Reload the cimel coefficients from file to the logic instance

select_interp_SRF(name: str)[source]

Select the interpolation spectrum to use as SRF

select_interp_polar_spectrum(name: str)[source]

Select the polarisation interpolation spectrum to use

select_interp_spectrum(name: str)[source]

Select the interpolation spectrum to use

select_lime_coeff(index: int) None[source]

Select the cimel_coeff from the cimel coefficients list at the given position.

select_srf(index: int)[source]

Select the srf from the srf list at the given position.

set_coef_version_name(coef_version_name: str)[source]

Sets the current coefficient version of the current simulation status (not of the settings).

Parameters:

coef_version_name (str) – Coefficients version. None if reset.

set_show_cimel_points(show: bool)[source]

Sets the CIMEL points visibility as <show>.

Parameters:

show (bool) – Visibility of the CIMEL points.

set_show_interp_spectrum(show: bool)[source]

Sets the interpolation spectrum visibility as <show>.

Parameters:

show (bool) – Visibility of the interpolation spectrum.

set_skip_uncertainties(skip: bool)[source]

Sets if the uncertainties should be calculated.

Parameters:

skip (bool) – True if the uncertainties should be skipped.