enterprise_extensions package

Subpackages

Submodules

enterprise_extensions.blocks module

enterprise_extensions.blocks.bwm_block(Tmin, Tmax, amp_prior='log-uniform', skyloc=None, logmin=- 18, logmax=- 11, name='bwm')[source]
Returns deterministic GW burst with memory model:

1. Burst event parameterized by time, sky location, polarization angle, and amplitude

Parameters
  • Tmin – Min time to search, probably first TOA (MJD).

  • Tmax – Max time to search, probably last TOA (MJD).

  • amp_prior – Prior on log10_A. Default if “log-uniform”. Use “uniform” for upper limits.

  • skyloc – Fixed sky location of BWM signal search as [cos(theta), phi]. Search over sky location if None given.

  • logmin – log of minimum BWM amplitude for prior (log10)

  • logmax – log of maximum BWM amplitude for prior (log10)

  • name – Name of BWM signal.

enterprise_extensions.blocks.bwm_sglpsr_block(Tmin, Tmax, amp_prior='log-uniform', logmin=- 17, logmax=- 12, name='ramp', fixed_sign=None)[source]
enterprise_extensions.blocks.chromatic_noise_block(gp_kernel='nondiag', psd='powerlaw', nondiag_kernel='periodic', prior='log-uniform', dt=15, df=200, idx=4, include_quadratic=False, Tspan=None, name='chrom', components=30, coefficients=False)[source]

Returns GP chromatic noise model :

1. Chromatic modeled with user defined PSD with 30 sampling frequencies. Available PSDs are [‘powerlaw’, ‘turnover’ ‘spectrum’]

Parameters
  • gp_kernel – Whether to use a diagonal kernel for the GP. [‘diag’,’nondiag’]

  • nondiag_kernel – Which nondiagonal kernel to use for the GP. [‘periodic’,’sq_exp’,’periodic_rfband’,’sq_exp_rfband’]

  • psd – PSD to use for common red noise signal. Available options are [‘powerlaw’, ‘turnover’ ‘spectrum’]

  • prior – What type of prior to use for amplitudes. [‘log-uniform’,’uniform’]

  • dt – time-scale for linear interpolation basis (days)

  • df – frequency-scale for linear interpolation basis (MHz)

  • idx – Index of radio frequency dependence (i.e. DM is 2). Any float will work.

  • include_quadratic – Whether to include a quadratic fit.

  • name – Name of signal

  • Tspan – Tspan from which to calculate frequencies for PSD-based GPs.

  • components – Number of frequencies to use in ‘diag’ GPs.

  • coefficients – Whether to keep coefficients of the GP.

enterprise_extensions.blocks.common_red_noise_block(psd='powerlaw', prior='log-uniform', Tspan=None, components=30, combine=True, log10_A_val=None, gamma_val=None, delta_val=None, logmin=None, logmax=None, orf=None, orf_ifreq=0, leg_lmax=5, name='gw', coefficients=False, pshift=False, pseed=None)[source]

Returns common red noise model:

1. Red noise modeled with user defined PSD with 30 sampling frequencies. Available PSDs are [‘powerlaw’, ‘turnover’ ‘spectrum’]

