Module for generating 'fake' data containing CW signals and/or Gaussian noise. This basically presents a high-level wrapper API to the lower-level CW signal-generation functions in lalsuite.
Prototypes | |
| int | XLALCWMakeFakeMultiData (MultiSFTVector **multiSFTs, MultiREAL8TimeSeries **multiTseries, const PulsarParamsVector *injectionSources, const CWMFDataParams *dataParams, const EphemerisData *edat) |
| Generate fake 'CW' data, returned either as SFTVector or REAL4Timeseries or both, for given CW-signal ("pulsar") parameters and output parameters (frequency band etc) More... | |
| int | XLALCWMakeFakeData (SFTVector **SFTvect, REAL8TimeSeries **Tseries, const PulsarParamsVector *injectionSources, const CWMFDataParams *dataParams, UINT4 detectorIndex, const EphemerisData *edat) |
| Single-IFO version of XLALCWMakeFakeMultiData(), handling the actual work, but same input API. More... | |
| REAL4TimeSeries * | XLALGenerateCWSignalTS (const PulsarParams *pulsarParams, const LALDetector *site, LIGOTimeGPS startTime, REAL8 duration, REAL8 fSamp, REAL8 fHet, const EphemerisData *edat, REAL8 sourceDeltaT) |
| Generate a (heterodyned) REAL4 timeseries of a CW signal for given pulsarParams, site, start-time, duration, and sampling-rate. More... | |
| SFTVector * | XLALMakeSFTsFromREAL8TimeSeries (const REAL8TimeSeries *timeseries, const LIGOTimeGPSVector *timestamps, const char *windowType, REAL8 windowParam) |
| Make SFTs from given REAL8TimeSeries at given timestamps, potentially applying a time-domain window on each timestretch first. More... | |
| int | XLALFindSmallestValidSamplingRate (UINT4 *n1, UINT4 n0, const LIGOTimeGPSVector *timestamps) |
| Find the smallest sampling rate of the form fsamp = n / Tsft, with n>=n0, such that all gap sizes Dt_i between SFTs of the given timestamps are also exactly resolved, ie. More... | |
| static UINT4 | gcd (UINT4 numer, UINT4 denom) |
| PulsarParamsVector * | XLALCreatePulsarParamsVector (UINT4 numPulsars) |
| Create zero-initialized PulsarParamsVector for numPulsars. More... | |
| void | XLALDestroyPulsarParamsVector (PulsarParamsVector *ppvect) |
| Destructor for PulsarParamsVector type. More... | |
| int | XLALReadPulsarParams (PulsarParams *pulsarParams, LALParsedDataFile *cfgdata, const CHAR *secName, const LIGOTimeGPS *refTimeDef) |
| Function to parse a config-file-type string (or section thereof) into a PulsarParams struct. More... | |
| PulsarParamsVector * | XLALPulsarParamsFromFile (const char *fname, const LIGOTimeGPS *refTimeDef) |
| Parse a given 'CWsources' config file for PulsarParams, return vector of all pulsar definitions found [using sections]. More... | |
| int | XLALCheckConfigFileWasFullyParsed (const char *fname, const LALParsedDataFile *cfgdata) |
| PulsarParamsVector * | XLALPulsarParamsFromUserInput (const LALStringVector *UserInput, const LIGOTimeGPS *refTimeDef) |
| Function to determine the PulsarParamsVector input from a user-input defining CW sources. More... | |
| PulsarParamsVector * | XLALPulsarParamsVectorAppend (PulsarParamsVector *list, const PulsarParamsVector *add) |
| Append the given PulsarParamsVector 'add' to the vector 'list' ( which can be NULL), return resulting list with new elements 'add' appended at the end of 'list'. More... | |
| int | XLALFITSWritePulsarParamsVector (FITSFile *file, const CHAR *tableName, const PulsarParamsVector *list) |
| Write a PulsarParamsVector to a FITS file. More... | |
| void | XLALDestroyCWMFDataParams (CWMFDataParams *params) |
| Destructor for a CWMFDataParams type. More... | |
Data Structures | |
| struct | PulsarParamsVector |
| Straightforward vector type of N PulsarParams structs. More... | |
| struct | CWMFDataParams |
| Struct controlling all the aspects of the fake data (time-series + SFTs) to be produced by XLALCWMakeFakeData() and XLALCWMakeFakeMultiData() More... | |
Macros | |
| #define | SQ(x) ( (x) * (x) ) |
| Functions to generate 'fake' data containing CW signals and/or Gaussian noise. These basically present a high-level wrapper API to the lower-level CW signal-generation functions in lalsuite. More... | |
Variables | |
| const char *const | InjectionSourcesHelpString |
| int XLALCWMakeFakeMultiData | ( | MultiSFTVector ** | multiSFTs, |
| MultiREAL8TimeSeries ** | multiTseries, | ||
| const PulsarParamsVector * | injectionSources, | ||
| const CWMFDataParams * | dataParams, | ||
| const EphemerisData * | edat | ||
| ) |
Generate fake 'CW' data, returned either as SFTVector or REAL4Timeseries or both, for given CW-signal ("pulsar") parameters and output parameters (frequency band etc)
| [out] | multiSFTs | pointer to optional SFT-vector for output |
| [out] | multiTseries | pointer to optional timeseries-vector for output |
| [in] | injectionSources | (optional) array of sources inject |
| [in] | dataParams | parameters specifying the type of data to generate |
| [in] | edat | ephemeris data |
Definition at line 90 of file CWMakeFakeData.c.
| int XLALCWMakeFakeData | ( | SFTVector ** | SFTvect, |
| REAL8TimeSeries ** | Tseries, | ||
| const PulsarParamsVector * | injectionSources, | ||
| const CWMFDataParams * | dataParams, | ||
| UINT4 | detectorIndex, | ||
| const EphemerisData * | edat | ||
| ) |
Single-IFO version of XLALCWMakeFakeMultiData(), handling the actual work, but same input API.
The 'detectorIndex' has the index of the detector to be used from the multi-IFO arrays.
Definition at line 165 of file CWMakeFakeData.c.
| REAL4TimeSeries * XLALGenerateCWSignalTS | ( | const PulsarParams * | pulsarParams, |
| const LALDetector * | site, | ||
| LIGOTimeGPS | startTime, | ||
| REAL8 | duration, | ||
| REAL8 | fSamp, | ||
| REAL8 | fHet, | ||
| const EphemerisData * | edat, | ||
| REAL8 | sourceDeltaT | ||
| ) |
Generate a (heterodyned) REAL4 timeseries of a CW signal for given pulsarParams, site, start-time, duration, and sampling-rate.
NOTE: this is mostly an API-wrapper to the more 'old-style' function XLALGeneratePulsarSignal() [which will become deprecated in the future], extended for the option to generate transient-CW signals
| pulsarParams | input CW pulsar-signal parameters |
| site | detector |
| startTime | time-series start-time GPS |
| duration | time-series duration to generate |
| fSamp | sampling frequency |
| fHet | heterodyning frequency |
| edat | ephemeris data |
| sourceDeltaT | source-frame sampling period (optional: 0 == previous internal defaults) |
Definition at line 396 of file CWMakeFakeData.c.
| SFTVector * XLALMakeSFTsFromREAL8TimeSeries | ( | const REAL8TimeSeries * | timeseries, |
| const LIGOTimeGPSVector * | timestamps, | ||
| const char * | windowType, | ||
| REAL8 | windowParam | ||
| ) |
Make SFTs from given REAL8TimeSeries at given timestamps, potentially applying a time-domain window on each timestretch first.
| timeseries | input time-series |
| timestamps | timestamps to produce SFTs for (can be NULL), if given must all lies within timeseries' time-span |
| windowType | optional time-domain window function to apply before FFTing |
| windowParam | window parameter, if any |
Definition at line 480 of file CWMakeFakeData.c.
| int XLALFindSmallestValidSamplingRate | ( | UINT4 * | n1, |
| UINT4 | n0, | ||
| const LIGOTimeGPSVector * | timestamps | ||
| ) |
Find the smallest sampling rate of the form fsamp = n / Tsft, with n>=n0, such that all gap sizes Dt_i between SFTs of the given timestamps are also exactly resolved, ie.
that Dt_i * fsamp = integer, for all i
The smallest allowed sampling rate is the user-specified fsamp0 = n0 / Tsft, which guarantees by construction that fSamp0 * Tsft = n0 = integer This sampling rate would be valid if there are no gaps between SFTs, so it's only in cases of gaps that are non-integer multiples of Tsft that we'll (potentially) have to increase the sampling rate.
NOTE: This approach replaces the old mfdv4 habit of 'nudging' noise SFTs start-times to fall on integer timesteps of the fsamp0 timeseries. The purpose of this function is to avoid this behaviour, by appropriately increasing the sampling rate as required.
NOTE2: we only allow integer-second gaps, everything else will be rejected with an error-message.
NOTE3: Tsft=timestamps->deltaT must be integer seconds, everything else is rejected with an error as well
Definition at line 620 of file CWMakeFakeData.c.
Definition at line 704 of file CWMakeFakeData.c.
| PulsarParamsVector * XLALCreatePulsarParamsVector | ( | UINT4 | numPulsars | ) |
Create zero-initialized PulsarParamsVector for numPulsars.
Definition at line 722 of file CWMakeFakeData.c.
| void XLALDestroyPulsarParamsVector | ( | PulsarParamsVector * | ppvect | ) |
Destructor for PulsarParamsVector type.
Definition at line 740 of file CWMakeFakeData.c.
| int XLALReadPulsarParams | ( | PulsarParams * | pulsarParams, |
| LALParsedDataFile * | cfgdata, | ||
| const CHAR * | secName, | ||
| const LIGOTimeGPS * | refTimeDef | ||
| ) |
Function to parse a config-file-type string (or section thereof) into a PulsarParams struct.
NOTE: The section-name is optional, and can be given as NULL, in which case the top of the file (ie the "default section") is used.
NOTE2: eventually ATNF/TEMPO2-style 'par-file' variables will also be understood by this function, but we start out with a simpler version that just deals with our 'CW-style' input variable for now
NOTE3: The config-file must be of a special "SourceParamsIO" form, defining the following required and optional parameters:
REQUIRED: Alpha, Delta, Freq, refTime (unless refTimeDef != NULL)
OPTIONAL: f1dot, f2dot, f3dot, f4dot, f5dot, f6dot {h0, cosi} or {aPlus, aCross}, psi, phi0 transientWindowType, transientStartTime, transientTau
Other config-variables found in the file will ... ?? error or accept?
| [out] | pulsarParams | pulsar parameters to fill in from config string |
| [in] | cfgdata | pre-parsed "SourceParamsIO" config-file contents |
| [in] | secName | section-name to use from config-file string (can be NULL) |
| [in] | refTimeDef | default reference time if refTime is not given |
Definition at line 782 of file CWMakeFakeData.c.
| PulsarParamsVector * XLALPulsarParamsFromFile | ( | const char * | fname, |
| const LIGOTimeGPS * | refTimeDef | ||
| ) |
Parse a given 'CWsources' config file for PulsarParams, return vector of all pulsar definitions found [using sections].
| [in] | fname | 'CWsources' config file name |
| [in] | refTimeDef | default reference time if refTime is not given |
Definition at line 992 of file CWMakeFakeData.c.
| int XLALCheckConfigFileWasFullyParsed | ( | const char * | fname, |
| const LALParsedDataFile * | cfgdata | ||
| ) |
Definition at line 1036 of file CWMakeFakeData.c.
| PulsarParamsVector * XLALPulsarParamsFromUserInput | ( | const LALStringVector * | UserInput, |
| const LIGOTimeGPS * | refTimeDef | ||
| ) |
Function to determine the PulsarParamsVector input from a user-input defining CW sources.
This option supports a dual-type feature: if any string in the list is of the form '{...}', then it determines the contents of a config-file, otherwise the name-pattern of config-files to be parsed by XLALFindFiles(), NOTE: when specifying file-contents, options can be separated by ';' and/or newlines)
| [in] | UserInput | user-input CSV list defining 'CW sources' |
| [in] | refTimeDef | default reference time if refTime is not given |
Definition at line 1065 of file CWMakeFakeData.c.
| PulsarParamsVector * XLALPulsarParamsVectorAppend | ( | PulsarParamsVector * | list, |
| const PulsarParamsVector * | add | ||
| ) |
Append the given PulsarParamsVector 'add' to the vector 'list' ( which can be NULL), return resulting list with new elements 'add' appended at the end of 'list'.
Definition at line 1129 of file CWMakeFakeData.c.
| int XLALFITSWritePulsarParamsVector | ( | FITSFile * | file, |
| const CHAR * | tableName, | ||
| const PulsarParamsVector * | list | ||
| ) |
Write a PulsarParamsVector to a FITS file.
Definition at line 1159 of file CWMakeFakeData.c.
| void XLALDestroyCWMFDataParams | ( | CWMFDataParams * | params | ) |
Destructor for a CWMFDataParams type.
Definition at line 1208 of file CWMakeFakeData.c.
Functions to generate 'fake' data containing CW signals and/or Gaussian noise. These basically present a high-level wrapper API to the lower-level CW signal-generation functions in lalsuite.
Definition at line 52 of file CWMakeFakeData.c.
Definition at line 58 of file CWMakeFakeData.c.