templates module

class templates.QuadraturePhase(n)[source]

Bases: object

A tool for generating the quadrature phase of a real-valued template.

Example:

>>> import numpy
>>> import lal
>>> q = QuadraturePhase(128) # initialize for 128-sample templates
>>> inseries = lal.CreateREAL8TimeSeries(deltaT = 1.0 / 128, length = 128)
>>> inseries.data.data = numpy.cos(numpy.arange(128, dtype = "double") * 2 * numpy.pi / 128) # one cycle of cos(t)
>>> outseries = q(inseries) # output has cos(t) in real part, sin(t) in imaginary part
static add_quadrature_phase(fseries, n)[source]

From the Fourier transform of a real-valued function of time, compute and return the Fourier transform of the complex-valued function of time whose real component is the original time series and whose imaginary component is the quadrature phase of the real part. fseries is a LAL COMPLEX16FrequencySeries and n is the number of samples in the original time series.

templates.bandwidth(m1, m2, s1, s2, f_min, f_max, delta_f, psd)[source]
templates.ceil_pow_2(x)[source]
templates.fn(farr, h, n, psd)[source]
templates.gstlal_valid_approximant(appx_str)[source]
templates.hplus_of_f(m1, m2, s1, s2, f_min, f_max, delta_f)[source]
templates.moment(farr, h, n, psd)[source]
templates.normalized_autocorrelation(fseries, revplan)[source]
templates.time_slices(sngl_inspiral_rows, flow=40, fhigh=900, padding=1.5, samples_min=1024, samples_max_256=1024, samples_max_64=2048, samples_max=4096, sample_rate=None, verbose=False)[source]

The function time_frequency_boundaries splits a template bank up by times for which different sampling rates are appropriate.

The function returns a list of 3-tuples of the form (rate,begin,end) where rate is the sampling rate and begin/end mark the boundaries during which the given rate is guaranteed to be appropriate (no template exceeds a frequency of Nyquist/padding during these times).

@param sngl_inspiral_rows The snigle inspiral rows for this sub bank @param flow The low frequency to generate the waveform from @param fhigh The maximum frequency for generating the waveform @param padding Allow a template to be generated up to Nyquist / padding for any slice @param samples_min The minimum number of samples to use in any time slice @param samples_max_256 The maximum number of samples to have in any time slice greater than or equal to 256 Hz @param samples_max_64 The maximum number of samples to have in any time slice greater than or equal to 64 Hz @param samples_max The maximum number of samples in any time slice below 64 Hz @param verbose Be verbose