Parameters
  • psd – PSD to use for common red noise signal. Available options are [‘powerlaw’, ‘turnover’ ‘spectrum’, ‘broken_powerlaw’]

  • prior – Prior on log10_A. Default if “log-uniform”. Use “uniform” for upper limits.

  • Tspan – Sets frequency sampling f_i = i / Tspan. Default will use overall time span for individual pulsar.

  • log10_A_val – Value of log10_A parameter for fixed amplitude analyses.

  • gamma_val – Value of spectral index for power-law and turnover models. By default spectral index is varied of range [0,7]

  • delta_val – Value of spectral index for high frequencies in broken power-law and turnover models. By default spectral index is varied in range [0,7]. :param logmin: Specify the lower bound of the prior on the amplitude for all psd but ‘spectrum’. If psd==’spectrum’, then this specifies the lower prior on log10_rho_gw

  • logmax – Specify the lower bound of the prior on the amplitude for all psd but ‘spectrum’. If psd==’spectrum’, then this specifies the lower prior on log10_rho_gw

  • orf – String representing which overlap reduction function to use. By default we do not use any spatial correlations. Permitted values are [‘hd’, ‘dipole’, ‘monopole’].

  • orf_ifreq – Frequency bin at which to start the Hellings & Downs function with numbering beginning at 0. Currently only works with freq_hd orf.

  • leg_lmax – Maximum multipole of a Legendre polynomial series representation of the overlap reduction function [default=5]

  • pshift – Option to use a random phase shift in design matrix. For testing the null hypothesis.

  • pseed – Option to provide a seed for the random phase shift.

  • name – Name of common red process

enterprise_extensions.blocks.dm_noise_block(gp_kernel='diag', psd='powerlaw', nondiag_kernel='periodic', prior='log-uniform', dt=15, df=200, Tspan=None, components=30, gamma_val=None, coefficients=False)[source]

Returns DM noise model:

  1. DM noise modeled as a power-law with 30 sampling frequencies

Parameters
  • psd – PSD function [e.g. powerlaw (default), spectrum, tprocess]

  • prior – Prior on log10_A. Default if “log-uniform”. Use “uniform” for upper limits.

  • dt – time-scale for linear interpolation basis (days)

  • df – frequency-scale for linear interpolation basis (MHz)

  • Tspan – Sets frequency sampling f_i = i / Tspan. Default will use overall time span for indivicual pulsar.

  • components – Number of frequencies in sampling of DM-variations.

  • gamma_val – If given, this is the fixed slope of the power-law for powerlaw, turnover, or tprocess DM-variations

enterprise_extensions.blocks.red_noise_block(psd='powerlaw', prior='log-uniform', Tspan=None, components=30, gamma_val=None, coefficients=False, select=None, modes=None, wgts=None, combine=True, break_flat=False, break_flat_fq=None, logmin=None, logmax=None, dropout=False, k_threshold=0.5)[source]
Returns red noise model:

Red noise modeled as a power-law with 30 sampling frequencies

Parameters
  • psd – PSD function [e.g. powerlaw (default), turnover, spectrum, tprocess]

  • prior – Prior on log10_A. Default if “log-uniform”. Use “uniform” for upper limits.

  • Tspan – Sets frequency sampling f_i = i / Tspan. Default will use overall time span for indivicual pulsar.

  • components – Number of frequencies in sampling of red noise

  • gamma_val – If given, this is the fixed slope of the power-law for powerlaw, turnover, or tprocess red noise

  • coefficients – include latent coefficients in GP model?

  • dropout – Use a dropout analysis for intrinsic red noise models. Currently only supports power law option.

  • k_threshold – Threshold for dropout analysis.

enterprise_extensions.blocks.white_noise_block(vary=False, inc_ecorr=False, gp_ecorr=False, efac1=False, select='backend', tnequad=False, name=None)[source]

Returns the white noise block of the model:

  1. EFAC per backend/receiver system

  2. EQUAD per backend/receiver system

  3. ECORR per backend/receiver system

Parameters
  • vary – If set to true we vary these parameters with uniform priors. Otherwise they are set to constants with values to be set later.

  • inc_ecorr – include ECORR, needed for NANOGrav channelized TOAs

  • gp_ecorr – whether to use the Gaussian process model for ECORR

  • efac1 – use a strong prior on EFAC = Normal(mu=1, stdev=0.1)

  • tnequad – Whether to use the TempoNest definition of EQUAD. Defaults to False to follow Tempo, Tempo2 and Pint definition.

enterprise_extensions.deterministic module

enterprise_extensions.deterministic.CWSignal(cw_wf, ecc=False, psrTerm=False, name='cw')[source]
enterprise_extensions.deterministic.bwm_delay(toas, pos, log10_h=- 14.0, cos_gwtheta=0.0, gwphi=0.0, gwpol=0.0, t0=55000, antenna_pattern_fn=None)

