Eccentricity Measures

PN eccentricity evolution

gwModels.ecc_measures.pn_eccentricity.compute_tau(t, q, tc=0, t_ref=None)[source]

Compute dimensionless time variables tau and tau_0.

Parameters:
  • t (array_like) – Time array.

  • q (float) – Mass ratio (q >= 1).

  • tc (float) – Time of coalescence. Default 0.

  • t_ref (float) – Reference time. If None, uses t[0].

Returns:

tau, tau_0, eta

gwModels.ecc_measures.pn_eccentricity.Newtonian_e_t(t, e_0, q, tc=0, t_ref=None)[source]

Newtonian (leading-order) eccentricity evolution. Page 41, Eq C1 of arXiv:1605.00304 (Moore, Favata & Arun 2016).

Parameters:
  • t (array_like) – Time array.

  • e_0 (float) – Reference eccentricity at t_ref.

  • q (float) – Mass ratio (q >= 1).

  • tc (float) – Time of coalescence. Default 0.

  • t_ref (float) – Reference time. If None, uses t[0].

Returns:

Eccentricity evolution e(t).

Return type:

array

gwModels.ecc_measures.pn_eccentricity.PN2_e_t(t, e_0, q, tc=0, t_ref=None)[source]

2PN eccentricity evolution. Page 41, Eq C1 of arXiv:1605.00304 (Moore, Favata & Arun 2016), truncated at 2PN order (test-mass limit: eta-independent terms only).

Parameters:
  • t (array_like) – Time array.

  • e_0 (float) – Reference eccentricity at t_ref.

  • q (float) – Mass ratio (q >= 1).

  • tc (float) – Time of coalescence. Default 0.

  • t_ref (float) – Reference time. If None, uses t[0].

Returns:

Eccentricity evolution e(t).

Return type:

array

gwModels.ecc_measures.pn_eccentricity.PN3_e_t(t, e_0, q, tc=0, t_ref=None)[source]

3PN eccentricity evolution. Page 41, Eq C1 of arXiv:1605.00304 (Moore, Favata & Arun 2016).

Parameters:
  • t (array_like) – Time array.

  • e_0 (float) – Reference eccentricity at t_ref.

  • q (float) – Mass ratio (q >= 1).

  • tc (float) – Time of coalescence. Default 0.

  • t_ref (float) – Reference time. If None, uses t[0].

Returns:

Eccentricity evolution e(t).

Return type:

array

Eccentricity from modulations

class gwModels.ecc_measures.ecc_from_modulations.ComputeEccentricityFromModulations(time_xi, xi, q, t_ref=None, ecc_prefactor=None, distance_btw_peaks=100, fit_funcs_orders=None, include_zero_zero=False, set_unphysical_xi_to_zero=False, set_unphysical_ecc_to_zero=False, tc=0)[source]

Bases: object

Class to compute eccentricity using eccentric modulation parameter.

__init__(time_xi, xi, q, t_ref=None, ecc_prefactor=None, distance_btw_peaks=100, fit_funcs_orders=None, include_zero_zero=False, set_unphysical_xi_to_zero=False, set_unphysical_ecc_to_zero=False, tc=0)[source]
Parameters:
  • time_xi – time axis

  • xi – common modulation parameter

  • q – mass ratio (q>=1)

  • t_ref – reference time to compute eccentricity

  • ecc_prefactor – pre-factor in eccentricity definition; default is 2/3

  • distance_btw_peaks – distance between peaks for PeakFinderScipy; default: 100

  • fit_funcs_orders – list of two strings specifying the PN fit orders for the upper and lower xi envelopes, respectively. Available options: ‘2PN’, ‘3PN’, ‘3PN_m1over8’, ‘3PN_m7over8’, ‘3PN_m8over8’, ‘3PN_m1over8_m8over8’, ‘3PN_m1over8_m7over8’, ‘3PN_m7over8_m8over8’, ‘3PN_m1over8_m7over8_m8over8’. Default: [‘3PN_m1over8’, ‘3PN_m1over8’]

  • include_zero_zero – if True, include (t=0, y=0) to extrema lists

  • set_unphysical_xi_to_zero – if True, set negative/NaN values in fitted xi to zero

  • set_unphysical_ecc_to_zero – if True, set negative/NaN values in fitted eccentricity to zero

  • tc – time at merger; default is zero

