pyRing package

Submodules

pyRing.NR_amp module

class pyRing.NR_amp.Amp_KHS(eta, chi_eff)[source]

Bases: object

QNM real amplitudes fitting functions for remnant BHs resulting from the coalescence of two non-precessing progenitors in a quasi-circular orbit. References: https://arxiv.org/abs/1207.0399, https://arxiv.org/abs/1406.3201.

class pyRing.NR_amp.Amp_MMRDNP(eta, chi_s, chi_a, delta)[source]

Bases: object

QNM complex amplitudes fitting functions for remnant BHs resulting from the coalescence of two non-precessing progenitors in a quasi-circular orbit. Reference: https://arxiv.org/abs/1801.08208.

class pyRing.NR_amp.Amp_MMRDNS(eta)[source]

Bases: object

QNM complex amplitudes fitting functions for remnant BHs resulting from the coalescence of two non-spinning progenitors in a quasi-circular orbit. Reference: https://github.com/llondon6/kerr_public/blob/master/kerr/formula/mmrdns_amplitudes.py (the ones in the original publication https://arxiv.org/abs/1404.3197 are not up to date).

pyRing.eob_utils module

pyRing.inject_signal module

pyRing.inject_signal.TEOBPM_injection(**kwargs)[source]
pyRing.inject_signal.damped_sinusoids_injection(**kwargs)[source]
pyRing.inject_signal.inject_IMR_signal(lenstrain, tstart, length, ifo, triggertime, **kwargs)[source]
pyRing.inject_signal.inject_ringdown_signal(lenstrain, tstart, length, ifo, triggertime, **kwargs)[source]

Main function to set an injection using one of the analytical ringdown templates available. Handles parameters common to all templates.

pyRing.inject_signal.kerr_injection(**kwargs)[source]
pyRing.inject_signal.khs_injection(**kwargs)[source]
pyRing.inject_signal.mmrdnp_injection(**kwargs)[source]
pyRing.inject_signal.mmrdns_injection(**kwargs)[source]
pyRing.inject_signal.morlet_gabor_wavelets_injection(**kwargs)[source]

pyRing.likelihood module

pyRing.likelihood.inner_product_direct_inversion(ndarray vector1, ndarray vector2, ndarray inverse_covariance) double
pyRing.likelihood.loglikelihood(model, x, waveform_model, double ra, double dec, double psi, double t_start, dict time_delay, unicode ref_det, int truncate, int duration_n, unsigned int OnsourceACF=0, unsigned int Dirac_comb=0, unsigned int Zeroing_data=0, unicode likelihood_method=u'direct-inversion', unsigned int split_inner_prod=0) double
pyRing.likelihood.project(ndarray hs, ndarray hvx, ndarray hvy, ndarray hp, ndarray hc, detector, double ra, double dec, double psi, tgps) ndarray
pyRing.likelihood.residuals_inner_product_cholesky_solve_triangular(ndarray residuals, ndarray cholesky) double
pyRing.likelihood.residuals_inner_product_direct_inversion(ndarray residuals, ndarray inverse_covariance) double
pyRing.likelihood.residuals_inner_product_toeplitz_inversion(ndarray residuals, ndarray acf) double
pyRing.likelihood.toeplitz_slogdet(ndarray r) tuple

Method from Marano et al. “Fitting Earthquake Spectra: Colored Noise and Incomplete Data”, Bulletin of the Seismological Society of America, Vol. 107, No. 1, pp. –, February 2017, doi: 10.1785/0120160030 Code available here: http://mercalli.ethz.ch/~marra/publications/2017_fitting_earthquake_spectra_colored_noise_and_incomplete_data/ All credits go to the original authors.

Compute the log determinant of a positive-definite symmetric toeplitz matrix. The determinant is computed recursively. The intermediate solutions of the Levinson recursion are exploited.

Parameters:

r – first row of the Toeplitz matrix

Returns:

sign of the determinant logdet : natural log of the determinant

Return type:

sign

pyRing.likelihood.vector_module(ndarray X) double

pyRing.noise module

pyRing.noise.UNCHECKED_acf_finite(y, k)[source]

Estimate directly from the data y Weighting by 1/(N-i) for lag i where N=len(y) k specifies the desired size of the ACF, i.e. the number of samples in the on-source segment

pyRing.noise.UNCHECKED_acf_from_ideal_psd(ASDtxtfile, fmin, srate, T)[source]
pyRing.noise.UNCHECKED_estimated_acf(x)[source]
pyRing.noise.acf(y, fft=True, simple_norm=False)[source]

Returns the autocorrelation function (ACF): R[i] = sum_n x[n]*x[n+i], in the form of an array spanned by the index i.