Function that calculates the earth-term gravitational-wave burst-with-memory signal, as described in: Seto et al, van haasteren and Levin, phsirkov et al, Cordes and Jenet. This version uses the F+/Fx polarization modes, as verified with the Continuous Wave and Anisotropy papers.

Parameters
  • toas – Time-of-arrival measurements [s]

  • pos – Unit vector from Earth to pulsar

  • log10_h – log10 of GW strain

  • cos_gwtheta – Cosine of GW polar angle

  • gwphi – GW azimuthal polar angle [rad]

  • gwpol – GW polarization angle

  • t0 – Burst central time [day]

  • antenna_pattern_fn – User defined function that takes pos, gwtheta, gwphi as arguments and returns (fplus, fcross)

Returns

the waveform as induced timing residuals (seconds)

enterprise_extensions.deterministic.bwm_sglpsr_delay(toas, sign, log10_A=- 15, t0=55000)

Function that calculates the earth-term gravitational-wave burst-with-memory signal for an optimally oriented source in a single pulsar

Parameters
  • toas – Time-of-arrival measurements [s]

  • log10_A – log10 of the amplitude of the ramp (delta_f/f)

  • t0 – Burst central time [day]

Returns

the waveform as induced timing residuals (seconds)

enterprise_extensions.deterministic.compute_eccentric_residuals(toas, theta, phi, cos_gwtheta, gwphi, log10_mc, log10_dist, log10_h, log10_F, cos_inc, psi, gamma0, e0, l0, q, nmax=400, pdist=1.0, pphase=None, pgam=None, psrTerm=False, tref=0, check=False)

Simulate GW from eccentric SMBHB. Waveform models from Taylor et al. (2015) and Barack and Cutler (2004). WARNING: This residual waveform is only accurate if the GW frequency is not significantly evolving over the observation time of the pulsar.

Parameters
  • toa – pulsar observation times

  • theta – polar coordinate of pulsar

  • phi – azimuthal coordinate of pulsar

  • gwtheta – Polar angle of GW source in celestial coords [radians]

  • gwphi – Azimuthal angle of GW source in celestial coords [radians]

  • log10_mc – Base-10 lof of chirp mass of SMBMB [solar masses]

  • log10_dist – Base-10 uminosity distance to SMBMB [Mpc]

  • log10_F – base-10 orbital frequency of SMBHB [Hz]

  • inc – Inclination of GW source [radians]

  • psi – Polarization of GW source [radians]

  • gamma0 – Initial angle of periastron [radians]

  • e0 – Initial eccentricity of SMBHB

  • l0 – Initial mean anomoly [radians]

  • q – Mass ratio of SMBHB

  • nmax – Number of harmonics to use in waveform decomposition

  • pdist – Pulsar distance [kpc]

  • pphase – Pulsar phase [rad]

  • pgam – Pulsar angle of periastron [rad]

  • psrTerm – Option to include pulsar term [boolean]

  • tref – Fidicuial time at which initial parameters are referenced [s]

  • check – Check if frequency evolves significantly over obs. time

Returns

Vector of induced residuals

enterprise_extensions.deterministic.cw_block_circ(amp_prior='log-uniform', dist_prior=None, skyloc=None, log10_fgw=None, psrTerm=False, tref=0, name='cw')[source]

Returns deterministic, cirular orbit continuous GW model:

Parameters
  • amp_prior – Prior on log10_h. Default is “log-uniform.” Use “uniform” for upper limits, or “None” to search over log10_dist instead.

  • dist_prior – Prior on log10_dist. Default is “None,” meaning that the search is over log10_h instead of log10_dist. Use “log-uniform” to search over log10_h with a log-uniform prior.

  • skyloc – Fixed sky location of CW signal search as [cos(theta), phi]. Search over sky location if None given.

  • log10_fgw – Fixed log10 GW frequency of CW signal search. Search over GW frequency if None given.

  • ecc – Fixed log10 distance to SMBHB search. Search over distance or strain if None given.

  • psrTerm – Boolean for whether to include the pulsar term. Default is False.

  • name – Name of CW signal.

