Waveforms
Circular models
- class gwModels.waveforms.circular_models.genBHPTNRSur1dq1e4(model)[source]
Bases:
objectClass to generate waveforms using the BHPTNRSur1dq1e4 model.
- __init__(model)[source]
Initialize the genBHPTNRSur1dq1e4 object.
- Parameters:
model – An instance of the BHPTNRSur1dq1e4 surrogate model.
gwNRHME waveform models
- class gwModels.waveforms.gwnrhme_models.IMRHME(circular_model, eccentric_model='SEOBNRv5EHM', **kwargs)[source]
Bases:
genNRHybSur3dq8,genBHPTNRSur1dq1e4Class to generate eccentric non-spinning higher order spherical harmonics using a quadrupolar eccentric waveform model and a multi-modal circular model.
- __init__(circular_model, eccentric_model='SEOBNRv5EHM', **kwargs)[source]
- Parameters:
circular_model (str) – Name of the multi-modal circular model (e.g., ‘NRHybSur3dq8’, ‘BHPTNRSur1dq1e4’, ‘IMRPhenomTHM’).
eccentric_model (str) – Name of the quadrupolar eccentric model (e.g., ‘SEOBNRv5EHM’).
kwargs (dict) – Optional keyword arguments including: - model_obj (object): A model object for BHPTNRSur1dq1e4 model.
- generate_waveform(params)[source]
Generates a combined eccentric waveform based on the specified parameters.
- Parameters:
params (dict) – Dictionary containing waveform parameters with the following keys: - q (float): Mass ratio of the binary system. - e0 (float): Initial eccentricity at omega0. - l0 (float): Initial mean anomaly at omega0. - omega0 (float): Initial dimensionless orbital frequency.
- Returns:
(tNRE, hNRE) — time array and generated eccentric waveform data.
- Return type:
- class gwModels.waveforms.gwnrhme_models.NRHybSur3dq8_gwNRHME(eccentric_model='SEOBNRv5EHM', **kwargs)[source]
Bases:
objectClass to generate eccentric higher order spherical harmonics using SEOBNRv5EHM and NRHybSur3dq8 model.
- generate_waveform(params)[source]
Generates a combined eccentric waveform.
- Parameters:
params (dict) – Dictionary containing waveform parameters with the following keys: - q (float): Mass ratio of the binary system. - e0 (float): Initial eccentricity at omega0. - l0 (float): Initial mean anomaly at omega0. - omega0 (float): Initial dimensionless orbital frequency.
- Returns:
(tNRE, hNRE) — time array and generated eccentric waveform data.
- Return type:
- class gwModels.waveforms.gwnrhme_models.BHPTNRSur1dq1e4_gwNRHME(eccentric_model='SEOBNRv5EHM', **kwargs)[source]
Bases:
objectClass to generate eccentric higher order spherical harmonics using SEOBNRv5EHM and BHPTNRSur1dq1e4 model.
- generate_waveform(params)[source]
Generates a combined eccentric waveform.
- Parameters:
params (dict) – Dictionary containing waveform parameters with the following keys: - q (float): Mass ratio of the binary system. - e0 (float): Initial eccentricity at omega0. - l0 (float): Initial mean anomaly at omega0. - omega0 (float): Initial dimensionless orbital frequency.
- Returns:
(tNRE, hNRE) — time array and generated eccentric waveform data.
- Return type:
- class gwModels.waveforms.gwnrhme_models.IMRPhenomTHM_gwNRHME(eccentric_model='SEOBNRv5EHM', **kwargs)[source]
Bases:
objectClass to generate eccentric higher order spherical harmonics using SEOBNRv5EHM and IMRPhenomTHM model.
- generate_waveform(params)[source]
Generates a combined eccentric waveform.
- Parameters:
params (dict) – Dictionary containing waveform parameters with the following keys: - q (float): Mass ratio of the binary system. - e0 (float): Initial eccentricity at omega0. - l0 (float): Initial mean anomaly at omega0. - omega0 (float): Initial dimensionless orbital frequency.
- Returns:
(tNRE, hNRE) — time array and generated eccentric waveform data.
- Return type:
LAL models
- gwModels.waveforms.lal_models.generate_EccentricTD(mass_ratio, total_mass=10.0, inclination=0.0, ref_phase=0.0, eccentricity=0.01, Momega0OverM=0.02, deltaTOverM=0.5, time_wfgeneration=True)[source]
Generates an eccentric time-domain gravitational waveform using the LAL EccentricTD approximant.
- Parameters:
mass_ratio (float) – The mass ratio of the binary system, defined as m1/m2.
total_mass (float, optional) – The total mass of the binary system in solar masses. Default is 10.0.
inclination (float, optional) – The inclination angle in radians. Default is 0.0 (face-on).
ref_phase (float, optional) – The reference phase at the initial frequency, in radians. Default is 0.0.
eccentricity (float, optional) – The eccentricity at the reference frequency. Default is 0.01.
Momega0OverM (float, optional) – The dimensionless initial orbital frequency in geometric units. Default is 0.02.
deltaTOverM (float, optional) – The time-step in geometric units. Default is 0.5.
time_wfgeneration (bool, optional) – If True, logs the time taken to generate the waveform. Default is True.
- Returns:
t_geo (numpy.ndarray) – Time array in geometric units.
h_geo (numpy.ndarray) – Complex waveform in geometric units.
- gwModels.waveforms.lal_models.generate_IMRPhenomTHM(mass_ratio, total_mass=10.0, s1z=0.0, s2z=0.0, ref_phase=0.0, Momega0OverM=0.02, deltaTOverM=0.5, time_wfgeneration=True)[source]
Generates an inspiral-merger-ringdown waveform using the IMRPhenomTHM model.
- Parameters:
mass_ratio (float) – Mass ratio of the binary system (m1/m2).
total_mass (float, optional) – Total mass in solar masses. Default is 10.0.
s1z (float, optional) – Spin component along the z-axis for the primary object. Default is 0.0.
s2z (float, optional) – Spin component along the z-axis for the secondary object. Default is 0.0.
ref_phase (float, optional) – Reference phase in radians. Default is 0.0.
Momega0OverM (float, optional) – Initial orbital frequency in geometric units. Default is 0.02.
deltaTOverM (float, optional) – Time step in geometric units. Default is 0.5.
time_wfgeneration (bool, optional) – If True, logs the time taken to generate the waveform. Default is True.
- Returns:
t_geo (ndarray) – Time array in geometric units.
h_geo (dict) – Dictionary of waveform modes in geometric units.
- gwModels.waveforms.lal_models.process_IMRPheomTHM_output(sphtseries)[source]
Processes the raw LALSuite output from IMRPhenomTHM into a dictionary.
- Parameters:
sphtseries (LALSeries) – LALSeries object containing the waveform modes.
- Returns:
h_dict – Dictionary with mode labels (e.g., ‘h_l2m2’) as keys and complex waveform arrays as values.
- Return type:
- gwModels.waveforms.lal_models.convert_physical_wf_to_geometric(h_dict, MT, dist, deltaTOverM)[source]
Converts waveform data from physical to geometric units.
- Parameters:
- Returns:
t_geo (ndarray) – Time array in geometric units.
h_geo (dict) – Dictionary of waveform modes in geometric units.
- gwModels.waveforms.lal_models.generate_SimInspiralChooseTDWaveform(m1, m2, s1, s2, dist_SI, iota, phi_c, longAscNodes, eccentricity, meanPerAno, deltaT, f_ref, f_low, WFdict, approx)[source]
Generates a time-domain waveform using SimInspiralChooseTDWaveform from LALSuite.
- Parameters:
m1 (float) – Masses of the two binary components, in SI units (kg).
m2 (float) – Masses of the two binary components, in SI units (kg).
s1 (array-like) – Spin vectors for the two binary components.
s2 (array-like) – Spin vectors for the two binary components.
dist_SI (float) – Distance to the source in meters.
iota (float) – Inclination angle.
phi_c (float) – Reference phase.
longAscNodes (float) – Longitude of ascending nodes.
eccentricity (float) – Orbital eccentricity.
meanPerAno (float) – Mean anomaly.
deltaT (float) – Time step for waveform sampling.
f_ref (float) – Reference frequency.
f_low (float) – Lower frequency cutoff.
WFdict (LALDict) – Dictionary of waveform parameters.
approx (LALApproximation) – Waveform approximation model.
- Returns:
hplus, hcross – Plus and cross polarizations of the gravitational waveform.
- Return type:
LALSeries
- gwModels.waveforms.lal_models.obtain_time_fequency_inputs(total_mass, deltaTOverM, Momega0OverM)[source]
Converts inputs into time and frequency settings for LALSuite.
- Parameters:
- Returns:
deltaT (float) – Time step for waveform sampling.
f_ref (float) – Reference frequency.
f_low (float) – Lower frequency cutoff.
- gwModels.waveforms.lal_models.process_intrinsic_params(total_mass, mass_ratio, s1z=0.0, s2z=0.0)[source]
Processes intrinsic binary parameters for waveform generation.
- Parameters:
- Returns:
m1 (float) – Mass of the primary in SI units (kg).
m2 (float) – Mass of the secondary in SI units (kg).
s1 (list) – Spin vector for the primary.
s2 (list) – Spin vector for the secondary.
- gwModels.waveforms.lal_models.process_extrinsic_params(dist, inclination, ref_phase)[source]
Processes extrinsic parameters for waveform generation.
- gwModels.waveforms.lal_models.process_eccentric_params(eccentricity)[source]
Processes parameters related to the binary’s orbital eccentricity.
- Parameters:
eccentricity (float) – Orbital eccentricity.
- Returns:
longAscNodes (float) – Longitude of ascending nodes.
eccentricity (float) – Orbital eccentricity.
meanPerAno (float) – Mean anomaly.
- gwModels.waveforms.lal_models.create_lal_dict()[source]
Initializes a dictionary for configuring waveform parameters in LALSuite.
- Returns:
WFdict – Dictionary with LALSuite waveform configuration parameters.
- Return type:
LALDict
- gwModels.waveforms.lal_models.convert_lalsim_wf_to_numpyarray(hplus, hcross, deltaT)[source]
Converts LALSuite waveform data to numpy arrays.
- Parameters:
hplus (LALSeries) – Plus polarization.
hcross (LALSeries) – Cross polarization.
deltaT (float) – Time step.
- Returns:
t (ndarray) – Time array.
h (ndarray) – Complex waveform data (hplus - i * hcross).