Computes the ACF using either the standard correlation (with the appropriate normalisation) or the fft method. The latter simply exploits the fact that the ACF is a convolution product and that the Fourier transform of a a convolution product is a product in the Fourier domain, see section ‘Efficient computation’ of ‘https://en.wikipedia.org/wiki/Autocorrelation#cite_note-3.

The difference between the two methods is in the treatment of boundary terms. When computing the ACF using the standard correlation, we ‘slide’ the data vector against a delayed copy of itself, obtaining the correlation at different lags. For all lags except lag=0, part of the ‘slided’ vector will spill over the boundaries of the fixed vector. In this method, terms outside the vectors boundaries are assigned zeros. This implies that for increasing lag, an increasingly smaller number of terms will contribute, and the variance of large-lag terms grow. Also, the ACF will eventually go to zero, when the maximum lag is reached. When employing the fft method instead, the data are windowed at the boundaries to avoid Gibbs phenomena, and periodic boundary conditions are assumed when applying the Fourier transform, implying a different structure for large lags.

For small lags (compared to the total length of the vector), the portion of the sum which dependent on boundary terms will be small, since the vectors still possess a significant overlap, and the specific method used should not matter (if gaussianity and stationarity assumptions are respected). For this reason, the length of the data on which the ACF is estimated, should always be much larger than the analysis segment length.

pyRing.noise.add_injection(on_source_strain, strain, starttime, T, ifo, triggertime, index_trigtime, signal_seglen, kwargs)[source]
pyRing.noise.bandpass_data(rawstrain, f_min_bp, f_max_bp, srate_dt, bandpassing_flag)[source]
pyRing.noise.check_Plancherel_ratio(psd_window_norm, df_welch, psd_welch, dt, ACF, debug)[source]
pyRing.noise.check_chunksizes_consistency(signal_chunk_size, noise_chunk_size, truncate)[source]
pyRing.noise.check_covariance_matrix_inversion_stability(Covariance_matrix_signal, debug, tolerance=100000000000000.0)[source]
pyRing.noise.check_data_gaussianity(times, data, Covariance, signal_seglen, trigger_time, string_output, outdir)[source]
pyRing.noise.check_sampling_rate_compatibility(requested_sampling_rate, data_sampling_rate)[source]
pyRing.noise.check_seglen_compatibility(signal_chunk_size, noise_chunk_size, T)[source]
pyRing.noise.chisquare_computation(ACF, chisquare_flag)[source]
pyRing.noise.chunks(times, strain, chunksize, trigger_time)[source]
pyRing.noise.chunks_iterator(times, strain, chunksize, avoid=None, window=False, alpha=0.1)[source]

Divide the data in chunks. Skip the 0th and the last chunks which have filter ringing from downsampling.

pyRing.noise.compute_Welch_PSD(off_source_strain, srate, noise_seglen, psd_window)[source]
pyRing.noise.compute_acf_and_whitening_psd(times, strain, starttime, T, srate, triggertime, index_trigtime, dt, window_flag, alpha_window, noise_chunk_size, noise_seglen, signal_seglen, f_min_bp, f_max_bp, fft_acf, freqs_welch, psd_welch, ifo, kwargs)[source]
pyRing.noise.compute_maxent_PSD(times, strain, starttime, T, srate, triggertime, index_trigtime, dt, alpha_window, noise_seglen, signal_seglen, fft_acf, freqs_welch, psd_welch, ifo, kwargs)[source]
pyRing.noise.compute_on_off_source_strain(times, strain, signal_seglen, index_trigtime)[source]
class pyRing.noise.detector(ifo_name, datafile, **kwargs)[source]

Bases: object

pyRing.noise.downsample_data(strain, srate, srate_dt)[source]
pyRing.noise.excise_nans_from_strain(rawstrain, starttime, T, triggertime, signal_chunk_size, dt, ifo_datafile, download_data_flag)[source]
pyRing.noise.fetch_data(ifo, tstart, tend, channel=None, path=None, verbose=0, tag=None)[source]

Fetch data for a particular event

ifo: IFO name (‘H1’ etc) tstart, tend: start and end time to find path: Local path to save file. If file exists it will be read from disk rather than fetched channel: Channel to read from frame data. If ‘GWOSC’ will fetch open data verbose: Print some info

Returns a gwpy.TimeSeries object

pyRing.noise.load_data(ifo, fname, **kwargs)[source]

Reads the strain or downloads it using gwpy. Computes the ACF either from the directly data or from given file input ACF/PSD. Injects a template if requested.

pyRing.noise.mem_psd(freqs_LAL, dt, data, M_max)[source]
pyRing.noise.non_stationarity_check(acfs, dt)[source]
pyRing.noise.resize_nan_strain(strain, start_time, trig_time, onsource_length, dt)[source]
pyRing.noise.window_onsource_strain(on_source_strain, signal_seglen, noise_seglen, window_onsource_flag, window_flag, alpha_window, truncate)[source]