Newtonian_e_t(t, e_0, q, tau_0=None)[source]

Newtonian eccentricity evolution.

PN_order2_e_t(t, e_0, q, tau_0=None)[source]

2PN eccentricity evolution.

PN_e_t(t, e_0, q, tau_0=None)[source]

3PN eccentricity evolution.

PNorder_to_func_translation(order)[source]

Translate fit function PN order string to fit function callable.

fit_func_2PN(t, e_0)[source]
fit_func_3PN(t, e_0)[source]
fit_func_3PN_m1over8(t, e_0, A1)[source]
fit_func_3PN_m7over8(t, e_0, A7)[source]
fit_func_3PN_m8over8(t, e_0, A8)[source]
fit_func_3PN_m1over8_m8over8(t, e_0, A1, A8)[source]
fit_func_3PN_m1over8_m7over8(t, e_0, A1, A7)[source]
fit_func_3PN_m7over8_m8over8(t, e_0, A7, A8)[source]
fit_func_3PN_m1over8_m7over8_m8over8(t, e_0, A1, A7, A8)[source]
plot_xi(figsize=(8, 5))[source]
plot_xi_with_peaks(figsize=(8, 5))[source]
plot_maximas_fit(figsize=(8, 5))[source]
plot_minimas_fit(figsize=(8, 5))[source]
plot_fit_errors(figsize=(8, 5))[source]
plot_xi_with_peaks_and_fits(figsize=(8, 5))[source]
plot_maximas_and_minimas_fit(figsize=(8, 5))[source]
plot_maximas_minimas_and_avg_fit(figsize=(8, 5))[source]
plot_eccentricity(figsize=(8, 5))[source]
class gwModels.ecc_measures.ecc_from_modulations.ComputeEccentricity(t_ecc=None, h_ecc_dict=None, t_cir=None, h_cir_dict=None, q=None, t_ref=None, ecc_prefactor=None, distance_btw_peaks=None, fit_funcs_orders=None, include_zero_zero=False, set_unphysical_xi_to_zero=False, set_unphysical_ecc_to_zero=True, method='xi_amp', use_xi_amp_to_get_xi_freq=False, tc=0, t_buffer=0, framework_cls=None)[source]

Bases: object

Class to compute eccentricity using 22 mode eccentric and circular waveforms.

This is a convenience wrapper that: 1. Computes modulations via a framework class (NRHME or NRXHME) 2. Delegates eccentricity extraction to ComputeEccentricityFromModulations

__init__(t_ecc=None, h_ecc_dict=None, t_cir=None, h_cir_dict=None, q=None, t_ref=None, ecc_prefactor=None, distance_btw_peaks=None, fit_funcs_orders=None, include_zero_zero=False, set_unphysical_xi_to_zero=False, set_unphysical_ecc_to_zero=True, method='xi_amp', use_xi_amp_to_get_xi_freq=False, tc=0, t_buffer=0, framework_cls=None)[source]
Parameters:
  • t_ecc – time array for the eccentric 22 mode waveform

  • h_ecc_dict – dictionary of eccentric waveform modes (should contain 22 mode)

  • t_cir – time array for the circular waveform modes

  • h_cir_dict – dictionary of circular non-spinning waveform modes

  • q – mass ratio (q>=1)

  • t_ref – reference time to compute eccentricity

  • ecc_prefactor – pre-factor in eccentricity definition; default is 2/3

  • distance_btw_peaks – distance between peaks for PeakFinderScipy

  • fit_funcs_orders – list of two strings specifying the PN fit orders for the upper and lower xi envelopes, respectively. Available options: ‘2PN’, ‘3PN’, ‘3PN_m1over8’, ‘3PN_m7over8’, ‘3PN_m8over8’, ‘3PN_m1over8_m8over8’, ‘3PN_m1over8_m7over8’, ‘3PN_m7over8_m8over8’, ‘3PN_m1over8_m7over8_m8over8’. Default: [‘3PN_m1over8’, ‘3PN_m1over8’]

  • include_zero_zero – if True, include (t=0, y=0) to extrema lists

  • set_unphysical_xi_to_zero – if True, set negative/NaN in fitted xi to zero

  • set_unphysical_ecc_to_zero – if True, set negative/NaN in fitted eccentricity to zero

  • method – ‘xi_amp’ or ‘xi_freq’

  • use_xi_amp_to_get_xi_freq – if True, compute freq modulation from amp modulation

  • tc – time at merger; default is zero

  • t_buffer – buffer time for common time grid

  • framework_cls – framework class to use for modulation extraction. Default is NRHME (non-spinning). Use NRXHME for non-precessing.

