helpers
Helpers for setting up a compact-binary analysis.
The get_default_* functions read the parameter names of a prior (and, for the NS AW
unit cube, its bounds) and return what Jim takes; to_likelihood_space converts a
parameter dictionary to what the waveform expects. For anything these do not cover,
write the lists by hand.
Functions:
| Name | Description |
|---|---|
get_default_likelihood_transforms |
Default likelihood transforms (prior space to waveform input) for |
get_default_periodic |
Sampling-space parameters that wrap around, in the form Jim's |
get_default_sample_transforms |
Default sample transforms (prior space to sampling space) for |
to_likelihood_space |
Convert parameters given in any supported parametrization to likelihood space. |
get_default_likelihood_transforms(prior: Prior, ifos: Sequence[GroundBased2G], waveform: Waveform, *, phase_marginalization: bool = False) -> list[NtoMTransform]
¤
Default likelihood transforms (prior space to waveform input) for prior.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prior
|
Prior
|
The prior Jim will sample. |
required |
ifos
|
Sequence[GroundBased2G]
|
Detectors with data attached. |
required |
waveform
|
Waveform
|
The waveform model; its |
required |
phase_marginalization
|
bool
|
|
False
|
Returns:
| Type | Description |
|---|---|
list[NtoMTransform]
|
The transforms to pass to Jim as |
get_default_periodic(prior: Prior, sample_transforms: Sequence[BijectiveTransform]) -> dict[str, tuple[float, float]] | list[str]
¤
Sampling-space parameters that wrap around, in the form Jim's periodic takes.
A parameter counts when it is an angle with a known period (psi: pi; ra,
azimuth, phase_c, phi_jl, phi_12, s1_phi, s2_phi: 2 pi) and
its range covers one full period.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prior
|
Prior
|
The prior Jim will sample. |
required |
sample_transforms
|
Sequence[BijectiveTransform]
|
The sample transforms Jim will use. If they map onto [0, 1]
( |
required |
Returns:
| Type | Description |
|---|---|
dict[str, tuple[float, float]] | list[str]
|
|
get_default_sample_transforms(prior: Prior, ifos: Sequence[GroundBased2G], *, detector_frame_time: bool = True, detector_frame_sky: bool = True, space: Literal['default', 'unit_cube', 'unbounded'] = 'default') -> list[BijectiveTransform]
¤
Default sample transforms (prior space to sampling space) for prior.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prior
|
Prior
|
The prior Jim will sample. |
required |
ifos
|
Sequence[GroundBased2G]
|
Detectors with data attached. |
required |
detector_frame_time
|
bool
|
Sample |
True
|
detector_frame_sky
|
bool
|
Sample |
True
|
space
|
Literal['default', 'unit_cube', 'unbounded']
|
|
'default'
|
Returns:
| Type | Description |
|---|---|
list[BijectiveTransform]
|
The transforms to pass to Jim as |
to_likelihood_space(params: Mapping[str, float], ifos: Sequence[GroundBased2G], waveform: Waveform) -> dict[str, float]
¤
Convert parameters given in any supported parametrization to likelihood space.
Handles azimuth/zenith to ra/dec, t_det to t_c (at ifos[0]), J-frame
spin angles and spherical spins to Cartesian spins, and q to eta. The
detector-frame conversions read the trigger time from the data of ifos.