Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-b246709
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
SFTfunctions.c File Reference

Prototypes

SFTCatalogfindSFTdata (const UserInput_t *params)
 Find the SFT data specified by user input. More...
 
MultiSFTVectorextractSFTband (const SFTCatalog *catalog, const REAL8 minfbin, const REAL8 maxfbin)
 Extract the SFT coefficients from the band of interest. More...
 
MultiSFTVectorgetMultiSFTVector (UserInput_t *params, const REAL8 minfbin, const REAL8 maxfbin)
 Get a MultiSFTVector from the user-input values. More...
 
REAL4VectorAlignedcoherentlyAddSFTs (const MultiSFTVector *multiSFTvector, const MultiSSBtimes *multissb, const MultiAMCoeffs *multiAMcoeffs, const LIGOTimeGPSVector *jointTimestamps, const REAL4VectorAlignedArray *backgroundRatio, const INT4 cosiSign, const assumeNSparams *NSparams, const UserInput_t *params, REAL4VectorAligned *backgroundScaling)
 Add SFTs together from a MultiSFTVector. More...
 
REAL4TimeSeriescomputeNSfreqTS (const PulsarParams *pulsarParams, LIGOTimeGPS tepoch, REAL8 Tsft, REAL8 SFToverlap, REAL8 duration)
 Compute the GW frequency time series (in the SSB) for a set of assumed parameters. More...
 
REAL4VectorAlignedconvertSFTdataToPowers (const SFTVector *sfts, const UserInput_t *params, const REAL8 normalization)
 Convert a SFTVector of sfts into powers. More...
 
REAL4VectorAlignedreadInSFTs (UserInput_t *params, const REAL8 normalization, const REAL8 minfbin, const REAL8 maxfbin)
 Read in the data SFTs in one function. More...
 
MultiLIGOTimeGPSVectorgetMultiTimeStampsFromSFTCatalog (const SFTCatalog *catalog)
 Create a list of timestamps from an SFTCatalog. More...
 
MultiLIGOTimeGPSVectorgetMultiTimeStampsFromSFTs (const MultiSFTVector *multiSFTvector, const UserInput_t *params)
 Create a list of timestamps from SFTs that might be a subset from those in an SFTCatalog, applying KS/Kuipers test if desired. More...
 
MultiLIGOTimeGPSVectorgetMultiTimeStampsFromSegmentsFile (const LALStringVector *filenames, const REAL8 t0, const REAL8 Tsft, const REAL8 SFToverlap, const REAL8 dur)
 Create a list of timestamps from a segment list. More...
 
LIGOTimeGPSVectorjointTimestampsFromMultiTimestamps (const MultiLIGOTimeGPSVector *multiTimestamps)
 
MultiLIGOTimeGPSVectorsqueezeMultiTimestamps (const MultiLIGOTimeGPSVector *multiTS)
 
INT4 printSFTtimestamps2File (const MultiSFTVector *multiSFTvector, const UserInput_t *params)
 
INT4VectormarkBadSFTs (const REAL4VectorAligned *tfdata, const UserInput_t *params)
 Mark the non-Gaussian SFTs using K-S and Kuiper's tests. More...
 
void removeBadSFTs (REAL4VectorAligned *tfdata, const INT4Vector *badsfts)
 Remove the marked SFTs as bad by setting values to 0. More...
 
MultiSFTVectorgenerateSFTdata (UserInput_t *uvar, const MultiLALDetector *detectors, const EphemerisData *edat, const INT4 maxbinshift, const gsl_rng *rng)
 
INT4 slideTFdata (REAL4VectorAligned *output, const UserInput_t *params, const REAL4VectorAligned *tfdata, const INT4Vector *binshifts)
 Slide the time-frequency data to account for detector motion. More...
 
INT4 tfRngMeans (REAL4VectorAligned *output, const REAL4VectorAligned *tfdata, const UINT4 numffts, const UINT4 numfbins, const UINT4 blksize)
 Determine the running mean of each SFT. More...
 
INT4 replaceTFdataWithSubsequentTFdata (REAL4VectorAlignedArray *tfdataarray, const UINT4 numffts)
 
INT4 tfMeanSubtract (REAL4VectorAligned *tfdata, const REAL4VectorAligned *rngMeans, const REAL4VectorAligned *backgroundScaling, const UINT4 numffts, const UINT4 numfbins)
 Subtract running mean values from the SFT data, modifying input time-frequency data. More...
 
INT4 tfWeight (REAL4VectorAligned *output, const REAL4VectorAligned *tfdata, REAL4VectorAligned *rngMeans, REAL4VectorAligned *antPatternWeights, const REAL4VectorAligned *backgroundScaling, const INT4Vector *indexValuesOfExistingSFTs, const UserInput_t *params)
 Weight the SFTs based on antenna pattern and noise variance (Equation 11, assuming the input time-frequency data is already mean subtracted) More...
 
