PostMergerAmplitudeFit

class gwtails.tails.PostMergerAmplitudeFit(t=None, f=None, filename=None, qinput=1000, throw_junk_until_indx=None, qnm_fit_window=None, tail_fit_window=None, crossterm_fit_window=None, fit_tail_envelop=False, m1_to_M_scale=True)[source]

Bases: object

Class to fit post-merger late-tile tail data

__init__(t=None, f=None, filename=None, qinput=1000, throw_junk_until_indx=None, qnm_fit_window=None, tail_fit_window=None, crossterm_fit_window=None, fit_tail_envelop=False, m1_to_M_scale=True)[source]

Parameters:

tarray-like, optional

Time array. Default is None - in that case you should provide a filename that contains the strain/psi4.

farray-like, optional

Function array - it could be strain h_lm or psi4_lm. Default is None - in that case you should provide a filename that contains the strain/psi4.

filenamestr, optional

Name of the waveform data file (Required); should be in .txt or .dat format; columns should have the following format: time, h_real, h_imag, .. Default is None - in that case you should provide (time ‘t’ and strain/psi4 ‘f’).

qinputfloat, default 1000

Mass ratio values with qinput>=1.

throw_junk_until_indxint, optional

Last index until which data should be discarded before applying qnm or tail fits; Default is None.

tail_fit_windowlist, optional

Provide a window for fitting tail coefficients only; e.g. [200,800] (in M); Default is None (in that case no tail fit is performed).

qnm_fit_windowlist, optional

Provide a window for fitting qnm coefficients only; e.g. [200,800] (in M); Default is None (in that case no qnm fit is performed).

crossterm_fit_windowlist, optional

Provide a window for fitting cross-term coefficients only; e.g. [100,200] (in M); Default is None (in that case no cross-term fit is performed).

fit_tail_envelopbool, default False

Whether the data has oscillatory tail behaviour - in which case, we fit the tail envelop.

m1_to_M_scalebool, default True

Whether a mass-scale transformation from m1 (mass of the primary) to total mass M is needed.

plot_raw_amplitude()[source]

Plots raw amplitudes without time shift or junk removal.

plot_interpolated_amplitude()[source]

Plots interpolated amplitudes after time shift or junk removal.

freq(h, s=0.1)[source]

Calculate frequency from phase derivative.

qnm_fit_func(t, Aqnm, tau)[source]

QNM exponential decay function.

tail_fit_func(t, Atail, c, n)[source]

Tail power-law decay function.

qnm_and_tail_fit_func(t, phi_tail, omega)[source]

Combined QNM + tail + cross-terms fitting function.