jaxpint.phase#
Phase components for JaxPINT timing models.
- class jaxpint.phase.Glitch(n_glitches, glep_names, glph_names, glf0_names, glf1_names, glf2_names, glf0d_names, gltd_names)[source]#
Bases:
PhaseComponentPulsar glitch phase component.
- Parameters:
n_glitches (
int) – Number of glitches in the model.glep_names (
tuple[str,]) – MJD epoch parameter names, one per glitch (e.g.("GLEP_1",)).glph_names (
tuple[str,]) – Phase jump, frequency, frequency-derivative, and second frequency-derivative parameter names.glf0_names (
tuple[str,]) – Phase jump, frequency, frequency-derivative, and second frequency-derivative parameter names.glf1_names (
tuple[str,]) – Phase jump, frequency, frequency-derivative, and second frequency-derivative parameter names.glf2_names (
tuple[str,]) – Phase jump, frequency, frequency-derivative, and second frequency-derivative parameter names.glf0d_names (
tuple[str,]) – Decaying-frequency and decay-time-constant parameter names.gltd_names (
tuple[str,]) – Decaying-frequency and decay-time-constant parameter names.
- Raises:
ValueError – If
n_glitchesis less than 1.ValueError – If the length of any glitch parameter name tuple does not match
n_glitches.
- class jaxpint.phase.IFunc(interp_type, control_mjds, control_delays, f0_name='F0')[source]#
Bases:
PhaseComponentInterpolation function model.
- Parameters:
interp_type (
int) – Interpolation type: 0 = piecewise constant, 2 = linear.control_mjds (
array,shape (n_points,)) – MJD control-point times (sorted, ascending).control_delays (
array,shape (n_points,)) – Delay values at control points (seconds).f0_name (
str) – Name of the spin frequency parameter (default"F0").
- Raises:
ValueError – If
interp_typeis not 0 or 2.ValueError – If fewer than one control point is provided.
- class jaxpint.phase.PhaseJump(jump_param_names, f0_name='F0')[source]#
Bases:
PhaseComponentArbitrary phase jumps applied to TOA subsets.
Each jump parameter value is in seconds and is converted to phase (cycles) by multiplying by F0. The boolean mask for each jump is looked up from
toa_data.flag_masks[jump_name].- Parameters:
jump_param_names (
tuple[str,]) – Names of the JUMP parameters in theParameterVector, e.g.("JUMP1", "JUMP2", "JUMP3").f0_name (
str) – Name of the spin frequency parameter (default"F0").
- Raises:
ValueError – If no JUMP parameters are provided (
jump_param_namesis empty).
- class jaxpint.phase.PiecewiseSpindown(n_pieces, pwstart_names, pwstop_names, pwep_names, pwph_names, pwf0_names, pwf1_names, pwf2_names)[source]#
Bases:
PhaseComponentPiecewise Taylor-expansion spindown model.
- Parameters:
n_pieces (
int) – Number of piecewise segments.pwstart_names (
tuple[str,]) – Names of segment start epoch parameters (MJD).pwstop_names (
tuple[str,]) – Names of segment stop epoch parameters (MJD).pwep_names (
tuple[str,]) – Names of segment reference epoch parameters (MJD).pwph_names (
tuple[str,]) – Names of segment phase offset parameters (dimensionless cycles).pwf0_names (
tuple[str,]) – Names of segment frequency parameters (Hz).pwf1_names (
tuple[str,]) – Names of segment frequency derivative parameters (Hz/s).pwf2_names (
tuple[str,]) – Names of segment second derivative parameters (Hz/s^2).
- Raises:
ValueError – If
n_piecesis less than 1.ValueError – If the length of any segment parameter name tuple does not match
n_pieces.
- class jaxpint.phase.Spindown(spin_param_names, pepoch_name='PEPOCH')[source]#
Bases:
PhaseComponentPolynomial spindown phase component.
- Parameters:
spin_param_names (
tuple[str,]) – Names of the spin-frequency parameters in theParameterVector, ordered by derivative index. E.g.("F0",)or("F0", "F1", "F2").pepoch_name (
str) – Name of the reference-epoch parameter (default"PEPOCH").
- Raises:
ValueError – If no spin terms are provided (
spin_param_namesis empty).ValueError – If the first spin term is not
'F0'.
- change_pepoch(params, new_epoch_int, new_epoch_frac)[source]#
Re-derive spin parameters at a new reference epoch.
The physical prediction is invariant: only the Taylor coefficients and PEPOCH change so that the expansion is centred at the new epoch.
Note
Not JIT-compatible (modifies static
epoch_int_values). Intended for model setup, not inner-loop computation.
- class jaxpint.phase.Wave(n_terms, wave_sin_names, wave_cos_names, waveepoch_name='WAVEEPOCH', wave_om_name='WAVE_OM', f0_name='F0')[source]#
Bases:
PhaseComponentLegacy WAVE timing noise model.
- Parameters:
n_terms (
int) – Number of WAVE terms (harmonic pairs).waveepoch_name (
str) – Name of the reference epoch parameter.wave_om_name (
str) – Name of the base angular frequency parameter (rad/day).wave_sin_names (
tuple[str,]) – Names of sine amplitude parameters (seconds). These are theWAVEn_Aentries produced by the bridge from PINT’s pairParameter splitting.wave_cos_names (
tuple[str,]) – Names of cosine amplitude parameters (seconds). These are theWAVEn_Bentries.f0_name (
str) – Name of the spin frequency parameter (default"F0").
- Raises:
ValueError – If
n_termsis less than 1.ValueError – If the length of
wave_sin_namesorwave_cos_namesdoes not matchn_terms.