REAL8 determineSumOfWeights (const REAL4VectorAligned *antweightssq, const REAL4VectorAligned *rngMeanssq)
 Determine the sum of the weights. More...
 
INT4VectorexistingSFTs (const REAL4VectorAligned *tfdata, const UINT4 numffts)
 Determine if the SFTs are existing based on whether the first data point of power in each SFT is 0. More...
 
INT4 checkBackgroundScaling (const REAL4VectorAligned *background, const REAL4VectorAligned *backgroundScaling, const INT4Vector *SFTexistVector)
 Go through the backgroundScaling vector and zero out if the SFTexistVector has a 0 in that SFT location instead of 1. More...
 

Go to the source code of this file.

Function Documentation

◆ findSFTdata()

SFTCatalog * findSFTdata ( const UserInput_t params)

Find the SFT data specified by user input.

Parameters
[in]paramsPointer to the UserInput_t
Returns
Pointer to SFTCatalog

Definition at line 35 of file SFTfunctions.c.

◆ extractSFTband()

MultiSFTVector * extractSFTband ( const SFTCatalog catalog,
const REAL8  minfbin,
const REAL8  maxfbin 
)

Extract the SFT coefficients from the band of interest.

Parameters
[in]catalogPointer to the SFTCatalog
[in]minfbinFrequency value of the minimum frequency bin
[in]maxfbinFrequency value of the maximum frequency bin
Returns
Pointer to MultiSFTVector

Definition at line 76 of file SFTfunctions.c.

◆ getMultiSFTVector()

MultiSFTVector * getMultiSFTVector ( UserInput_t params,
const REAL8  minfbin,
const REAL8  maxfbin 
)

Get a MultiSFTVector from the user-input values.

Parameters
[in]paramsPointer to UserInput_t
[in]minfbinFrequency value of the minimum frequency bin
[in]maxfbinFrequency value of the maximum frequency bin
Returns
Pointer to MultiSFTVector

Definition at line 102 of file SFTfunctions.c.

◆ coherentlyAddSFTs()

REAL4VectorAligned * coherentlyAddSFTs ( const MultiSFTVector multiSFTvector,
const MultiSSBtimes multissb,
const MultiAMCoeffs multiAMcoeffs,
const LIGOTimeGPSVector jointTimestamps,
const REAL4VectorAlignedArray backgroundRatio,
const INT4  cosiSign,
const assumeNSparams NSparams,
const UserInput_t params,
REAL4VectorAligned backgroundScaling 
)

Add SFTs together from a MultiSFTVector.

Parameters
[in]multiSFTvectorPointer to a MultiSFTVector containing the SFT data
[in]multissbPointer to a MultiSSBtimes structure
[in]multiAMcoeffsPointer to a MultiAMCoeffs structure
[in]jointTimestampsPointer to a LIGOTimeGPSVector of joint SFT times from all detectors
[in]backgroundRatioPointer to a REAL4VectorAlignedArray of the running means of each IFO divided by the running mean of IFO_0
[in]cosiSignValue of 1, 0, -1 where 1 means average cosi over [0,1], 0 means average over [-1,1], and -1 means average over [-1,0]
[in]NSparamsValues for a set of assumed NS spin/binary motion parameters
[in]paramsPointer to UserInput_t
[out]backgroundScalingPointer to REAL4VectorAligned of background scaling values
Returns
REAL4VectorAligned of powers of the coherently combined SFTs

Definition at line 147 of file SFTfunctions.c.

◆ computeNSfreqTS()

REAL4TimeSeries * computeNSfreqTS ( const PulsarParams pulsarParams,
LIGOTimeGPS  tepoch,
REAL8  Tsft,
REAL8  SFToverlap,
REAL8  duration 
)

Compute the GW frequency time series (in the SSB) for a set of assumed parameters.

This is supposed to be the same as what is done for Makefakedata

Parameters
[in]pulsarParamsPointer to PulsarParams struct
[in]tepochStart time in SSB
[in]TsftSFT length (s)
[in]SFToverlapOverlap of the SFTs (s)
[in]durationTotal duration of the search
Returns
Pointer to REAL4TimeSeries containing the resulting frequency as a function of time

Definition at line 689 of file SFTfunctions.c.

◆ convertSFTdataToPowers()

REAL4VectorAligned * convertSFTdataToPowers ( const SFTVector sfts,
const UserInput_t params,
const REAL8  normalization 
)

Convert a SFTVector of sfts into powers.

Parameters
[in]sftsPointer to the SFTVector
[in]paramsPointer to the UserInput_t
[in]normalizationNormalization value to prevent underflow
Returns
Pointer to REAL4VectorAligned containing powers

