nessai.reparameterisations.angle
================================

.. py:module:: nessai.reparameterisations.angle

.. autoapi-nested-parse::

   Reparameterisations for handling angles.

   ..
       !! processed by numpydoc !!


Classes
-------

.. autoapisummary::

   nessai.reparameterisations.angle.Angle
   nessai.reparameterisations.angle.ToCartesian
   nessai.reparameterisations.angle.AnglePair


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

.. py:class:: Angle(parameters=None, prior_bounds=None, scale=1.0, rng=None)

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


   
   Reparameterisation for a single angle.

   This reparameterisations converts an angle to Cartesian coordinates
   using either a corresponding radial parameter or an auxiliary radial
   parameter. When using the auxiliary parameter, samples are drawn from
   a chi-distribution with two degrees of freedom.

   :Parameters:

       **parameters** : str or list
           Parameter(s) to use for the reparameterisation. Either just an angle
           or an angle and corresponding radial parameter

       **prior_bounds** : dict
           Dictionary of prior bounds. Does not need to be specified when defining
           `reparameterisations`.

       **scale** : float, optional
           Value used to rescale the angle before converting to Cartesian
           coordinates. If None the scale will be set to 2pi / prior_bounds.














   ..
       !! processed by numpydoc !!

   .. py:property:: angle

      
      The name of the angular parameter
















      ..
          !! processed by numpydoc !!


   .. py:property:: radial

      
      The name of the radial parameter
















      ..
          !! processed by numpydoc !!


   .. py:property:: radius

      
      The name of the radial parameter (equivalent to radial)
















      ..
          !! processed by numpydoc !!


   .. py:property:: x

      
      The name of x coordinate
















      ..
          !! processed by numpydoc !!


   .. py:property:: y

      
      The name of y coordinate
















      ..
          !! processed by numpydoc !!


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

      
      Convert the angle to Cartesian coordinates
















      ..
          !! processed by numpydoc !!


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

      
      Convert from Cartesian to an angle and radial component
















      ..
          !! processed by numpydoc !!


   .. py:method:: log_prior(x)

      
      Prior for radial parameter
















      ..
          !! processed by numpydoc !!


.. py:class:: ToCartesian(mode='split', scale=np.pi, rng=None, **kwargs)

   Bases: :py:obj:`Angle`


   
   Convert a parameter to Cartesian coordinates
















   ..
       !! processed by numpydoc !!

.. py:class:: AnglePair(parameters=None, prior_bounds=None, prior=None, convention=None, rng=None)

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


   
   Reparameterisation for a pair of angles and a radial component.

   Converts to three-dimensional Cartesian coordinates.

   If the radial component is not specified, it is sampled from a chi-
   distribution with three degrees of freedom.

   :Parameters:

       **parameters** : list
           List of parameters. Must contain at least the two angles and,
           optionally, also a radial component.

       **prior_bounds** : dict
           Dictionary of prior bounds for each parameter

       **prior** : str, {'isotropic', None}
           Type of prior, used to enable use of the prime prior.

       **convention** : str, {'ra-dec', 'az-zen'}
           Convention used for defining the spherical polar coordinates. If not
           set, it will be guessed based on either dec or zen. Where it is assumed
           declination is defined on [-pi/2, pi/2] and zenith on [0, pi].











   .. rubric:: Notes

   The parameters will be reordered such that the first parameter is the angle
   along the horizon, the second parameter is the vertical angle and the last
   parameter is the radial parameter.



   ..
       !! processed by numpydoc !!

   .. py:property:: angles

      
      Names of the two angles.

      Order is: angle along the horizon, vertical angle.















      ..
          !! processed by numpydoc !!


   .. py:property:: radial

      
      Name of the radial parameter
















      ..
          !! processed by numpydoc !!


   .. py:property:: x

      
      Name of the first Cartesian coordinate
















      ..
          !! processed by numpydoc !!


   .. py:property:: y

      
      Name of the second Cartesian coordinate
















      ..
          !! processed by numpydoc !!


   .. py:property:: z

      
      Name of the third Cartesian coordinate
















      ..
          !! processed by numpydoc !!


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

      
      Convert the spherical polar angles to Cartesian coordinates
















      ..
          !! processed by numpydoc !!


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

      
      Convert from Cartesian to spherical polar angles
















      ..
          !! processed by numpydoc !!


   .. py:method:: log_prior(x)

      
      Prior for radial parameter
















      ..
          !! processed by numpydoc !!