Eccentricity from orbital frequency

class gwModels.ecc_measures.ecc_from_omega.ComputeEccentricityFromOmega(time_xi, xi_lower, xi_upper, gwnrhme_obj, ecc_prefactor, t_ref)[source]

Bases: object

Class to compute smooth eccentricity using eccentric modulation parameter.

compute_omega_22_ecc()[source]

Compute 22 mode frequency of the eccentric waveform.

compute_omega_22_cir()[source]

Compute 22 mode frequency of the circular waveform.

compute_omega_22_periastron()[source]

Compute omega_22 at periastron from xi parameter.

compute_omega_22_apastron()[source]

Compute omega_22 at apastron from xi parameter.

compute_ecc_omega_22()[source]

Compute ecc_omega_22 eccentricity. Based on Eq(5) of https://arxiv.org/pdf/2209.03390

compute_psi()[source]

Compute psi transformation to have correct Newtonian limit at the leading order. Based on Eq(6b) of https://arxiv.org/pdf/2209.03390

compute_ecc_gw()[source]

Compute e_gw. Based on Eq(6a) of https://arxiv.org/pdf/2209.03390

plot_eccentricities(figsize=(8, 5))[source]
plot_omega_22_with_peaks_and_fits(figsize=(8, 5))[source]

Initial eccentricity

gwModels.ecc_measures.initial_eccentricity.compute_et_harmonic_3PN(Eb, L, eta)[source]

Compute the initial time-eccentricity e_t in harmonic coordinates at 3PN order for nonspinning compact binaries using the generalized quasi-Keplerian parametrization.

Eq(A120) of arXiv:2409.17636, based on Memmesheimer, Gopakumar, and Schaefer, Phys. Rev. D 70, 104011 (2004).

Parameters:
  • Eb (float) – Orbital binding energy (negative for bound orbits).

  • L (float) – Orbital angular momentum.

  • eta (float) – Symmetric mass ratio, eta = m1*m2/(m1+m2)^2.

Returns:

The time-eccentricity e_t in harmonic coordinates.

Return type:

float

gwModels.ecc_measures.initial_eccentricity.compute_et_ADM_2PN(Eb, L, eta, chi1=0.0, chi2=0.0)[source]

Compute the initial time-eccentricity e_t in ADM coordinates at 2PN order for spin-aligned compact binaries using the quasi-Keplerian parametrization.

Eq(A121) of arXiv:2409.17636, based on Memmesheimer, Gopakumar, and Schaefer, Phys. Rev. D 70, 104011 (2004).

Parameters:
  • Eb (float) – Orbital binding energy (negative for bound orbits).

  • L (float) – Orbital angular momentum.

  • eta (float) – Symmetric mass ratio, eta = m1*m2/(m1+m2)^2.

  • chi1 (float) – Dimensionless spin of the heavier body. Default 0.

  • chi2 (float) – Dimensionless spin of the lighter body. Default 0.

Returns:

The time-eccentricity e_t in ADM coordinates.

Return type:

float