petitRADTRANS.retrieval.parameter
=================================

.. py:module:: petitRADTRANS.retrieval.parameter


Classes
-------

.. autoapisummary::

   petitRADTRANS.retrieval.parameter.Parameter
   petitRADTRANS.retrieval.parameter.RetrievalParameter


Functions
---------

.. autoapisummary::

   petitRADTRANS.retrieval.parameter._build_jaxns_prior


Module Contents
---------------

.. py:function:: _build_jaxns_prior(distribution, name)

.. py:class:: 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)

   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:
       name : string
           The name of the parameter. Must match the name used in the model function.
       is_free_parameter : bool
           True if the parameter should be sampled in the retrieval
       value : float
           The value of the parameter. Set using set_param.
       transform_prior_cube_coordinate : method
           Transform the unit interval [0,1] to the physical space of the parameter.
       plot_in_corner : bool
           True if this parameter should be included in the output corner plot
       corner_ranges : Tuple(float,float)
           The axis range of the parameter in the corner plot
       corner_transform : method
           A function to scale or transform the value of the parameter for prettier plotting.
       corner_label : string
           The axis label for the parameter, defaults to name.


   .. py:attribute:: name


   .. py:attribute:: is_free_parameter


   .. py:attribute:: value
      :value: 0.0



   .. py:attribute:: distribution
      :value: None



   .. py:attribute:: prior_sample
      :value: None



   .. py:attribute:: transform_prior_cube_coordinate
      :value: None



   .. py:attribute:: plot_in_corner
      :value: False



   .. py:attribute:: corner_ranges
      :value: None



   .. py:attribute:: corner_transform
      :value: None



   .. py:attribute:: corner_label
      :value: None



   .. py:method:: _tree_flatten()


   .. py:method:: _tree_unflatten(aux_data, children)
      :classmethod:



   .. py:method:: get_param_uniform(cube)


   .. py:method:: get_flattened_value(value=None)


   .. py:method:: set_param(value)


   .. py:method:: set_prior()


.. py:class:: RetrievalParameter(name, prior_parameters, prior_type='uniform', custom_prior=None)

   .. py:attribute:: __available_priors
      :value: ['log', 'uniform', 'gaussian', 'log_gaussian', 'delta', 'custom']



   .. py:attribute:: name


   .. py:attribute:: prior_parameters


   .. py:attribute:: prior_type
      :value: 'uniform'



   .. py:attribute:: prior_function


   .. py:method:: from_dict(dictionary)
      :classmethod:


      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.



   .. py:method:: 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.