pyRing.plots module

pyRing.plots.FindHeightForLevel(inArr, adLevels)[source]
pyRing.plots.Kerr_Newman_intrinsic_corner(x, **input_par)[source]
pyRing.plots.Kerr_intrinsic_alpha_corner(x, **input_par)[source]
pyRing.plots.Kerr_intrinsic_braneworld_corner(x, **input_par)[source]
pyRing.plots.Kerr_intrinsic_corner(x, **input_par)[source]
pyRing.plots.MMRDNP_Mf_af_plot(x, **input_par)[source]
pyRing.plots.MMRDNP_amplitude_parameters_corner(x, **input_par)[source]
pyRing.plots.MMRDNP_intrinsic_corner(x, **input_par)[source]
pyRing.plots.MMRDNS_intrinsic_corner(x, **input_par)[source]
pyRing.plots.Mf_af_plot(samples, Mf_LAL_samples, af_LAL_samples, **input_par)[source]
pyRing.plots.SNR_plots(get_waveform, dets, fixed_params, tgps, params=None, **kwargs)[source]
pyRing.plots.TEOBPM_intrinsic_corner(x, **input_par)[source]
pyRing.plots.UNUSED_noise_evidence_density(t0_samples, noise_model)[source]
pyRing.plots.amplitudes_corner(x, **input_par)[source]
pyRing.plots.f0_t0_gr(samples_x, Mf_s, af_s, Num_mode, probs_flag=0, scatter_samples_flag=0, delta_QNM_plots=0, predictions_contour_flag=0, **kwargs)[source]
pyRing.plots.f_tau_amp_corner(x, **input_par)[source]
pyRing.plots.get_param_override(fixed_params, x, name)[source]

Function returning either a sample or the fixed value for the parameter considered.

Returns x[name], unless it is over-ridden by value in the fixed_params dictionary.

pyRing.plots.global_corner(x, names, output)[source]
pyRing.plots.init_plotting()[source]
pyRing.plots.mode_corner(samples, filename=None, **kwargs)[source]
pyRing.plots.omega_tau_eff_plot(x, **kwargs)[source]
pyRing.plots.orientation_corner(x, Config, **input_par)[source]
pyRing.plots.plot_ACF(time, acf, label, output_path)[source]
pyRing.plots.plot_ACF_compare(time1, acf1, label1, time2, acf2, label2, output_path)[source]
pyRing.plots.plot_NR_single_mode(t_geom, hr_geom, hi_geom, **kwargs)[source]
pyRing.plots.plot_PSD(freqs, psd, label, output_path)[source]
pyRing.plots.plot_PSD_compare(freqs1, psd1, label1, freqs2, psd2, label2, output_path)[source]
pyRing.plots.plot_contour(samples_stacked, level=[0.9], linest='dotted', label=None, color='k', line_w=1.2, plot_legend=1, zorder=None)[source]
pyRing.plots.plot_strain(get_waveform, dets, fixed_params, tgps, params=None, whiten_flag=False, whiten_method='TD', strain_only=0, **kwargs)[source]
pyRing.plots.read_Mf_af_IMR_posterior(Config, **input_par)[source]
pyRing.plots.single_time_delay_plots(dt_vec, **input_par)[source]
pyRing.plots.sky_location_plots(x, Config, **input_par)[source]
pyRing.plots.t_start_plot(t0_ds, Mf, **input_par)[source]
pyRing.plots.tick_function(X)[source]

pyRing.pyRing module

class pyRing.pyRing.DampedSinusoids(**kwargs)[source]

Bases: RingDownModel

Class implementing a superposition of damped sinusoids as ringdown model. Frequency, damping time, amplitude and phase are sampled over for each mode.

get_waveform(x)[source]
log_prior(x)[source]

Returns log of prior. Default is flat prior within bounds

class pyRing.pyRing.IMR_Ringdown_Model(**kwargs)[source]

Bases: RingDownModel

Class implementing a non-precessing ringdown model extracted from LAL IMR waveforms.

get_waveform(x)[source]
log_prior(x)[source]

Returns log of prior. Default is flat prior within bounds

class pyRing.pyRing.KHS_2012Model(**kwargs)[source]

Bases: RingDownModel

Class implementing the KHS_2012 waveform as ringdown model (valid for spinning, non-precessing progenitors). Frequencies and damping times of the specified (l,m,n) modes are fixed as a function of the mass and spin of the remnant BH. Relative amplitudes and phases are fixed as a function of the symmetric mass ratio and effective spin. References: https://arxiv.org/abs/1207.0399, https://arxiv.org/abs/1406.3201

