LALPulsar  6.1.0.1-8083555
SimulateCW

Detailed Description

Generate strain time series of a continuous-wave signal in the detector frame, given a function which computes signal phase and amplitudes as functions of time.

The given function should compute quantities \(\Delta\phi(t)\), \(a_+(t)\), and \(a_\times(t)\) such that the plus and cross gravitational-wave polarisations \(h_+(t)\) and \(h_\times(t)\) are given by:

\begin{eqnarray} h_+(t) & = & a_+(t) \cos[\phi_0 + \Delta\phi(t)] \; , \\ h_\times(t) & = & a_\times(t)\sin[\phi_0 + \Delta\phi(t)] \; . \end{eqnarray}

This module provides a class CWSimulator() to generate the strain time series. CWSimulator() can also directly write frame files and SFT files. Example usage:

import lal
from lalpulsar import simulateCW
def waveform(h0, cosi, freq, f1dot):
def wf(dt):
dphi = lal.TWOPI * (freq * dt + f1dot * 0.5 * dt**2)
ap = h0 * (1.0 + cosi**2) / 2.0
ax = h0 * cosi
return dphi, ap, ax
return wf
tref = 900043200
tstart = 900000000
Tdata = 86400
h0 = 1e-24
cosi = 0.123
psi = 2.345
phi0 = 3.210
freq = 10.0
f1dot = -1.35e-8
dt_wf = 5
alpha = 6.12
delta = 1.02
detector = 'H1'
wf = waveform(h0, cosi, freq, f1dot)
S = simulateCW.CWSimulator(tref, tstart, Tdata, wf, dt_wf, phi0, psi, alpha, delta, detector)
# To write SFT files
for file, i, N in S.write_sft_files(fmax=32, Tsft=1800, comment="simCW"):
print('Generated SFT file %s (%i of %i)' % (file, i+1, N))
# To write frame files
for file, i, N in S.write_frame_files(fs=1, Tframe=1800, comment="simCW"):
print('Generated frame file %s (%i of %i)' % (file, i+1, N))

Data Structures

class  lalpulsar.simulateCW.CWSimulator