petitRADTRANS.retrieval.parameter#
Classes#
Parameter |
|
Functions#
|
Re-create a TFP distribution with floating-point parameters cast to the active JAX dtype. |
|
Module Contents#
- petitRADTRANS.retrieval.parameter._cast_distribution_to_jax_dtype(distribution)#
Re-create a TFP distribution with floating-point parameters cast to the active JAX dtype.
- petitRADTRANS.retrieval.parameter._build_jaxns_prior(distribution, name)#
- class petitRADTRANS.retrieval.parameter.Parameter(name, is_free_parameter, value=0.0, distribution=None, transform_prior_cube_coordinate=None, plot_in_corner=False, corner_ranges=None, corner_transform=None, corner_label=None, units=None)#
Parameter This class provides the interface for defining and managing parameters in a retrieval. Each parameter includes a name, which can be used as a reference in the model function, a value, and flag of whether it’s a free parameter, and if it’s free. You can also define a function that translates the unit hypercube into physical space for a pymultinest retrieval, or a tensorflow probability distribution to define the prior for JAX-based retrievals. The remainder of the arguments deal with the corner plots.
- Args:
- namestring
The name of the parameter. Must match the name used in the model function.
- is_free_parameterbool
True if the parameter should be sampled in the retrieval
- valuefloat
The value of the parameter. Set using set_param.
- transform_prior_cube_coordinatemethod
Transform the unit interval [0,1] to the physical space of the parameter.
- plot_in_cornerbool
True if this parameter should be included in the output corner plot
- corner_rangesTuple(float,float)
The axis range of the parameter in the corner plot
- corner_transformmethod
A function to scale or transform the value of the parameter for prettier plotting.
- corner_labelstring
The axis label for the parameter, defaults to name.
- unitsastropy.units.UnitBase, optional
The physical units of the parameter value. Defaults to None, in which case the value is assumed to already be in the units expected by the model function (cgs). If set to an astropy unit, the model functions can use it to convert the value to the units required for the radiative transfer calculation (e.g. cm, g).
- name#
- is_free_parameter#
- value = 0.0#
- distribution#
- prior_sample = None#
- transform_prior_cube_coordinate = None#
- plot_in_corner = False#
- corner_ranges = None#
- corner_transform = None#
- corner_label = None#
- units = None#
- _tree_flatten()#
- classmethod _tree_unflatten(aux_data, children)#
- get_param_uniform(cube)#
- get_flattened_value(value=None)#
- set_param(value)#
- set_prior()#
- class petitRADTRANS.retrieval.parameter.RetrievalParameter(name, prior_parameters, prior_type='uniform', custom_prior=None)#
- __available_priors = ['log', 'uniform', 'gaussian', 'log_gaussian', 'delta', 'custom']#
- name#
- prior_parameters#
- prior_type = 'uniform'#
- prior_function#
- classmethod from_dict(dictionary)#
Convert a dictionary into a list of RetrievalParameter. The keys of the dictionary are the names of the RetrievalParameter. The values of the dictionary must be dictionaries with keys ‘prior_parameters’ and ‘prior_type’.
- Args:
dictionary: a dictionary
- Returns:
A list of RetrievalParameter.
- put_into_dict(dictionary=None)#
Convert a RetrievalParameter into a dictionary.
- Args:
dictionary: a dictionary; if None, a new dictionary is created
- Returns:
A dictionary.