enterprise_extensions.deterministic.cw_block_ecc(amp_prior='log-uniform', skyloc=None, log10_F=None, ecc=None, psrTerm=False, tref=0, name='cw')[source]

Returns deterministic, eccentric orbit continuous GW model:

Parameters
  • amp_prior – Prior on log10_h and log10_Mc/log10_dL. Default is “log-uniform” with log10_Mc and log10_dL searched over. Use “uniform” for upper limits, log10_h searched over.

  • skyloc – Fixed sky location of CW signal search as [cos(theta), phi]. Search over sky location if None given.

  • log10_F – Fixed log-10 orbital frequency of CW signal search. Search over orbital frequency if None given.

  • ecc – Fixed eccentricity of SMBHB search. Search over eccentricity if None given.

  • psrTerm – Boolean for whether to include the pulsar term. Default is False.

  • name – Name of CW signal.

enterprise_extensions.deterministic.cw_delay(toas, pos, pdist, cos_gwtheta=0, gwphi=0, cos_inc=0, log10_mc=9, log10_fgw=- 8, log10_dist=None, log10_h=None, phase0=0, psi=0, psrTerm=False, p_dist=1, p_phase=None, evolve=False, phase_approx=False, check=False, tref=0)

Function to create GW incuced residuals from a SMBMB as defined in Ellis et. al 2012,2013.

Parameters
  • toas – Pular toas in seconds

  • pos – Unit vector from the Earth to the pulsar

  • pdist – Pulsar distance (mean and uncertainty) [kpc]

  • cos_gwtheta – Cosine of Polar angle of GW source in celestial coords [radians]

  • gwphi – Azimuthal angle of GW source in celestial coords [radians]

  • cos_inc – cosine of Inclination of GW source [radians]

  • log10_mc – log10 of Chirp mass of SMBMB [solar masses]

  • log10_fgw – log10 of Frequency of GW (twice the orbital frequency) [Hz]

  • log10_dist – log10 of Luminosity distance to SMBMB [Mpc], used to compute strain, if not None

  • log10_h – log10 of GW strain, used to compute distance, if not None

  • phase0 – Initial GW phase of source [radians]

  • psi – Polarization angle of GW source [radians]

  • psrTerm – Option to include pulsar term [boolean]

  • p_dist – Pulsar distance parameter

  • p_phase – Use pulsar phase to determine distance [radian]

  • evolve – Option to include/exclude full evolution [boolean]

  • phase_approx – Option to include/exclude phase evolution across observation time [boolean]

  • check – Check if frequency evolves significantly over obs. time [boolean]

  • tref – Reference time for phase and frequency [s]

Returns

Vector of induced residuals

enterprise_extensions.deterministic.fdm_block(Tmin, Tmax, amp_prior='log-uniform', name='fdm', amp_lower=- 18, amp_upper=- 11, freq_lower=- 9, freq_upper=- 7, use_fixed_freq=False, fixed_freq=- 8)[source]
Returns deterministic fuzzy dark matter model:
  1. FDM parameterized by frequency, phase,

    and amplitude (mass and DM energy density).

Parameters
  • Tmin – Min time to search, probably first TOA (MJD).

  • Tmax – Max time to search, probably last TOA (MJD).

  • amp_prior – Prior on log10_A.

  • logmin – log of minimum FDM amplitude for prior (log10)

  • logmax – log of maximum FDM amplitude for prior (log10)

  • name – Name of FDM signal.

  • freq_lower (amp_upper, amp_lower, freq_upper,) – The log-space bounds on the amplitude and frequency priors.

  • use_fixed_freq – Whether to do a fixed-frequency run and not search over the frequency.

  • fixed_freq – The frequency value to do a fixed-frequency run with.

