nessai.gw.reparameterisations
=============================

.. py:module:: nessai.gw.reparameterisations

.. autoapi-nested-parse::

   Specific reparameterisations for gravitational-wave inference.

   ..
       !! processed by numpydoc !!


Classes
-------

.. autoapisummary::

   nessai.gw.reparameterisations.DistanceReparameterisation
   nessai.gw.reparameterisations.DeltaPhaseReparameterisation


Functions
---------

.. autoapisummary::

   nessai.gw.reparameterisations.get_gw_reparameterisation


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

.. py:function:: get_gw_reparameterisation(reparameterisation)

   
   Get a reparameterisation from the default list plus specific GW
   classes.


   :Parameters:

       **reparameterisation** : str,             :obj:`nessai.reparameterisations.Reparameterisation`
           Name of the reparameterisations to return or a class that inherits from
           :obj:`~nessai.reparameterisations.Reparameterisation`



   :Returns:

       :obj:`nessai.reparameteristaions.Reparameterisation`
           Reparameterisation class.

       dict
           Keyword arguments for the specific reparameterisation.











   ..
       !! processed by numpydoc !!

.. py:class:: DistanceReparameterisation(parameters=None, allowed_bounds=['upper'], allow_both=False, converter_kwargs=None, prior=None, prior_bounds=None, **kwargs)

   Bases: :py:obj:`nessai.reparameterisations.RescaleToBounds`


   
   Reparameterisation for distance.

   If the prior is specified and is one of the known priors then a rescaling
   is applied such that the resulting parameter has a uniform prior. If the
   prior is not specified, then the distance is rescaled an inversion is
   allowed on only the upper bound.

   :Parameters:

       **parameters** : str
           Name of distance parameter to rescale.

       **prior** : {'power-law', 'uniform-comoving-volume'}, optional
           Prior used for the distance parameter

       **prior_bounds** : tuple
           Tuple of lower and upper bounds on the prior

       **converter_kwargs** : dict, optional
           Keyword arguments parsed to converter object that converts the distance
           to a parameter with a uniform prior.

       **allowed_bounds** : list, optional
           List of the allowed bounds for inversion

       **kwargs**
           Additional kwargs are parsed to the parent class.














   ..
       !! processed by numpydoc !!

.. py:class:: DeltaPhaseReparameterisation(parameters=None, prior_bounds=None)

   Bases: :py:obj:`nessai.reparameterisations.Reparameterisation`


   
   Reparameterisation that converts phase to delta phase.

   The Jacobian determinant of this transformation is 1.

   Requires "psi" and "theta_jn".

   :Parameters:

       **parameters** : Union[str, List[str]]
           Name(s) of the parameter(s).

       **prior_bounds** : Union[list, dict]
           Prior bounds for the parameters














   ..
       !! processed by numpydoc !!

   .. py:method:: reparameterise(x, x_prime, log_j, **kwargs)

      
      Apply the reparameterisation to convert from x-space to x'-space.


      :Parameters:

          **x** : structured array
              Array of inputs

          **x_prime** : structured array
              Array to be update

          **log_j** : array_like
              Log jacobian to be updated



      :Returns:

          **x, x_prime** : structured arrays
              Update version of the x and x_prime arrays

          **log_j** : array_like
              Updated log Jacobian determinant











      ..
          !! processed by numpydoc !!


   .. py:method:: inverse_reparameterise(x, x_prime, log_j, **kwargs)

      
      Apply the reparameterisation to convert from x-space
      to x'-space


      :Parameters:

          **x** : structured array
              Array

          **x_prime** : structured array
              Array to be update

          **log_j** : array_like
              Log jacobian to be updated



      :Returns:

          **x, x_prime** : structured arrays
              Update version of the x and x_prime arrays

          **log_j** : array_like
              Updated log Jacobian determinant











      ..
          !! processed by numpydoc !!