Definition at line 753 of file SFTfunctions.c.

◆ readInSFTs()

REAL4VectorAligned * readInSFTs ( UserInput_t params,
const REAL8  normalization,
const REAL8  minfbin,
const REAL8  maxfbin 
)

Read in the data SFTs in one function.

Parameters
[in]paramsPointer to UserInput_t
[in]normalizationNormalization value determined from expected noise background
[in]minfbinFrequency value of the minimum frequency bin
[in]maxfbinFrequency value of the maximum frequency bin
Returns
REAL4VectorAligned of SFT powers

Definition at line 826 of file SFTfunctions.c.

◆ getMultiTimeStampsFromSFTCatalog()

MultiLIGOTimeGPSVector * getMultiTimeStampsFromSFTCatalog ( const SFTCatalog catalog)

Create a list of timestamps from an SFTCatalog.

Parameters
[in]catalogPointer to an SFTCatalog
Returns
Pointer to a list of GPS timestamps in a MultiLIGOTimeGPSVector

Definition at line 849 of file SFTfunctions.c.

◆ getMultiTimeStampsFromSFTs()

MultiLIGOTimeGPSVector * getMultiTimeStampsFromSFTs ( const MultiSFTVector multiSFTvector,
const UserInput_t params 
)

Create a list of timestamps from SFTs that might be a subset from those in an SFTCatalog, applying KS/Kuipers test if desired.

Parameters
[in]multiSFTvectorPointer to a MultiSFTVector
[in]paramsPointer to UserInput_t
Returns
Pointer to a list of GPS timestamps in a MultiLIGOTimeGPSVector

Definition at line 873 of file SFTfunctions.c.

◆ getMultiTimeStampsFromSegmentsFile()

MultiLIGOTimeGPSVector * getMultiTimeStampsFromSegmentsFile ( const LALStringVector filenames,
const REAL8  t0,
const REAL8  Tsft,
const REAL8  SFToverlap,
const REAL8  dur 
)

Create a list of timestamps from a segment list.

Parameters
[in]filenamesLALStringVector of filenames
[in]t0Start time of the search
[in]TsftSFT timespan in seconds
[in]SFToverlapOverlap of the SFTs in seconds
[in]durDuration of the search in seconds
Returns
Pointer to a list of GPS timestamps in a MultiLIGOTimeGPSVector

Definition at line 938 of file SFTfunctions.c.

◆ jointTimestampsFromMultiTimestamps()

LIGOTimeGPSVector * jointTimestampsFromMultiTimestamps ( const MultiLIGOTimeGPSVector multiTimestamps)

Definition at line 981 of file SFTfunctions.c.

◆ squeezeMultiTimestamps()

MultiLIGOTimeGPSVector * squeezeMultiTimestamps ( const MultiLIGOTimeGPSVector multiTS)

Definition at line 1075 of file SFTfunctions.c.

◆ printSFTtimestamps2File()

INT4 printSFTtimestamps2File ( const MultiSFTVector multiSFTvector,
const UserInput_t params 
)
Parameters
[in]multiSFTvectorPointer to MultiSFTVector of the SFTs
[in]paramsPointer to the user input
Returns
Status value

Definition at line 1105 of file SFTfunctions.c.

◆ markBadSFTs()

INT4Vector * markBadSFTs ( const REAL4VectorAligned tfdata,
const UserInput_t params 
)

Mark the non-Gaussian SFTs using K-S and Kuiper's tests.

Parameters
[in]tfdataPointer to REAL4VectorAligned of SFT powers
[in]paramsPointer to UserInput_t
Returns
Pointer to an INT4Vector with marked SFTs to be removed with 1 and keep SFT with 0

Definition at line 1179 of file SFTfunctions.c.

◆ removeBadSFTs()

void removeBadSFTs ( REAL4VectorAligned tfdata,
const INT4Vector badsfts 
)

Remove the marked SFTs as bad by setting values to 0.

Parameters
[in,out]tfdataPointer to REAL4VectorAligned of SFT powers
[in]badsftsPoienter to INT4Vector of bad SFTs

Definition at line 1234 of file SFTfunctions.c.

◆ generateSFTdata()

MultiSFTVector * generateSFTdata ( UserInput_t uvar,
const MultiLALDetector detectors,
const EphemerisData edat,
const INT4  maxbinshift,
const gsl_rng *  rng 
)

Definition at line 1247 of file SFTfunctions.c.

◆ slideTFdata()

INT4 slideTFdata ( REAL4VectorAligned output,
const UserInput_t params,
const REAL4VectorAligned tfdata,
const INT4Vector binshifts 
)

Slide the time-frequency data to account for detector motion.

Parameters
[out]outputPointer to REAL4VectorAligned of SFT powers that have been corrected
[in]paramsPointer to UserInput_t
[in]tfdataPointer to REAL4VectorAligned of SFT powers
[in]binshiftsPointer to INT4Vector of bin shift values
Returns
Status value

