deterministic#

discovery.deterministic.fpc_fast(pos, gwtheta, gwphi)[source]#
discovery.deterministic.makedelay_binary(pulsarterm=True)[source]#
discovery.deterministic.makedelay_binary_phases(pulsarterm=True)[source]#

Factory for computing cphase and sphase vectors from binary parameters.

discovery.deterministic.makedelay_binary_coefficients(pulsarterm=True)[source]#

Factory for computing coefficients to multiply phase vectors.

discovery.deterministic.cos2comp(f, df, A, f0, phi, t0)[source]#

Project signal A * cos(2pi f t + phi) onto Fourier basis cos(2pi k t/T), sin(2pi k t/T) for t in [t0, t0+T].

discovery.deterministic.makefourier_binary(pulsarterm=True)[source]#
discovery.deterministic.chromatic_exponential(psr, fref=1400.0)[source]#

Factory function for chromatic exponential delay model.

Creates a delay function that models chromatic exponential events (e.g., profile state changes) with frequency-dependent amplitude scaling.

Parameters:
  • psr (Pulsar) – Pulsar object containing toas and freqs attributes

  • fref (float, optional) – Reference frequency in MHz for normalization (default: 1400.0)

Returns:

delay – Function with signature (t0, log10_Amp, log10_tau, sign_param, alpha) -> ndarray Computes chromatic exponential delay:

\[\Delta(t) = \pm A_0 \exp\left(-\frac{t - t_0}{\tau}\right) \left(\frac{f_{\text{ref}}}{f}\right)^\alpha H(t - t_0)\]

where \(H(t - t_0)\) is the Heaviside step function.

Return type:

callable

discovery.deterministic.chromatic_annual(psr, fref=1400.0)[source]#

Factory function for chromatic annual delay model.

Creates a delay function that models chromatic annual sinusoidal variations (e.g., annual DM or scattering variations) with frequency-dependent amplitude scaling.

Parameters:
  • psr (Pulsar) – Pulsar object containing toas and freqs attributes

  • fref (float, optional) – Reference frequency in MHz for normalization (default: 1400.0)

Returns:

delay – Function with signature (log10_Amp, phase, alpha) -> ndarray Computes chromatic annual delay:

\[\Delta(t) = A_0 \sin(2\pi f_{\text{yr}} t + \phi) \left(\frac{f_{\text{ref}}}{f}\right)^\alpha\]

where \(f_{\text{yr}}\) is the annual frequency (1/year).

Return type:

callable

discovery.deterministic.chromatic_gaussian(psr, fref=1400.0)[source]#

Factory function for chromatic Gaussian delay model.

Creates a delay function that models chromatic Gaussian events (e.g., transient DM variations, localized profile events) with frequency-dependent amplitude scaling.

Parameters:
  • psr (Pulsar) – Pulsar object containing toas and freqs attributes

  • fref (float, optional) – Reference frequency in MHz for normalization (default: 1400.0)

Returns:

delay – Function with signature (t0, log10_Amp, log10_sigma, sign_param, alpha) -> ndarray Computes chromatic Gaussian delay:

\[\Delta(t) = \pm A_0 \exp\left(-\frac{(t - t_0)^2}{2\sigma^2}\right) \left(\frac{f_{\text{ref}}}{f}\right)^\alpha\]

Return type:

callable

discovery.deterministic.orthometric_shapiro(psr, binphase)[source]#

Factory function for orthometric Shapiro delay model.

Creates a delay function that models Shapiro delay in binary pulsars using the orthometric parameterization from Freire & Wex (2010).

Parameters:
  • psr (Pulsar) – Pulsar object containing toas attribute

  • binphase (array-like) – Binary orbital phase \(\Phi\) at each TOA (same shape as psr.toas)

Returns:

delay – Function with signature (h3, stig) -> ndarray Computes orthometric Shapiro delay (Equation 29 in Freire & Wex 2010):

\[\Delta_s = -\frac{2 h_3}{\zeta^3} \log(1 + \zeta^2 - 2 \zeta \sin\Phi)\]

Return type:

callable

Raises:

ValueError – If binphase shape does not match psr.toas shape

References

Freire, P. C. C., & Wex, N. (2010). The orthometric parametrization of the Shapiro delay and an improved test of general relativity with binary pulsars. MNRAS, 409(1), 199-212.