GUIBRUSHR.Retrieval.ModelCalculation.Classes.ParamForModel module

Parameter model class for atmospheric retrieval calculations.

This module contains the ParamForModel class which manages individual parameters used in atmospheric retrieval models, including molecular species parameters, atmospheric properties, and their constraints.

class GUIBRUSHR.Retrieval.ModelCalculation.Classes.ParamForModel.ParamForModel(name, status, scale, constant_vmr, range_min, range_max, is_molec, molec_formula, mass, name_for_list_molec, isotope)[source]

Bases: object

Manages individual parameters for atmospheric retrieval models.

This class handles the storage, validation, and manipulation of individual parameters used in atmospheric retrieval calculations. It supports both fixed and variable parameters, molecular species handling, and boundary checking for retrieval algorithms.

Variables:
  • name – Parameter name

  • status – Whether parameter is variable (True) or fixed (False)

  • scale – Parameter scaling factor

  • constant_vmr – Whether volume mixing ratio is constant

  • range_min – Minimum allowed parameter value

  • range_max – Maximum allowed parameter value

  • isotope – Isotope information

  • is_molec – Whether parameter represents a molecular species

  • molec_formula – Molecular formula if applicable

  • mass – Molecular mass if applicable

  • name_for_list_molec – Name used in molecular species lists

  • starting_value_fixed – Fixed starting value

  • starting_value_fixed_arr – Array of fixed starting values

  • starting_value_variable – Variable starting value

  • starting_value_variable_arr – Array of variable starting values

  • value_in_retrieval – Current value during retrieval

  • value_arr_in_retrieval – Array of values during retrieval

  • sigma_prior – Prior uncertainty

  • sigma_prior_arr – Array of prior uncertainties

__init__(name, status, scale, constant_vmr, range_min, range_max, is_molec, molec_formula, mass, name_for_list_molec, isotope)[source]

Initialize the ParamForModel object.

Parameters:
  • name – Parameter name

  • status – Parameter status (True for variable, False for fixed)

  • scale – Scaling factor for the parameter

  • constant_vmr – Whether volume mixing ratio is constant

  • range_min – Minimum allowed parameter value

  • range_max – Maximum allowed parameter value

  • is_molec – Whether parameter represents a molecular species

  • molec_formula – Molecular formula (if molecular species)

  • mass – Molecular mass (if molecular species)

  • name_for_list_molec – Name for molecular species lists

  • isotope – Isotope information

update_starting_value(value, sigma)[source]

Update the starting value and prior uncertainty for the parameter.

Parameters:
  • value – New starting value

  • sigma – Prior uncertainty (sigma)

get_starting_value()[source]

Get the current starting value based on parameter status.

Returns:

Starting value (variable if status=True, fixed if status=False)

get_starting_value_arr()[source]

Get the starting value array based on parameter status.

Returns:

Starting value array (variable if status=True, fixed if status=False)

append_elem(value, sigma)[source]

Append a value and sigma to the appropriate arrays.

Parameters:
  • value – Value to append

  • sigma – Sigma value to append

get_retrieval_value()[source]

Get the current retrieval value based on parameter status.

Returns:

Retrieval value (variable if status=True, fixed starting value if status=False)

get_retrieval_value_arr()[source]

Get the retrieval value array based on parameter status.

Returns:

Retrieval value array (variable if status=True, fixed starting array if status=False)

boundaries_check()[source]

Check if parameter values are within specified boundaries.

Returns:

True if all values are within boundaries, False otherwise

is_molec_func()[source]

Check if parameter represents a molecular species.

Returns:

True if parameter is a molecular species, False otherwise

molec_and_full_name()[source]

Get molecular formula and full parameter name.

Returns:

Tuple containing (molecular_formula, parameter_name)

is_VMR_costant()[source]

Check if volume mixing ratio is constant.

Returns:

True if VMR is constant, False otherwise

get_mass()[source]

Get the molecular mass.

Returns:

Molecular mass value

get_sigma_prior()[source]

Get the prior uncertainty (sigma) value or array.

Returns:

Sigma array if starting_value_variable is None, single sigma value otherwise