signals#

discovery.signals.residuals(psr)[source]#
discovery.signals.makenoise_measurement_simple(psr, noisedict={})[source]#
discovery.signals.selection_backend_flags(psr)[source]#
discovery.signals.makenoise_measurement(psr, noisedict={}, scale=1.0, tnequad=False, ecorr=False, selection=<function selection_backend_flags>, vectorize=True, outliers=False, enterprise=False)[source]#
discovery.signals.quantize(toas, dt=1.0)[source]#
discovery.signals.makegp_ecorr_simple(psr, noisedict={})[source]#
discovery.signals.makegp_ecorr(psr, noisedict={}, enterprise=False, scale=1.0, selection=<function selection_backend_flags>, variable=False, name='ecorrGP')[source]#
discovery.signals.makegp_improper(psr, fmat, constant=1e+40, name='improperGP', variable=False)[source]#
discovery.signals.makegp_timing(psr, constant=None, variance=None, svd=False, scale=1.0, variable=False)[source]#
discovery.signals.getspan(psrs)[source]#
discovery.signals.getstart(psrs)[source]#
discovery.signals.fourierbasis(psr, components, T=None)[source]#
discovery.signals.dmfourierbasis(psr, components, T=None, fref=1400.0)[source]#
discovery.signals.dmfourierbasis_alpha(psr, components, T=None, fref=1400.0)[source]#
discovery.signals.dmfourierbasis_solar(psr, components, T=None)[source]#
discovery.signals.make_dmfourierbasis(alpha=2.0, tndm=False)[source]#
discovery.signals.makegp_fourier(psr, prior, components, T=None, mean=None, fourierbasis=<function fourierbasis>, common=[], exclude=['f', 'df'], name='fourierGP')[source]#
discovery.signals.makecommongp_fourier(psrs, prior, components, T, fourierbasis=<function fourierbasis>, means=None, common=[], exclude=['f', 'df'], vector=False, name='fourierCommonGP', meansname='meanFourierCommonGP')[source]#
discovery.signals.makegp_fourier_delay(psr, components, T=None, name='fourierGP')[source]#
discovery.signals.makegp_fourier_variance(psr, components, T=None, name='fourierGP', noisedict={})[source]#
discovery.signals.makegp_fourier_allpsr(psrs, prior, components, T=None, fourierbasis=<function fourierbasis>, common=[], name='allpsrFourierGP')[source]#
discovery.signals.makeglobalgp_fourier(psrs, priors, orfs, components, T, fourierbasis=<function fourierbasis>, means=None, common=[], exclude=['f', 'df'], name='fourierGlobalGP', meansname='meanFourierGlobalGP')[source]#
discovery.signals.makegp_fourier_global(psrs, priors, orfs, components, T, fourierbasis=<function fourierbasis>, means=None, common=[], exclude=['f', 'df'], name='fourierGlobalGP', meansname='meanFourierGlobalGP')#
discovery.signals.epochavgbasis(psr, components, T=None, dt=1.0)[source]#
discovery.signals.cov2cov(covfunc)[source]#
discovery.signals.makegp_avgcov(psr, prior, epochavgbasis=<function epochavgbasis>, common=[], name='avgcovGP')[source]#
discovery.signals.makecommongp_avgcov(psrs, prior, epochavgbasis=<function epochavgbasis>, common=[], vector=False, name='avgcovCommonGP')[source]#
discovery.signals.makeglobalgp_avgcov(psrs, prior, epochavgbasis=<function epochavgbasis>, common=[], vector=False, name='avgcovCommonGP')[source]#
discovery.signals.timeinterpbasis(psr, components, T=None, start_time=None)[source]#
discovery.signals.make_timeinterpbasis(start_time=None, order=1)[source]#
discovery.signals.make_dmtimeinterpbasis(alpha=2.0, tndm=False, start_time=None, order=1)[source]#
discovery.signals.psd2cov(psdfunc, components, T, oversample=3, fmax_factor=1, cutoff=1)[source]#
discovery.signals.makegp_fftcov(psr, prior, components, T=None, t0=None, order=1, oversample=3, fmax_factor=1, cutoff=1, fourierbasis=None, common=[], name='fftcovGP')[source]#
discovery.signals.makecommongp_fftcov(psrs, prior, components, T, t0=None, order=1, oversample=3, fmax_factor=1, cutoff=1, fourierbasis=None, common=[], vector=False, name='fftcovCommonGP')[source]#
discovery.signals.makeglobalgp_fftcov(psrs, prior, orf, components, T, t0, order=1, oversample=3, fmax_factor=1, cutoff=1, fourierbasis=None, name='fftcovGlobalGP')[source]#
discovery.signals.makegp_intcov(psr, prior, components, T=None, timeinterpbasis=<function timeinterpbasis>, common=[], name='intcovGP')[source]#
discovery.signals.makecommongp_intcov(psr, prior, components, T, timeinterpbasis=<function timeinterpbasis>, common=[], name='intcovCommonGP')[source]#
discovery.signals.makeglobalgp_intcov(psr, prior, orf, components, T, timeinterpbasis=<function timeinterpbasis>, common=[], name='intcovGlobalGP')[source]#
discovery.signals.powerlaw(f, df, log10_A, gamma)[source]#
discovery.signals.brokenpowerlaw(f, df, log10_A, gamma, log10_fb)[source]#
discovery.signals.freespectrum(f, df, log10_rho)[source]#
Parameters:

