Collaboration diagram for Pulsar-signal generation:
|
Files | |
| file | GeneratePulsarSignal.h |
|
| |
| file | GeneratePulsarSignal.c |
|
| |
This module also contains a few more general-purpose helper-functions:
params->pulsar.position), the detector-site (params->site) and the ephemeris-data (params->ephemerides)are used from the PulsarSignalParams structure.
LALSignalToSFTs() uses LALForwardRealFFT() appropriately on the input-timeseries to produce the required output-SFTs ( v2-normalization! ).
Tsft * Band being an integer, so that the number of time-samples per SFT is even. This follows makefakedata_v2.
Furthermore, if the timestamps for SFT-creation passed to LALSignalToSFTs() do not fit exactly on a time-step of the input time-series, it will be "nudged" to the closest one. If lalDebugLevel>0 a warning will be printed about this. The user could also see this effect in the actual timestamps of the SFTs returned.
The FFTW-"plan" is currently created using the ESTIMATE flag, which is fast but only yields an approximate plan. Better results might be achieved by using MEASURE and an appropriate buffering of the resulting plan (which doesnt change provided the SFT-length is the same). Measuring the plan takes longer but might lead to substantial speedups for many FFTs, which seems the most likely situation.
The strain of a periodic signal at the detector is given by
where
and
are the usual beam pattern response functions,
and
are the amplitudes of the gravitational wave for the plus and cross polarizations, and
is the phase. The phase contains modulations from doppler shifts due to the relative motion between the source and the detector and the spin evolution of the source. (The functions discussed here support both isolated sources and those in binary systems. The binary case has not been tested.)
If we Taylor expand the phase out to first order about the time at the midpoint of an SFT and approximate
and
as constants, for one SFT we can write
The strain at discrete time
, measured from the start of the SFT, can thus be approximated as
where
is the time as the start of the SFT, and
, where
is the duration of one SFT. This simplifies to
where
is the phase at the start of the SFT (not the initial phase at the start of the observation), i.e.,
Note that these are the same approximations used by LALDemod().
One can show that the Discrete Fourier Transform (DFT) of
above is:
where
is the number of time samples used to find the DFT (i.e., the sample rate times
), and
is usually not an integer.
Note that the factor
in the numerators of the equation for
equals 1. Furthermore, for
and
the first term dominates and can be Taylor expanded to give:
Note that the last factor in square brackets is
and
used by LALDemod.
Note that one needs to call LALComputeSkyAndZeroPsiAMResponse once per sky position, and then call LALFastGeneratePulsarSFTs for each set of signal parameters at that sky position. Thus, one could perform a Monte Carlo simulation, as shown by the pseudo code:
loop over sky positions {
...
LALComputeSkyAndZeroPsiAMResponse();
...
loop over spindown {
...
loop over frequencies {
...
LALFastGeneratePulsarSFTs();
...
}
...
}
...
}
*outputSFTs sent to LALFastGeneratePulsarSFTs() is NULL then LALFastGeneratePulsarSFTs() allocates memory for the output SFTs; otherwise it assumes memory has already been allocated. Thus, the user does not have to deallocate memory for the SFTs until all calls to LALFastGeneratePulsarSFTs() are completed.
fHeterodyne and 0.5 * samplingRate set in the PulsarSignalParams struct give the start frequency and frequency band of the SFTs output from LALFastGeneratePulsarSFTs().
resTrig is set to zero in the SFTandSignalParams struct, then the C math libary cos() sin() functions are called, else lookup tables (LUTs) are used for calls to trig functions. There may be a slight speedup in using LUTs.
2*Dterms centered on the signal frequency in each SFT. Dterms must be greater than zero and less than or equal to the number of frequency bins in the output SFTs. Note that Dterms is used the same way here as it is in LALDemod(). Nothing is done to the other bins, unless *outputSFTs is NULL; then, since memory is allocates for the output SFTs, the bins not in the 2*Dterms band are initialized to zero.
1.5.2