Definition at line 1479 of file SFTfunctions.c.

◆ tfRngMeans()

INT4 tfRngMeans ( REAL4VectorAligned output,
const REAL4VectorAligned tfdata,
const UINT4  numffts,
const UINT4  numfbins,
const UINT4  blksize 
)

Determine the running mean of each SFT.

Parameters
[out]outputPointer to REAL4VectorAligned of running mean values of each SFT
[in]tfdataPointer to REAL4VectorAligned of SFT powers
[in]numfftsNumber of SFTs in the observation time
[in]numfbinsNumber of frequency bins
[in]blksizeNumber of bins in the running median
Returns
Status value

Definition at line 1512 of file SFTfunctions.c.

◆ replaceTFdataWithSubsequentTFdata()

INT4 replaceTFdataWithSubsequentTFdata ( REAL4VectorAlignedArray tfdataarray,
const UINT4  numffts 
)
Parameters
[in,out]tfdataarrayPointer to a REAL4VectorAlignedArray that has the time-frequency data of powers
[in]numfftsNumber of FFTs in the total observation time
Returns
Status value

Definition at line 1581 of file SFTfunctions.c.

◆ tfMeanSubtract()

INT4 tfMeanSubtract ( REAL4VectorAligned tfdata,
const REAL4VectorAligned rngMeans,
const REAL4VectorAligned backgroundScaling,
const UINT4  numffts,
const UINT4  numfbins 
)

Subtract running mean values from the SFT data, modifying input time-frequency data.

Parameters
[in,out]tfdataPointer to REAL4VectorAligned time-frequency data (modified by this function!)
[in]rngMeansPointer to REAL4VectorAligned of running mean values
[in]backgroundScalingPointer to REAL4VectorAligned of background scaling values
[in]numfftsNumber of SFTs from observation time
[in]numfbinsNumber of SFT frequency bins
Returns
Status value

Definition at line 1610 of file SFTfunctions.c.

◆ tfWeight()

INT4 tfWeight ( REAL4VectorAligned output,
const REAL4VectorAligned tfdata,
REAL4VectorAligned rngMeans,
REAL4VectorAligned antPatternWeights,
const REAL4VectorAligned backgroundScaling,
const INT4Vector indexValuesOfExistingSFTs,
const UserInput_t params 
)

Weight the SFTs based on antenna pattern and noise variance (Equation 11, assuming the input time-frequency data is already mean subtracted)

Parameters
[out]outputPointer to REAL4VectorAligned of mean subtracted, noise and antenna pattern weighted SFTs
[in]tfdataPointer to REAL4VectorAligned of mean subtracted SFTs
[in]rngMeansPointer to REAL4VectorAligned of running mean values
[in]antPatternWeightsPointer to REAL4VectorAligned of antenna pattern weights
[in]backgroundScalingPointer to REAL4VectorAligned of background scaling values
[in]indexValuesOfExistingSFTsPointer to INT4Vector of the index values of the existing SFTs
[in]paramsPointer to UserInput_t
Returns
Status value

Definition at line 1635 of file SFTfunctions.c.

◆ determineSumOfWeights()

REAL8 determineSumOfWeights ( const REAL4VectorAligned antweightssq,
const REAL4VectorAligned rngMeanssq 
)

Determine the sum of the weights.

Parameters
[in]antweightssqAntenna pattern weights squared
[in]rngMeanssqRunning mean values squared
Returns
Sum of the weights

Definition at line 1717 of file SFTfunctions.c.

◆ existingSFTs()

INT4Vector * existingSFTs ( const REAL4VectorAligned tfdata,
const UINT4  numffts 
)

Determine if the SFTs are existing based on whether the first data point of power in each SFT is 0.

Parameters
[in]tfdataPointer to REAL4VectorAligned of time-frequency data
[in]numfftsNumber of SFTs from the observation time
Returns
Pointer to INT4Vector containing 0 for non-present SFT or 1 for present SFT

Definition at line 1738 of file SFTfunctions.c.

◆ checkBackgroundScaling()

INT4 checkBackgroundScaling ( const REAL4VectorAligned background,
const REAL4VectorAligned backgroundScaling,
const INT4Vector SFTexistVector 
)

Go through the backgroundScaling vector and zero out if the SFTexistVector has a 0 in that SFT location instead of 1.

Parameters
[in,out]backgroundPointer to REAL4VectorAligned of background data
[in,out]backgroundScalingPointer to REAL4VectorAligned of background scaling data
[in]SFTexistVectorPointer to INT4Vector of 0 or 1 values representing if an SFT is present (1) or not (0)
Returns
Status value

Definition at line 1771 of file SFTfunctions.c.