enterprise_extensions.deterministic.fdm_delay(toas, log10_A, log10_f, phase_e, phase_p)

Function that calculates the earth-term gravitational-wave fuzzy dark matter signal, as described in: Kato et al. (2020).

Parameters
  • toas – Time-of-arrival measurements [s]

  • log10_A – log10 of GW strain

  • log10_f – log10 of GW frequency

  • phase_e – The Earth-term phase of the GW

  • phase_p – The Pulsar-term phase of the GW

Returns

the waveform as induced timing residuals (seconds)

enterprise_extensions.deterministic.generalized_gwpol_psd(f, log10_A_tt=- 15, log10_A_st=- 15, log10_A_vl=- 15, log10_A_sl=- 15, kappa=3.3333333333333335, p_dist=1.0)

PSD for a generalized mixture of scalar+vector dipole radiation and tensorial quadrupole radiation from SMBHBs.

enterprise_extensions.dropout module

enterprise_extensions.dropout.Dropout_PhysicalEphemerisSignal(frame_drift_rate=enterprise.signals.parameter.Uniform, d_jupiter_mass=enterprise.signals.parameter.Normal, d_saturn_mass=enterprise.signals.parameter.Normal, d_uranus_mass=enterprise.signals.parameter.Normal, d_neptune_mass=enterprise.signals.parameter.Normal, jup_orb_elements=enterprise.signals.parameter.Uniform, sat_orb_elements=enterprise.signals.parameter.Uniform, inc_jupiter_orb=True, inc_saturn_orb=False, use_epoch_toas=True, k_drop=enterprise.signals.parameter.Uniform, k_threshold=0.5, name='')[source]

Class factory for dropout physical ephemeris model signal.

enterprise_extensions.dropout.dropout_physical_ephem_delay(toas, planetssb, pos_t, frame_drift_rate=0, d_jupiter_mass=0, d_saturn_mass=0, d_uranus_mass=0, d_neptune_mass=0, jup_orb_elements=array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0]), sat_orb_elements=array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0]), inc_jupiter_orb=False, jup_orbelxyz=None, jup_mjd=None, inc_saturn_orb=False, sat_orbelxyz=None, sat_mjd=None, equatorial=True, k_drop=0.5, k_threshold=0.5)

Dropout BayesEphem model. Switches BayesEphem on or off depending on whether k_drop exceeds k_threshold.

enterprise_extensions.dropout.dropout_powerlaw(f, name, log10_A=- 16, gamma=5, dropout_psr='B1855+09', k_drop=0.5, k_threshold=0.5)

Dropout powerlaw for a stochastic process. Switches a stochastic process on or off in a single pulsar depending on whether k_drop exceeds k_threshold.

Parameters

dropout_psr – Which pulsar to use a dropout switch on. The value ‘all’ will use the method on all pulsars.

enterprise_extensions.empirical_distr module

class enterprise_extensions.empirical_distr.EmpiricalDistribution1D(param_name, samples, bins)[source]

Bases: object

Class used to define a 1D empirical distribution based on posterior from another MCMC.

Parameters
  • samples – samples for hist

  • bins – edges to use for hist (left and right) make sure bins cover whole prior!

draw()[source]
logprob(params)[source]
prob(params)[source]
class enterprise_extensions.empirical_distr.EmpiricalDistribution1DKDE(param_name, samples, minval=None, maxval=None, bandwidth=0.1, nbins=40)[source]

Bases: object

Minvals and maxvals should specify priors for these. Should make these required.

draw()[source]
class enterprise_extensions.empirical_distr.EmpiricalDistribution2D(param_names, samples, bins)[source]

Bases: object

Class used to define a 1D empirical distribution based on posterior from another MCMC.

Parameters
  • samples – samples for hist

  • bins – edges to use for hist (left and right) make sure bins cover whole prior!

