20#ifndef __SFTFUNCTIONS_H__
21#define __SFTFUNCTIONS_H__
23#include <lal/SSBtimes.h>
24#include <lal/LALComputeAM.h>
25#include <lal/LALInitBarycenter.h>
27#include <gsl/gsl_sf_trig.h>
REAL4VectorAligned * readInSFTs(UserInput_t *params, const REAL8 normalization, const REAL8 minfbin, const REAL8 maxfbin)
Read in the data SFTs in one function.
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,...
REAL8 determineSumOfWeights(const REAL4VectorAligned *antweightssq, const REAL4VectorAligned *rngMeanssq)
Determine the sum of the weights.
INT4 tfRngMeans(REAL4VectorAligned *output, const REAL4VectorAligned *tfdata, const UINT4 numffts, const UINT4 numfbins, const UINT4 blksize)
Determine the running mean of each SFT.
void removeBadSFTs(REAL4VectorAligned *tfdata, const INT4Vector *badsfts)
Remove the marked SFTs as bad by setting values to 0.
LIGOTimeGPSVector * jointTimestampsFromMultiTimestamps(const MultiLIGOTimeGPSVector *multiTimestamps)
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.
INT4 replaceTFdataWithSubsequentTFdata(REAL4VectorAlignedArray *tfdataarray, const UINT4 numffts)
INT4Vector * markBadSFTs(const REAL4VectorAligned *tfdata, const UserInput_t *params)
Mark the non-Gaussian SFTs using K-S and Kuiper's tests.
SFTCatalog * findSFTdata(const UserInput_t *params)
Find the SFT data specified by user input.
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.
INT4 printSFTtimestamps2File(const MultiSFTVector *multiSFTvector, const UserInput_t *params)
MultiSFTVector * extractSFTband(const SFTCatalog *catalog, const REAL8 minfbin, const REAL8 maxfbin)
Extract the SFT coefficients from the band of interest.
REAL4VectorAligned * convertSFTdataToPowers(const SFTVector *sfts, const UserInput_t *params, const REAL8 normalization)
Convert a SFTVector of sfts into powers.
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-fre...
MultiSFTVector * generateSFTdata(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.
MultiLIGOTimeGPSVector * squeezeMultiTimestamps(const MultiLIGOTimeGPSVector *multiTS)
MultiSFTVector * getMultiSFTVector(UserInput_t *params, const REAL8 minfbin, const REAL8 maxfbin)
Get a MultiSFTVector from the user-input values.
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 locati...
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.
MultiLIGOTimeGPSVector * getMultiTimeStampsFromSFTCatalog(const SFTCatalog *catalog)
Create a list of timestamps from an SFTCatalog.
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.
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.
A vector of COMPLEX8FrequencySeries.
This structure contains all information about the center-of-mass positions of the Earth and Sun,...
A vector of 'timestamps' of type LIGOTimeGPS.
Multi-IFO container for antenna-pattern coefficients and atenna-pattern matrix .
array of detectors definitions 'LALDetector'
A collection of (multi-IFO) LIGOTimeGPSVector time-stamps vectors.
A collection of SFT vectors – one for each IFO in a multi-IFO search.
Multi-IFO container for SSB timings.
Type defining the parameters of a pulsar-source of CW Gravitational waves.
An "SFT-catalogue": a vector of SFTdescriptors, as returned by XLALSFTdataFind()
LIGOTimeGPS * assumeNSorbitTp
LIGOTimeGPS * assumeNSrefTime