get_waveform(x)[source]
log_prior(x)[source]

Returns log of prior. Default is flat prior within bounds

class pyRing.pyRing.KerrModel(modes=[(2, 2, 2, 0)], **kwargs)[source]

Bases: RingDownModel

Class implementing a Kerr waveform as ringdown model. Frequencies and damping times of the specified (s,l,m,n) modes are fixed as a function of the mass and spin of the remnant BH. Relative amplitudes and phases of the modes are instead free to vary.

amp_phi_names()[source]
get_cplx_amp(x, s, l, m, n)[source]
get_waveform(x)[source]
log_prior(x)[source]

Returns log of prior. Default is flat prior within bounds

static modename(s, l, m, n)[source]

Returns “slmn”

class pyRing.pyRing.LIGOVirgoModel(**kwargs)[source]

Bases: Model

Parent class for all the models used in the package. Reads the data and sets sky position parameters common to all waveform models.

class pyRing.pyRing.MMRDNPModel(**kwargs)[source]

Bases: RingDownModel

Class implementing the MMRDNP waveform as ringdown model (valid for spinning, non-precessing progenitors). Reference: https://arxiv.org/pdf/1801.08208.pdf Technical notes: https://github.com/llondon6/kerr_public/blob/master/notes/ns/mmrd.pdf

get_waveform(x)[source]
log_prior(x)[source]

Returns log of prior. Default is flat prior within bounds

class pyRing.pyRing.MMRDNSModel(**kwargs)[source]

Bases: RingDownModel

Class implementing the MMRDNS waveform as ringdown model (valid for non-spinning progenitors). Frequencies and damping times of the specified (l,m,n) modes are fixed as a function of the mass and spin of the remnant BH. Relative amplitudes and phases are fixed as a function of the symmetric mass ratio. Reference: https://arxiv.org/pdf/1404.3197.pdf

get_waveform(x)[source]
log_prior(x)[source]

Returns log of prior. Default is flat prior within bounds

class pyRing.pyRing.MorletGaborWavelets(**kwargs)[source]

Bases: RingDownModel

Class implementing a superposition of Morlet-Gabor-wavelets as waveform model. Frequency, damping time, amplitude and phase are sampled over for each mode.

get_waveform(x)[source]
log_prior(x)[source]

Returns log of prior. Default is flat prior within bounds

class pyRing.pyRing.RingDownModel(**kwargs)[source]

Bases: LIGOVirgoModel

Parent class for all ringdown models. Sets common time prior and likelihood.

log_likelihood(x)[source]

returns log likelihood of given parameter

class pyRing.pyRing.TEOBPMModel(**kwargs)[source]

Bases: RingDownModel

Class implementing the EOBPM waveform as post-merger model (valid for non-precessing progenitors). References: arXiv: 1406.0401, 1606.03952, 2001.09082.

get_waveform(x)[source]
log_prior(x)[source]

Returns log of prior. Default is flat prior within bounds

pyRing.pyRing.get_param_override(fixed_params, x, name)[source]

Function returning either a sample or the fixed value for the parameter considered.

Returns x[name], unless it is over-ridden by value in the fixed_params dictionary.

pyRing.pyRing.main()[source]
pyRing.pyRing.read_parameter_bounds(Config, configparser, kwargs, name, default_bounds, approx_name, extra_polarisation=None)[source]

pyRing.utils module

pyRing.utils.A_mrg_Bohe(m1, m2, a1, a2)[source]
pyRing.utils.A_mrg_Healy(m1, m2, a1, a2)[source]
pyRing.utils.A_mrg_Nagar(m1, m2, a1, a2)[source]
pyRing.utils.EsGB_corrections(name)[source]
pyRing.utils.F_mrg_Bohe(m1, m2, a1, a2)[source]
pyRing.utils.F_mrg_Healy(m1, m2, a1, a2)[source]
pyRing.utils.F_mrg_Nagar(m1, m2, a1, a2)[source]
pyRing.utils.F_mrg_Nagar_v0(m1, m2, a1, a2)[source]
class pyRing.utils.UNUSED_NR_waveform(**kwargs)[source]

Bases: object