draw()[source]
logprob(params)[source]
prob(params)[source]
class enterprise_extensions.empirical_distr.EmpiricalDistribution2DKDE(param_names, samples, minvals=None, maxvals=None, bandwidth=0.1, nbins=40)[source]

Bases: object

Minvals and maxvals should specify priors for these. Should make these required.

Parameters
  • param_names – 2-element list of parameter names

  • samples – samples, with dimension (2 x Nsamples)

Return distr

list of empirical distributions

draw()[source]
logprob(params)[source]
prob(params)[source]
enterprise_extensions.empirical_distr.make_empirical_distributions(pta, paramlist, params, chain, burn=0, nbins=81, filename='distr.pkl', return_distribution=True, save_dists=True)[source]

Utility function to construct empirical distributions.

Parameters
  • pta – the pta object used to generate the posteriors

  • paramlist – a list of parameter names, either single parameters or pairs of parameters

  • chain – MCMC chain from a previous run

  • burn – desired number of initial samples to discard

  • nbins – number of bins to use for the empirical distributions

Return distr

list of empirical distributions

enterprise_extensions.empirical_distr.make_empirical_distributions_KDE(pta, paramlist, params, chain, burn=0, nbins=41, filename='distr.pkl', bandwidth=0.1, return_distribution=True, save_dists=True)[source]

Utility function to construct empirical distributions.

Parameters
  • paramlist – a list of parameter names, either single parameters or pairs of parameters

  • params – list of all parameter names for the MCMC chain

  • chain – MCMC chain from a previous run, has dimensions Nsamples x Nparams

  • burn – desired number of initial samples to discard

  • nbins – number of bins to use for the empirical distributions

Return distr

list of empirical distributions

enterprise_extensions.gp_kernels module

enterprise_extensions.gp_kernels.dmx_ridge_prior(avetoas, log10_sigma=- 7)

DMX-like signal with Gaussian prior

enterprise_extensions.gp_kernels.get_tf_quantization_matrix(toas, freqs, dt=2592000, df=None, dm=False, dm_idx=2)

Quantization matrix in time and radio frequency to cut down on the kernel size.

enterprise_extensions.gp_kernels.linear_interp_basis_dm(toas, freqs, dt=2592000)
enterprise_extensions.gp_kernels.linear_interp_basis_freq(freqs, df=64)

Linear interpolation in radio frequency

enterprise_extensions.gp_kernels.periodic_kernel(avetoas, log10_sigma=- 7, log10_ell=2, log10_gam_p=0, log10_p=0)

Quasi-periodic kernel for DM

enterprise_extensions.gp_kernels.se_dm_kernel(avetoas, log10_sigma=- 7, log10_ell=2)

Squared-exponential kernel for DM

enterprise_extensions.gp_kernels.se_kernel(avefreqs, log10_sigma=- 7, log10_lam=3)

Squared-exponential kernel for FD

enterprise_extensions.gp_kernels.sf_kernel(labels, log10_sigma=- 7, log10_ell=2, log10_ell2=4, log10_alpha_wgt=0)

The product of a squared-exponential time kernel and a rational-quadratic frequency kernel.

enterprise_extensions.gp_kernels.tf_kernel(labels, log10_sigma=- 7, log10_ell=2, log10_gam_p=0, log10_p=0, log10_ell2=4, log10_alpha_wgt=0)

The product of a quasi-periodic time kernel and a rational-quadratic frequency kernel.

enterprise_extensions.hypermodel module

enterprise_extensions.model_orfs module

enterprise_extensions.model_orfs.anis_orf(pos1, pos2, params, **kwargs)

Anisotropic GWB spatial correlation function.

enterprise_extensions.model_orfs.bin_orf(pos1, pos2, params)

Agnostic binned spatial correlation function. Bin edges are placed at edges and across angular separation space. Changing bin edges will require manual intervention to create new function.

Param

params inter-pulsar correlation bin amplitudes.

Author: S. R. Taylor (2020)

