nessai.gw.reparameterisations
Specific reparameterisations for gravitational-wave inference.
Module Contents
Classes
Reparameterisation for distance. |
|
Reparameterisation that converts phase to delta phase. |
Functions
|
Get a reparameterisation from the default list plus specific GW |
- nessai.gw.reparameterisations.get_gw_reparameterisation(reparameterisation)
Get a reparameterisation from the default list plus specific GW classes.
- Parameters:
- reparameterisationstr,
nessai.reparameterisations.Reparameterisation
Name of the reparameterisations to return or a class that inherits from
Reparameterisation
- reparameterisationstr,
- Returns:
nessai.reparameteristaions.Reparameterisation
Reparameterisation class.
- dict
Keyword arguments for the specific reparameterisation.
- class nessai.gw.reparameterisations.DistanceReparameterisation(parameters=None, allowed_bounds=['upper'], allow_both=False, converter_kwargs=None, prior=None, prior_bounds=None, **kwargs)
Bases:
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:
- parametersstr
Name of distance parameter to rescale.
- prior{‘power-law’, ‘uniform-comoving-volume’}, optional
Prior used for the distance parameter
- prior_boundstuple
Tuple of lower and upper bounds on the prior
- converter_kwargsdict, optional
Keyword arguments parsed to converter object that converts the distance to a parameter with a uniform prior.
- allowed_boundslist, optional
List of the allowed bounds for inversion
- kwargs
Additional kwargs are parsed to the parent class.
- class nessai.gw.reparameterisations.DeltaPhaseReparameterisation(parameters=None, prior_bounds=None)
Bases:
nessai.reparameterisations.Reparameterisation
Reparameterisation that converts phase to delta phase.
The Jacobian determinant of this transformation is 1.
Requires “psi” and “theta_jn”.
- Parameters:
- parametersUnion[str, List[str]]
Name(s) of the parameter(s).
- prior_boundsUnion[list, dict]
Prior bounds for the parameters
- reparameterise(x, x_prime, log_j, **kwargs)
Apply the reparameterisation to convert from x-space to x’-space.
- Parameters:
- xstructured array
Array of inputs
- x_primestructured array
Array to be update
- log_jarray_like
Log jacobian to be updated
- Returns:
- x, x_primestructured arrays
Update version of the x and x_prime arrays
- log_jarray_like
Updated log Jacobian determinant
- inverse_reparameterise(x, x_prime, log_j, **kwargs)
Apply the reparameterisation to convert from x-space to x’-space
- Parameters:
- xstructured array
Array
- x_primestructured array
Array to be update
- log_jarray_like
Log jacobian to be updated
- Returns:
- x, x_primestructured arrays
Update version of the x and x_prime arrays
- log_jarray_like
Updated log Jacobian determinant