pyRing.utils.UNUSED_inject_NR_signal(lenstrain, tstart, length, ifo, triggertime, **kwargs)[source]
pyRing.utils.bandpass_around_ringdown(strain, dt, f_min, mf, alpha_window=0.1)[source]
pyRing.utils.check_NR_dir()[source]
pyRing.utils.chi_eff(q, a1, a2)[source]
pyRing.utils.cholesky_logdet_C(covariance)[source]
pyRing.utils.compute_SNR_FD(data, template, psd, df)[source]
pyRing.utils.compute_SNR_TD(data, template, weights, method='direct-inversion')[source]
pyRing.utils.eta(m1, m2)[source]
pyRing.utils.final_state_surfinBH(Mtot, q, chi1, chi2, f_ref)[source]
pyRing.utils.import_datafile_path(filename)[source]
pyRing.utils.inner_product_FD(h1, h2, psd, df)[source]
pyRing.utils.inner_product_TD(h1, h2, InvCov)[source]
pyRing.utils.m1_from_m_q(m, q)[source]
pyRing.utils.m1_from_mc_q(mc, q)[source]
pyRing.utils.m2_from_m_q(m, q)[source]
pyRing.utils.m2_from_mc_q(mc, q)[source]
pyRing.utils.mc(m1, m2)[source]
pyRing.utils.mtot(m1, m2)[source]
pyRing.utils.print_out_of_bounds_warning(name)[source]
pyRing.utils.print_section(name)[source]
pyRing.utils.print_subsection(name)[source]
pyRing.utils.q(m1, m2)[source]
pyRing.utils.qnm_interpolate(s, l, m, n)[source]
pyRing.utils.qnm_interpolate_KN(s, l, m, n)[source]
pyRing.utils.qnm_interpolate_braneworld(s, l, m, n)[source]
pyRing.utils.railing_check(samples, prior_bins, tolerance)[source]
pyRing.utils.resize_time_series(inarr, N, dt, starttime, desiredtc)[source]

Zero pad inarr and align its peak to the desired tc in the segment.

pyRing.utils.review_warning()[source]
pyRing.utils.set_prefix(warning_message=True)[source]

Set pyRing

pyRing.utils.whiten_FD(strain, interp_psd, dt, f_min, f_max)[source]
pyRing.utils.whiten_TD(x, cholesky_L, method='solve-triangular')[source]

pyRing.waveform module

class pyRing.waveform.Damped_sinusoids

Bases: object

Class implementing a superposition of Damped Sinusoids of arbitrary polarisation.

A

dict

Type:

A

N

dict

Type:

N

f

dict

Type:

f

phi

dict

Type:

phi

t0

dict

Type:

t0

tau

dict

Type:

tau

