ml4gw.waveforms package

Submodules

ml4gw.waveforms.generator module

class ml4gw.waveforms.generator.ParameterSampler(**parameters)

Bases: Module

forward(N)

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class ml4gw.waveforms.generator.WaveformGenerator(waveform, parameter_sampler)

Bases: Module

forward(N)

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

ml4gw.waveforms.phenom_d module

class ml4gw.waveforms.phenom_d.IMRPhenomD

Bases: TaylorF2

AmpIntColFitCoeff(eta, eta2, xi)
FinalSpin0815(eta, eta2, chi1, chi2)
PhenomInternal_EradRational0815(eta, eta2, chi1, chi2)
alpha1Fit(eta, eta2, xi)
alpha2Fit(eta, eta2, xi)
alpha3Fit(eta, eta2, xi)
alpha4Fit(eta, eta2, xi)
alpha5Fit(eta, eta2, xi)
beta1Fit(eta, eta2, xi)
beta2Fit(eta, eta2, xi)
beta3Fit(eta, eta2, xi)
chiPN(Seta, eta, chi1, chi2)
delta_values(f1, f2, f3, v1, v2, v3, d1, d2)
fmaxCalc(fRD, fDM, gamma2, gamma3)
forward(f, chirp_mass, mass_ratio, chi1, chi2, distance, phic, inclination, f_ref)

IMRPhenomD waveform

Parameters:
  • f (TensorType) -- Frequency series in Hz.

  • chirp_mass (TensorType) -- Chirp mass in solar masses

  • mass_ratio (TensorType) -- Mass ratio m1/m2

  • chi1 (TensorType) -- Spin of m1

  • chi2 (TensorType) -- Spin of m2

  • distance (TensorType) -- Distance to source in Mpc

  • phic (TensorType) -- Phase at coalescence

  • inclination (TensorType) -- Inclination of the source

  • f_ref (float) -- Reference frequency

Returns:

Tuple[torch.Tensor, torch.Tensor]

Cross and plus polarizations

Return type:

hc, hp

fring_fdamp(eta, eta2, chi1, chi2)
gamma1_fun(eta, eta2, xi)
gamma2_fun(eta, eta2, xi)
gamma3_fun(eta, eta2, xi)
phenom_d_amp(Mf, mass_1, mass_2, eta, eta2, Seta, chi1, chi2, chi12, chi22, xi, distance)
phenom_d_htilde(f, chirp_mass, mass_ratio, chi1, chi2, distance, phic, f_ref)
phenom_d_inspiral_amp(Mf, eta, eta2, Seta, xi, chi1, chi2, chi12, chi22)
phenom_d_inspiral_phase(Mf, mass_1, mass_2, eta, eta2, xi, chi1, chi2)
phenom_d_int_amp(Mf, eta, eta2, Seta, chi1, chi2, chi12, chi22, xi)
phenom_d_int_phase(Mf, eta, eta2, xi)
phenom_d_mrd_amp(Mf, eta, eta2, chi1, chi2, xi)
phenom_d_mrd_phase(Mf, eta, eta2, chi1, chi2, xi)
phenom_d_phase(Mf, mass_1, mass_2, eta, eta2, chi1, chi2, xi)
rho1_fun(eta, eta2, xi)
rho2_fun(eta, eta2, xi)
rho3_fun(eta, eta2, xi)
sigma1Fit(eta, eta2, xi)
sigma2Fit(eta, eta2, xi)
sigma3Fit(eta, eta2, xi)
sigma4Fit(eta, eta2, xi)
subtract3PNSS(Mf, mass1, mass2, eta, eta2, xi, chi1, chi2)

ml4gw.waveforms.phenom_d_data module

ml4gw.waveforms.sine_gaussian module

class ml4gw.waveforms.sine_gaussian.SineGaussian(sample_rate, duration)

Bases: Module

Callable class for generating sine-Gaussian waveforms.

Parameters:
  • sample_rate (float) -- Sample rate of waveform

  • duration (float) -- Duration of waveform

forward(quality, frequency, hrss, phase, eccentricity)

Generate lalinference implementation of a sine-Gaussian waveform. See git.ligo.org/lscsoft/lalsuite/-/blob/master/lalinference/lib/LALInferenceBurstRoutines.c#L381 for details on parameter definitions.

Parameters:
  • frequency (Tensor) -- Central frequency of the sine-Gaussian waveform

  • quality (Tensor) -- Quality factor of the sine-Gaussian waveform

  • hrss (Tensor) -- Hrss of the sine-Gaussian waveform

  • phase (Tensor) -- Phase of the sine-Gaussian waveform

  • eccentricity (Tensor) -- Eccentricity of the sine-Gaussian waveform. Controls the relative amplitudes of the hplus and hcross polarizations.

Returns:

Tensors of cross and plus polarizations

ml4gw.waveforms.sine_gaussian.semi_major_minor_from_e(e)

ml4gw.waveforms.taylorf2 module

class ml4gw.waveforms.taylorf2.TaylorF2

Bases: Module

forward(f, chirp_mass, mass_ratio, chi1, chi2, distance, phic, inclination, f_ref)

TaylorF2 up to 3.5 PN in phase. Newtonian SPA amplitude.

Parameters:
  • f (TensorType) -- Frequency series in Hz.

  • chirp_mass (TensorType) -- Chirp mass in solar masses

  • mass_ratio (TensorType) -- Mass ratio m1/m2

  • chi1 (TensorType) -- Spin of m1

  • chi2 (TensorType) -- Spin of m2

  • distance (TensorType) -- Luminosity distance

  • phic (TensorType) -- Phase at coalescence

  • inclination (TensorType) -- Inclination angle

  • f_ref (float) -- Reference frequency

Returns:

Tuple[torch.Tensor, torch.Tensor]

Cross and plus polarizations

Return type:

hc, hp

taylorf2_amplitude(Mf, mass1, mass2, eta, distance)
Return type:

TensorType

taylorf2_htilde(f, mass1, mass2, chi1, chi2, distance, phic, f_ref)
taylorf2_phase(Mf, mass1, mass2, chi1, chi2)

Calculate the inspiral phase for the TaylorF2.

Return type:

TensorType

Module contents