Definition at line 92 of file simulateCW.py.
Inherits object.
Public Member Functions | |
def | __init__ (self, tref, tstart, Tdata, waveform, dt_wf, phi0, psi, alpha, delta, det_name, earth_ephem_file="earth00-40-DE405.dat.gz", sun_ephem_file="sun00-40-DE405.dat.gz", tref_at_det=False, extra_comment=None) |
Initialise a continuous-wave signal simulator. More... | |
def | get_strain (self, fs, tmin=0, tmax=None, noise_sqrt_Sh=0, noise_seed=None) |
Generate strain time series of a continuous-wave signal in the detector frame. More... | |
def | get_strain_blocks (self, fs, Tblock, noise_sqrt_Sh=0, noise_seed=None, prog_bar=None) |
Generate strain time series of a continuous-wave signal in the detector frame, in contiguous blocks. More... | |
def | write_frame_files (self, fs, Tframe, comment="simCW", out_dir=".", noise_sqrt_Sh=0, noise_seed=None, prog_bar=None) |
Write frame files [1] containing strain time series of a continuous-wave signal. More... | |
def | get_sfts (self, fmax, Tsft, noise_sqrt_Sh=0, noise_seed=None, window="rectangular", window_param=0, prog_bar=None, fmin=0) |
Generate SFTs [2] containing strain time series of a continuous-wave signal. More... | |
def | write_sft_files (self, fmax, Tsft, comment="simCW", out_dir=".", noise_sqrt_Sh=0, noise_seed=None, window="rectangular", window_param=0, prog_bar=None, fmin=0) |
Write SFT files [2] containing strain time series of a continuous-wave signal. More... | |
def lalpulsar.simulateCW.CWSimulator.__init__ | ( | self, | |
tref, | |||
tstart, | |||
Tdata, | |||
waveform, | |||
dt_wf, | |||
phi0, | |||
psi, | |||
alpha, | |||
delta, | |||
det_name, | |||
earth_ephem_file = "earth00-40-DE405.dat.gz" , |
|||
sun_ephem_file = "sun00-40-DE405.dat.gz" , |
|||
tref_at_det = False , |
|||
extra_comment = None |
|||
) |
Initialise a continuous-wave signal simulator.
tref | reference time of signal phase at Solar System barycentre, in GPS seconds (but see tref_at_det) |
tstart | start time of signal, in GPS seconds |
Tdata | total duration of signal, in seconds |
waveform | function which computes signal phase and amplitudes as functions of time: dphi, aplus, across = waveform(dt), where: dt = time since reference time tref; dphi = phase of signal at time dt relative to reference time tref, in radians; aplus = strain amplitude of plus polarisation at time dt; across = strain amplitude of cross polarisation at time dt |
dt_wf | sampling time of the function waveform ; this need only be small enough to ensure that dphi , aplus , and across are smoothly interpolated, and does not need to make the desired sampling frequency of the output strain time series |
phi0 | initial phase of the gravitational-wave signal at tstart, in radians |
psi | polarisation angle of the gravitational-wave source, in radians |
alpha | right ascension of the gravitational-wave source, in radians |
delta | declination of the gravitational-wave source, in radians |
det_name | name of the gravitational-wave detector to simulate a response for; e.g. "H1" for LIGO Hanford, "L1" for LIGO Livingston, "V1" for Virgo |
earth_ephem_file | name of file to load Earth ephemeris from |
sun_ephem_file | name of file to load Sun ephemeris from |
tref_at_det | default False; if True, shift reference time tref so that dt = 0 is tref in detector frame instead of Solar System barycentre frame, useful if e.g. one wants to turn on signal only for dt > 0, one can use tref as the turn-on time |
extra_comment | additional text to add to comment string in frame/SFT headers (not filenames), e.g. for wrapper script commandlines |
Definition at line 123 of file simulateCW.py.
def lalpulsar.simulateCW.CWSimulator.get_strain | ( | self, | |
fs, | |||
tmin = 0 , |
|||
tmax = None , |
|||
noise_sqrt_Sh = 0 , |
|||
noise_seed = None |
|||
) |
Generate strain time series of a continuous-wave signal in the detector frame.
fs | sampling frequency of strain time series, in Hz |
tmin | start time for strain time series, as offsets from self.__tstart |
tmax | start time for strain time series, as offsets from self.__tstart |
noise_sqrt_Sh | if >0, add Gaussian noise with square-root single-sided power spectral density given by this value, in Hz^(-1/2) |
noise_seed | use this seed for the random number generator used to create noise; required if noise_sqrt_Sh >0 |
Definition at line 255 of file simulateCW.py.
def lalpulsar.simulateCW.CWSimulator.get_strain_blocks | ( | self, | |
fs, | |||
Tblock, | |||
noise_sqrt_Sh = 0 , |
|||
noise_seed = None , |
|||
prog_bar = None |
|||
) |
Generate strain time series of a continuous-wave signal in the detector frame, in contiguous blocks.
fs | sampling frequency of strain time series, in Hz |
Tblock | length of each block, in seconds; should divide evenly into Tdata |
noise_sqrt_Sh | if >0, add Gaussian noise with square-root single-sided power spectral density given by this value, in Hz^(-1/2) |
noise_seed | use this seed for the random number generator used to create noise; if None, generate a random seed using os.urandom() |
prog_bar | use to display a progress bar, e.g. prog_bar=tqdm |
This is a Python generator function and so should be called as follows:
Definition at line 300 of file simulateCW.py.
def lalpulsar.simulateCW.CWSimulator.write_frame_files | ( | self, | |
fs, | |||
Tframe, | |||
comment = "simCW" , |
|||
out_dir = "." , |
|||
noise_sqrt_Sh = 0 , |
|||
noise_seed = None , |
|||
prog_bar = None |
|||
) |
Write frame files [1] containing strain time series of a continuous-wave signal.
The strain time series is written as double-precision post-processed data (ProcData) channel named <detector>:SIMCW-STRAIN
, where <detector>
is the 2-character detector prefix (e.g. H1
for LIGO Hanford, L1
for LIGO Livingston, V1
for Virgo).
fs | sampling frequency of strain time series, in Hz |
Tframe | length of each frame, in seconds; should divide evenly into Tdata |
comment | frame file name comment, may only contain A-Z, a-z, 0-9, _, +, # characters |
out_dir | output directory to write frame files into |
noise_sqrt_Sh | if >0, add Gaussian noise with square-root single-sided power spectral density given by this value, in Hz^(-1/2) |
noise_seed | use this seed for the random number generator used to create noise; if None, generate a random seed using os.urandom() |
prog_bar | use to display a progress bar, e.g. prog_bar=tqdm |
This is a Python generator function and so should be called as follows:
[1] https://dcc.ligo.org/LIGO-T970130/public
Definition at line 370 of file simulateCW.py.
def lalpulsar.simulateCW.CWSimulator.get_sfts | ( | self, | |
fmax, | |||
Tsft, | |||
noise_sqrt_Sh = 0 , |
|||
noise_seed = None , |
|||
window = "rectangular" , |
|||
window_param = 0 , |
|||
prog_bar = None , |
|||
fmin = 0 |
|||
) |
Generate SFTs [2] containing strain time series of a continuous-wave signal.
fmax | maximum SFT frequency, in Hz |
Tsft | length of each SFT, in seconds; should divide evenly into Tdata |
noise_sqrt_Sh | if >0, add Gaussian noise with square-root single-sided power spectral density given by this value, in Hz^(-1/2) |
noise_seed | use this seed for the random number generator used to create noise; if None, generate a random seed using os.urandom() |
window | if not None, window the time series before performing the FFT, using the named window function; see XLALCreateNamedREAL8Window() |
window_param | parameter for the window function given by window, if needed |
prog_bar | use to display a progress bar, e.g. prog_bar=tqdm |
fmin | if >0, minimum SFT frequency, in Hz (note that this only modifies the output SFT bandwidth; internally a full-band SFT is still produced by sampling at 2*fmax) |
This is a Python generator function and so should be called as follows:
[2] https://dcc.ligo.org/LIGO-T040164/public
Definition at line 473 of file simulateCW.py.
def lalpulsar.simulateCW.CWSimulator.write_sft_files | ( | self, | |
fmax, | |||
Tsft, | |||
comment = "simCW" , |
|||
out_dir = "." , |
|||
noise_sqrt_Sh = 0 , |
|||
noise_seed = None , |
|||
window = "rectangular" , |
|||
window_param = 0 , |
|||
prog_bar = None , |
|||
fmin = 0 |
|||
) |
Write SFT files [2] containing strain time series of a continuous-wave signal.
fmax | maximum SFT frequency, in Hz |
Tsft | length of each SFT, in seconds; should divide evenly into Tdata |
comment | SFT file name comment, may only contain A-Z, a-z, 0-9 characters |
out_dir | output directory to write SFT files into |
noise_sqrt_Sh | if >0, add Gaussian noise with square-root single-sided power spectral density given by this value, in Hz^(-1/2) |
noise_seed | use this seed for the random number generator used to create noise; if None, generate a random seed using os.urandom() |
window | if not None, window the time series before performing the FFT, using the named window function; see XLALCreateNamedREAL8Window() |
window_param | parameter for the window function given by window, if needed |
prog_bar | use to display a progress bar, e.g. prog_bar=tqdm |
fmin | if >0, minimum SFT frequency, in Hz (note that this only modifies the output SFT bandwidth; internally a full-band SFT is still produced by sampling at 2*fmax) |
This is a Python generator function and so should be called as follows:
[2] https://dcc.ligo.org/LIGO-T040164/public
Definition at line 554 of file simulateCW.py.