waveform(self, ndarray t) ndarray
Returns five polarisations (the ones independent in a L-shaped GW detector, see https://arxiv.org/abs/1710.03794) allowed for a metric theory of gravity: hs (scalar mode), {hvx, hvy} (vector modes), {hp, hc} (tensor modes).
We employ the conventions:
h_s = sum_{i} A_i * cos(omega*t+phi) * e^(-(t-t^{start}_i/tau)
h_vx - i h_vy = sum_{i} A_i * e^(i*omega*t+phi) * e^(-(t-t^{start}_i/tau)
h_+ - i h_x = sum_{i} A_i * e^(i*omega*t+phi) * e^(-(t-t^{start}_i/tau)
class pyRing.waveform.IMR_WF

Bases: object

Call an IMR waveform from LAL

cosiota

‘double’

Type:

cosiota

dist

‘double’

Type:

dist

dt

‘double’

Type:

dt

m1

‘double’

Type:

m1

m2

‘double’

Type:

m2

phi

‘double’

Type:

phi

s1z

‘double’

Type:

s1z

s2z

‘double’

Type:

s2z

signal_seglen

‘double’

Type:

signal_seglen

starttime

‘double’

Type:

starttime

t0

‘double’

Type:

t0

waveform(self, ndarray times) ndarray
class pyRing.waveform.KHS_2012

Bases: object

Multi mode ringdown non-precessing model.
M_tot is the initial total mass of the binary, m_i the single mass, chi_i the single spin.
In this model t=0 corresponds to 20M after the merger.

Input parameters:
t0 : start time of the ringdown
Mf : final mass in solar masses
af : dimensionless final spin
eta : symmetric mass ratio of the progenitors
chi_eff : symmetric spin of the progenitors (defined as: 1/2*(sqrt(1-4*nu) chi1 + (m1*chi1 - m2*chi2)/(m1+m2)))
r : distance in Mpc
iota : inclination in radians
phi : azimuthal angle in radians

Optional parameters:
single_l, single_n : select a specific mode
single_mode : flag to request only a specific mode
Mf

‘double’

Type:

Mf

TGR_params

dict

Type:

TGR_params

af

‘double’

Type:

af

chi_eff

‘double’

Type:

chi_eff

eta

‘double’

Type:

eta

iota

‘double’

Type:

iota

multipoles

list

Type:

multipoles

phi

‘double’

Type:

phi

r

‘double’

Type:

r

single_l

‘int’

Type:

single_l

single_m

‘int’

Type:

single_m

single_mode

‘unsigned int’

Type:

single_mode

t0

‘double’

Type:

t0

waveform(self, ndarray times) ndarray

Returns h_+ - i* h_x

class pyRing.waveform.KerrBH

Bases: object

Multi mode ringdown model for a Kerr black hole using predictions of the frequencies and damping times as function of mass and spin, as predicted by perturbation theory.

Input parameters:
t0 : Start time of the ringdown, currently common for all modes. #IMPROVEME: allow for a different start time for each mode.
Mf : Final mass in solar masses.
af : Dimensionless final spin.
amps : Amplitudes of the modes.
r : Distance in Mpc.
iota : Inclination in radians.
phi : Azimuthal angle in radians.

Optional parameters:
TGR_params : Additional non-GR parameters to be sampled.
reference_amplitude : Value with which to replace the Mf/r prefactor.
geom : Flag to compute only the h_{l,m} modes, without spherical harmonics.
qnm_fit : Flag to request the use of an interpolation for QNM complex frequency, instead of analytical fits (not available for n>2)
interpolants : QNM complex frequencies interpolants.
Spheroidal : Flag to activate the use of spheroidal harmonics instead of spherical. Relies on the pykerr package.
AreaQuantization : Flag to use a prescription to impose QNM frequencies derived from the area quantisation proposal.
ParSpec : Flag to use the ParSpec parametrisation of beyond-GR modifications to QNMs.
charge : Flag to include the effect of charge.
braneworld : Flag to include the effect of charge in the braneworld scenario.
AreaQuantization

‘unsigned int’

Type:

AreaQuantization

Mf

‘double’

Type:

Mf

ParSpec

‘unsigned int’

Type:

ParSpec

Spheroidal

‘unsigned int’

Type:

Spheroidal

TGR_params

dict

Type:

TGR_params

af

‘double’

Type:

af

amp_non_prec_sym

‘unsigned int’

Type:

amp_non_prec_sym

amps

dict

Type:

amps

braneworld

‘unsigned int’

Type:

braneworld

charge

‘unsigned int’

Type:

charge

geom

‘unsigned int’

Type:

geom

interpolants

dict

Type:

interpolants

iota

‘double’

Type:

iota

phi

‘double’

Type:

phi

qnm_fit

‘unsigned int’

Type:

qnm_fit

qnms

dict

Type:

qnms

qnms_ParSpec

dict

Type:

qnms_ParSpec

r

‘double’

Type:

r

reference_amplitude

‘double’

Type:

reference_amplitude

swshs

dict

Type:

swshs

t0

‘double’

Type:

t0

waveform(self, ndarray times) ndarray
We employ the conventions of arXiv:gr-qc/0512160 (Eq. 2.9):
h_s = Re(sum_{lmn} S_{lmn} h_{lmn})
h_vx + i h_vy = sum_{lmn} S_{lmn} h_{lmn}
h_+ + i h_x = sum_{lmn} S_{lmn} h_{lmn}
Non-precessing symmetry implies the property: h_{l,-m} = (-1)**l h^*_{l,m}
(see: Blanchet, “Gravitational Radiation from Post-Newtonian Sources and Inspiralling Compact Binaries”).
class pyRing.waveform.MMRDNP

Bases: object

Multi mode ringdown non-precessing model.
Mi is the initial total mass of the binary, m_i the single masses, chi_i the single spins.
The model was calibrated such that t=0 corresponds to 20M after |\dot{h}_22| peak.

Input parameters:
t0 : Start time of the ringdown.
Mf : Final mass in solar masses.
af : Dimensionless final spin.
Mi : Initial mass in solar masses.
eta : Symmetric mass ratio of the progenitors.
chi_s : (m_1*chi_1 + m_2*chi_2)/M_tot
chi_a : (m_1*chi_1 - m_2*chi_2)/M_tot
r : Distance in Mpc.
iota : Inclination in radians.
phi : Azimuthal angle in radians.

Optional parameters:
TGR_params : Additional non-GR parameters to be sampled.
single_mode : Flag requesting a single specific mode.
single_l, single_m : Indices of the specific mode to be used. Requires single_mode=True in order to be used.
geom : Flag to compute only the h_{l,m} modes, without spherical harmonics.
Mf

‘double’

Type:

Mf

Mi

‘double’

Type:

Mi

TGR_params

dict

Type:

TGR_params

af

‘double’

Type:

af

chi_a

‘double’

Type:

chi_a

chi_s

‘double’

Type:

chi_s

delta

‘double’

Type:

delta

eta

‘double’

Type:

eta

geom

‘unsigned int’

Type:

geom

interpolants

dict

Type:

interpolants

iota

‘double’

Type:

iota

multipoles

dict

Type:

multipoles

phi

‘double’

Type:

phi

qnm_fit

‘unsigned int’

Type:

qnm_fit

r

‘double’

Type:

r

single_l

‘int’

Type:

single_l

single_m

‘int’

Type:

single_m

single_mode

‘unsigned int’

Type:

single_mode

t0

‘double’

Type:

t0

waveform(self, ndarray times) ndarray

We employ the convention: h_+ - i h_x = sum_{lm} Y_{lm} h_{lm} Non-precessing symmetry implies the property: h_{l,-m} = (-1)**l h^*_{l,m} (see: Blanchet, “Gravitational Radiation from Post-Newtonian Sources and Inspiralling Compact Binaries”). This model does not support extra scalar/vector polarisations, which are set to zero.

class pyRing.waveform.MMRDNS

Bases: object

Multi mode ringdown model from non-spinning progenitors.

Input parameters:
t0 : Start time of the ringdown.
Mf : Final mass in solar masses.
af : Dimensionless final spin.
eta : Symmetric mass ratio of the progenitors.
r : Distance in Mpc.
iota : Inclination in radians.
phi : Azimuthal angle in radians.

Optional parameters:
TGR_params : Additional non-GR parameters to be sampled.
single_mode : Flag to request a single specific mode.
single_l, single_m, single_n : Indices of the specific mode to be selected. Requires single_mode = True in order to be read.
Spheroidal : Flag to activate the use of spheroidal harmonics instead of spherical. Relies on the pykerr package.
qnm_fit : Flag to request the use of an interpolation for QNM complex frequency, instead of analytical fits (not available for n>2)
interpolants : QNM complex frequencies interpolants.
Mf

‘double’

Type:

Mf

Spheroidal

‘unsigned int’

Type:

Spheroidal

TGR_params

dict

Type:

TGR_params

af

‘double’

Type:

af

eta

‘double’

Type:

eta

interpolants

dict

Type:

interpolants

iota

‘double’

Type:

iota

multipoles

list

Type:

multipoles

phi

‘double’

Type:

phi

qnm_fit

‘unsigned int’

Type:

qnm_fit

r

‘double’

Type:

r

single_l

‘int’

Type:

single_l

single_m

‘int’

Type:

single_m

single_mode

‘unsigned int’

Type:

single_mode

single_n

‘int’

Type:

single_n

t0

‘double’

Type:

t0

waveform(self, ndarray times) ndarray
We employ the convention h_+ - i h_x = sum_{lmn} S_{lmn} h_{lmn}
Non-precessing symmetry implies the property: h_{l,-m} = (-1)**l h^*_{l,m}
(see: Blanchet, “Gravitational Radiation from Post-Newtonian Sources and Inspiralling Compact Binaries”).
This model does not support extra scalar/vector polarisations, which are set to zero.
class pyRing.waveform.Morlet_Gabor_wavelets

Bases: object

A

dict

Type:

A

N

dict

Type:

N

f

dict

Type:

f

phi

dict

Type:

phi

t0

dict

Type:

t0

tau

dict

Type:

tau

waveform(self, ndarray t) ndarray

Returns five polarisations (the ones independent in a L-shaped GW detector) allowed for a metric theory of gravity: hs (scalar mode), {hvx, hvy} (vector modes), {hp, hc} (tensor modes). We employ the conventions: h_s = sum_{i} A_i * cos(omega*t+phi) * e^(-(t-t^{start}_i/tau)

h_vx - i h_vy = sum_{i} A_i * e^(i*omega*t+phi) * e^(-(t-t^{start}_i/tau) h_+ - i h_x = sum_{i} A_i * e^(i*omega*t+phi) * e^(-(t-t^{start}_i/tau)

class pyRing.waveform.QNM

Bases: object

f(self, double M, double a) double
f_BW(self, double M, double a, double beta) double
f_KN(self, double M, double a, double Q) double
l

‘unsigned int’

Type:

l

m

‘int’

Type:

m

n

‘unsigned int’

Type:

n

omegai_interp

object

Type:

omegai_interp

omegar_interp

object

Type:

omegar_interp

s

‘unsigned int’

Type:

s

tau(self, double M, double a) double
tau_BW(self, double M, double a, double beta) double
tau_KN(self, double M, double a, double Q) double
class pyRing.waveform.QNM_220_area_quantized

Bases: object

f_QA(self, double M, double a, double alpha) double
l_QA

‘unsigned int’

Type:

l_QA

m_QA

‘int’

Type:

m_QA

n_QA

‘unsigned int’

Type:

n_QA

q_GR(self, double a) double
q_coeff_GR

object

Type:

q_coeff_GR

tau_QA(self, double M, double a, double alpha) double
class pyRing.waveform.QNM_ParSpec

Bases: object

f(self, double M, double a, double gamma, ndarray dw_vec) double
f_coeff

object

Type:

f_coeff

l

‘unsigned int’

Type:

l

m

‘int’

Type:

m

n

‘unsigned int’

Type:

n

tau(self, double M, double a, double gamma, ndarray dt_vec) double
tau_coeff

object

Type:

tau_coeff

class pyRing.waveform.QNM_braneworld_fit

Bases: object

f_BW(self, double M, double a, double beta) double
l_BW

‘unsigned int’

Type:

l_BW

m_BW

‘int’

Type:

m_BW

n_BW

‘unsigned int’

Type:

n_BW

q_BW(self, double a, double beta) double
tau_BW(self, double M, double a, double beta) double
class pyRing.waveform.QNM_fit

Bases: object

charge

‘unsigned int’

Type:

charge

f(self, double M, double a) double
f_KN(self, double M, double a, double Q) double
f_coeff

object

Type:

f_coeff

l

‘unsigned int’

Type:

l

m

‘int’

Type:

m

n

‘unsigned int’

Type:

n

q(self, double a) double
q_KN(self, double a, double Q) double
q_coeff

object

Type:

q_coeff

tau(self, double M, double a) double
tau_KN(self, double M, double a, double Q) double
class pyRing.waveform.SWSH(int s, int l, int m)

Bases: object

Spin weighted spherical harmonics -s_Y_{lm} Defined in Kidder (https://arxiv.org/pdf/0710.0614.pdf) Eq.s (4, 5). Note that this function returns -s_Y_{l,m} as defined by Kidder. Thus, for gravitational perturbation s=2 must be passed.

evaluate(self, double theta, double phi) double complex

SWSH for angles theta [0,pi] and phi [0,2pi]

l

‘int’

Type:

l

m

‘int’

Type:

m

s

‘int’

Type:

s

swsh_prefactor

‘double’

Type:

swsh_prefactor

class pyRing.waveform.TEOBPM

Bases: object

Post-merger EOB model
References: arxiv.1406.0401, arXiv:1606.03952, arXiv:2001.09082.

Input parameters:
t0 : start time of the waveform (s)
m1 : heavier BH mass (solar masses)
m2 : lighter BH mass (solar masses)
chi1 : heavier BH spin (adimensional)
chi2 : lighter BH spin (adimensional)
phases : phases of modes at peak (rad)
r : distance (Mpc)
iota : inclination (rad)
phi : azimuthal angle (rad)

Optional parameters:
TGR_params : Additional non-GR parameters to be sampled.
single_l, single_m : select a specific mode
single_mode : flag to request only a specific mode
geom : Flag to compute only the h_{l,m} modes, without spherical harmonics.
EOBPM_SetupFitCoefficients(self, int l, int m)
JimenezFortezaRemnantMass(self)
JimenezFortezaRemnantSpin(self)
M

‘double’

Type:

M

Mf

‘double’

Type:

Mf

S_bar(self)
S_hat(self)
Sbar

‘double’

Type:

Sbar

Shat

‘double’

Type:

Shat

TEOBPM_Amplitude(self, double tau, double sigma_real, double a1, double a2, double a3, double a4)
TEOBPM_Phase(self, double tau, double sigma_imag, double phi_fundamental, double p1, double p2, double p3, double p4)
TEOBPM_single_multipole(self, ndarray time, double tlm, double philm, int l, int m, int N)
TGR_params

dict

Type:

TGR_params

X12

‘double’

Type:

X12

X_12(self)
a12

‘double’

Type:

a12

aK

‘double’

Type:

aK

a_12(self)
a_K(self)
af

‘double’

Type:

af

alpha1(self, int l, int m)
alpha21(self, int l, int m)
amplitude_peak(self, double omega_peak, int l, int m)
c3_A(self, int l, int m)
c3_phi(self, int l, int m)
c4_phi(self, int l, int m)
dOmega(self, double omega1, double omega_peak)
fit_coefficients

dict

Type:

fit_coefficients

geom

‘unsigned int’

Type:

geom

iota

‘double’

Type:

iota

m1

‘double’

Type:

m1

m2

‘double’

Type:

m2

multipoles

list

Type:

multipoles

nu

‘double’

Type:

nu

omega1(self, int l, int m)
omega_peak(self, int l, int m)
phases

dict

Type:

phases

phi

‘double’

Type:

phi

r

‘double’

Type:

r

s1z

‘double’

Type:

s1z

s2z

‘double’

Type:

s2z

single_l

‘int’

Type:

single_l

single_m

‘int’

Type:

single_m

single_mode

‘unsigned int’

Type:

single_mode

sym_mass_ratio(self)
t0

‘double’

Type:

t0

waveform(self, ndarray times)

Module contents