enterprise_extensions.model_orfs.dipole_orf(pos1, pos2)

Dipole spatial correlation function.

enterprise_extensions.model_orfs.freq_hd(pos1, pos2, params)

Frequency-dependent Hellings & Downs spatial correlation function. Implemented as a model that only enforces H&D inter-pulsar correlations after a certain number of frequencies in the spectrum. The first set of frequencies are uncorrelated.

Param

params params[0] is the number of components in the stochastic process. params[1] is the frequency at which to start the H&D inter-pulsar correlations (indexing from 0).

Reference: Taylor et al. (2017), https://arxiv.org/abs/1606.09180 Author: S. R. Taylor (2020)

enterprise_extensions.model_orfs.generalized_gwpol_psd(f, log10_A_tt=- 15, log10_A_st=- 15, alpha_tt=- 0.6666666666666666, alpha_alt=- 1, log10_A_vl=- 15, log10_A_sl=- 15, kappa=0, p_dist=1.0)

General powerlaw spectrum allowing for existence of all possible modes of gravity as predicted by a general metric spacetime theory and generated by a binary system. The SL and VL modes’ powerlaw relations are not normalized.

Param

f A list of considered frequencies

Param

log10_A_tt Amplitude of the tensor transverse mode

Param

log10_A_st Amplitude of the scalar transverse mode

Param

log10_A_vl Amplitude of the vector longitudinal mode

Param

log10_A_sl Amplitude of the scalar longitudinal mode

Param

kappa Relative amplitude of dipole radiation over quadrupolar radiation

Param

p_dist Pulsar distance in kpc

Param

alpha_tt spectral index of the TT mode.

Param

alpha_alt spectral index of the non-Einsteinian modes.

Reference: Cornish et al. (2017), https://arxiv.org/abs/1712.07132 Author: S. R. Taylor, N. Laal (2020)

enterprise_extensions.model_orfs.gt_orf(pos1, pos2, tau)

General Transverse (GT) Correlations. This ORF is used to detect the relative significance of all possible correlation patterns induced by the most general family of transverse gravitational waves.

Param

tau tau = 1 results in ST correlations while tau = -1 results in HD correlations.

Author: N. Laal (2020)

enterprise_extensions.model_orfs.gw_dipole_orf(pos1, pos2)

GW-dipole Correlations. Author: N. Laal (2020)

enterprise_extensions.model_orfs.gw_monopole_orf(pos1, pos2)

GW-monopole Correlations. This phenomenological correlation pattern can be used in Bayesian runs as the simplest type of correlations. Author: N. Laal (2020)

enterprise_extensions.model_orfs.hd_orf(pos1, pos2)

Hellings & Downs spatial correlation function.

enterprise_extensions.model_orfs.legendre_orf(pos1, pos2, params)

Legendre polynomial spatial correlation function. Assumes process normalization such that autocorrelation signature is 1. A separate function is needed to use a “split likelihood” model with this Legendre process decoupled from the autocorrelation signature (“zero_diag_legendre_orf”).

Param

params Legendre polynomial amplitudes describing the Legendre series approximation to the inter-pulsar correlation signature. H&D coefficients are a_0=0, a_1=0, a_2=0.3125, a_3=0.0875, …

Reference: Gair et al. (2014), https://arxiv.org/abs/1406.4664 Author: S. R. Taylor (2020)

enterprise_extensions.model_orfs.monopole_orf(pos1, pos2)

Monopole spatial correlation function.

enterprise_extensions.model_orfs.param_hd_orf(pos1, pos2, a=1.5, b=- 0.25, c=0.5)

Pre-factor parametrized Hellings & Downs spatial correlation function.

Param

a, b, c: coefficients of H&D-like curve [default=1.5,-0.25,0.5].

Reference: Taylor, Gair, Lentati (2013), https://arxiv.org/abs/1210.6014 Author: S. R. Taylor (2020)

enterprise_extensions.model_orfs.spline_orf(pos1, pos2, params)