log10_rho (Sequence)

discovery.signals.make_combined_crn(components, irn_psd, crn_psd, crn_prefix='crn_')[source]#

Combine an intrinsic red noise PSD and a common red noise PSD into a single PSD function that shares the same Fourier basis.

The intrinsic red noise PSD is evaluated over the full frequency basis, while the common red noise PSD is added only to the first 2 * components frequency bins (sine and cosine for each component).

Parameters:
  • components (int) – Number of shared Fourier frequency components used by the CRN model. This determines how many low-frequency bins of the intrinsic basis receive the CRN contribution (specifically, the first 2 * components entries, corresponding to sine/cosine pairs). This is not the same as the components argument passed to makegp_fourier — that controls the total number of Fourier components in the basis for the GP (and may be larger, since the intrinsic noise can extend to higher frequencies than the CRN).

  • irn_psd (callable) – PSD function for the intrinsic red noise. Must accept (f, df, ...) and return a PSD array over the full basis.

  • crn_psd (callable) – PSD function for the common red noise. Must accept (f, df, ...) and return a PSD array. Will only be called on the first 2 * components frequency bins.

  • crn_prefix (str or None) – Prefix applied to CRN parameter names that overlap with IRN names. For example, if both PSDs have log10_A and crn_prefix='crn_', the combined function will have log10_A (IRN) and crn_log10_A (CRN) as separate parameters. If None, overlapping names are shared (both PSDs receive the same value), which is valid when you intentionally want tied parameters.

Returns:

  • combined (callable) – A PSD function whose signature is the union of irn_psd and crn_psd signatures (with CRN overlaps prefixed). Compatible with makegp_fourier: argument names are inspectable via getfullargspec, and typing.Sequence annotations are preserved for parameter expansion.

  • crn_params (list of str) – The parameter names (as they appear in combined’s signature) that belong to the CRN PSD. Pass these directly as the common argument to makegp_fourier or makecommongp_fourier so that the CRN parameters are shared across pulsars rather than given per-pulsar names.

    Example:

    combined, crn_params = make_combined_crn(14, ds.powerlaw, ds.powerlaw)
    gp = makegp_fourier(psr, combined, components=30, common=crn_params)
    

discovery.signals.makepowerlaw_crn(components, crn_gamma='variable')[source]#
discovery.signals.powerlaw_brokencrn(f, df, log10_A, gamma, crn_log10_A, crn_gamma, crn_log10_fb)[source]#
discovery.signals.brokenpowerlaw_brokencrn(f, df, log10_A, gamma, log10_fb, crn_log10_A, crn_gamma, crn_log10_fb)[source]#
discovery.signals.makefreespectrum_crn(components)[source]#
discovery.signals.uncorrelated_orf(pos1, pos2)[source]#
discovery.signals.hd_orf(pos1, pos2)[source]#
discovery.signals.monopole_orf(pos1, pos2)[source]#
discovery.signals.dipole_orf(pos1, pos2)[source]#
discovery.signals.makedelay(psr, delay, components=None, common=[], name='delay')[source]#
discovery.signals.getresiduals(y)[source]#