Agnostic spline-interpolated spatial correlation function. Spline knots are placed at edges, zeros, and minimum of H&D curve. Changing locations will require manual intervention to create new function.

Param

params spline knot amplitudes.

Reference: Taylor, Gair, Lentati (2013), https://arxiv.org/abs/1210.6014 Author: S. R. Taylor (2020)

enterprise_extensions.model_orfs.st_orf(pos1, pos2)

Scalar tensor correlations as induced by the breathing polarization mode of gravity. Author: N. Laal (2020)

enterprise_extensions.model_orfs.zero_diag_bin_orf(pos1, pos2, params)

Agnostic binned spatial correlation function. To be used in a “split likelihood” model with an additional common uncorrelated red process. The latter is necessary to regularize the overall Phi covariance matrix.

Param

params inter-pulsar correlation bin amplitudes.

Author: S. R. Taylor (2020)

enterprise_extensions.model_orfs.zero_diag_hd(pos1, pos2)

Off-diagonal Hellings & Downs spatial correlation function. To be used in a “split likelihood” model with an additional common uncorrelated red process. The latter is necessary to regularize the overall Phi covariance matrix.

Author: S. R. Taylor (2020)

enterprise_extensions.model_orfs.zero_diag_legendre_orf(pos1, pos2, params)

Legendre polynomial spatial correlation function. To be used in a “split likelihood” model with an additional common uncorrelated red process. The latter is necessary to regularize the overall Phi covariance matrix.

Param

params Legendre polynomial amplitudes describing the Legendre series approximation to the inter-pulsar correlation signature. H&D coefficients are a_0=0, a_1=0, a_2=0.3125, a_3=0.0875, …

Reference: Gair et al. (2014), https://arxiv.org/abs/1406.4664 Author: S. R. Taylor (2020)

enterprise_extensions.model_utils module

enterprise_extensions.models module

enterprise_extensions.sampler module

enterprise_extensions.sky_scrambles module

enterprise_extensions.sky_scrambles.compute_match(orf1, orf1_mag, orf2, orf2_mag)[source]

Computes the match between two different ORFs.

enterprise_extensions.sky_scrambles.compute_orf(ptheta, pphi)[source]

Computes the ORF coefficient. Takes different input than utils.hd_orf().

Parameters
  • ptheta – Array of values of pulsar positions theta

  • pphi – Array of values of pulsar positions phi

Returns

orf: ORF for the given positions orf_mag: Magnitude of the ORF

enterprise_extensions.sky_scrambles.get_scrambles(psrs, N=500, Nmax=10000, thresh=0.1, filename='sky_scrambles.npz', resume=False)[source]

Get sky scramble ORFs and matches.

Parameters
  • psrs – List of pulsar objects

  • N – Number of desired sky scrambles

  • Nmax – Maximum number of tries to get independent scrambles

  • thresh – Threshold value for match statistic.

  • filename – Name of the file where the sky scrambles should be saved. Sky scrambles should be saved in npz file.

  • resume – Whether to resume from an earlier run.

enterprise_extensions.sky_scrambles.make_true_orf(psrs)[source]

Computes the ORF by looping over pulsar pairs

enterprise_extensions.timing module

enterprise_extensions.timing.timing_block(tmparam_list=['RAJ', 'DECJ', 'F0', 'F1', 'PMRA', 'PMDEC', 'PX'])[source]

Returns the timing model block of the model :param tmparam_list: a list of parameters to vary in the model

enterprise_extensions.timing.tm_delay(residuals, t2pulsar, tmparams_orig, tmparams, which='all')

Compute difference in residuals due to perturbed timing model.

Parameters
  • residuals – original pulsar residuals from Pulsar object

  • t2pulsar – libstempo pulsar object

  • tmparams_orig – dictionary of TM parameter tuples, (val, err)

  • tmparams – new timing model parameters, rescaled to be in sigmas

  • which – option to have all or only named TM parameters varied

Returns

difference between new and old residuals in seconds