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
TwoSpect.h File Reference

Prototypes

ffdataStructcreateffdata (const UserInput_t *params)
 Create a new frequency-frequency data structure for the TwoSpect analysis. More...
 
void destroyffdata (ffdataStruct *data)
 Free the frequency-frequency data structure. More...
 
INT4VectordetectLines_simple (const REAL4VectorAligned *TFdata, const ffdataStruct *ffdata, const UserInput_t *params)
 Line detection algorithm. More...
 
REAL4VectorSequencetrackLines (const INT4Vector *lines, const INT4Vector *binshifts, const REAL4 minfbin, const REAL4 df)
 Track the lines for the sky position. More...
 
INT4 cleanLines (REAL4VectorAligned *TFdata, const REAL4VectorAligned *background, const INT4Vector *lines, const UserInput_t *params, const gsl_rng *rng)
 Test algorithm to clean lines. More...
 
INT4 makeSecondFFT (ffdataStruct *ffdata, REAL4VectorAligned *tfdata, const REAL4FFTPlan *plan)
 Compute the second Fourier transform for TwoSpect. More...
 
INT4 ffPlaneNoise (REAL4VectorAligned *aveNoise, const UserInput_t *params, const INT4Vector *sftexist, const REAL4VectorAligned *aveNoiseInTime, const REAL4VectorAligned *antweights, const REAL4VectorAligned *backgroundScaling, const REAL4FFTPlan *plan, const REAL4VectorAligned *expDistVals, const gsl_rng *rng, REAL8 *normalization)
 Measure of the average noise power in each 2nd FFT frequency bin. More...
 
REAL4 avgTFdataBand (const REAL4VectorAligned *backgrnd, UINT4 numfbins, UINT4 numffts, UINT4 binmin, UINT4 binmax)
 Determine the average of the noise power in each frequency bin across the band. More...
 
REAL4 rmsTFdataBand (const REAL4VectorAligned *backgrnd, UINT4 numfbins, UINT4 numffts, UINT4 binmin, UINT4 binmax)
 Determine the rms of the noise power in each frequency bin across the band. More...
 
REAL4VectorAlignedcalcAveTFnoisePerFbinRatio (const REAL4VectorAligned *background, const REAL4VectorAligned *backgroundScaling, const UINT4 numffts)
 Calculate the ratio of the average SFT noise to the mean of the average SFT noise. More...
 
INT4 medianBackgroundBandInTime (REAL4VectorAligned *aveNoiseInTime, const REAL4VectorAligned *backgrnd, const INT4Vector *sftexist)
 
MultiLALDetectorsetupMultiLALDetector (LALStringVector *IFO)
 
INT4 readTwoSpectInputParams (UserInput_t *uvar, int argc, char *argv[])
 
INT4 printREAL4Vector2File (const REAL4Vector *vector, const CHAR *directory, const CHAR *filename)
 Print REAL4Vector values to an ASCII file. More...
 

Go to the source code of this file.

Function Documentation

◆ createffdata()

ffdataStruct * createffdata ( const UserInput_t params)

Create a new frequency-frequency data structure for the TwoSpect analysis.

Parameters
[in]paramsPointer to the UserInput_t
Returns
Pointer to new ffdataStruct

Definition at line 1185 of file TwoSpect.c.

◆ destroyffdata()

void destroyffdata ( ffdataStruct data)

Free the frequency-frequency data structure.

Parameters
[in]dataPointer to the ffdataStruct

Definition at line 1209 of file TwoSpect.c.

◆ detectLines_simple()

INT4Vector * detectLines_simple ( const REAL4VectorAligned TFdata,
const ffdataStruct ffdata,
const UserInput_t params 
)

Line detection algorithm.

  1. Calculate RMS for each fbin as function of time
  2. Calculate running median of RMS values
  3. Divide RMS values by running median. Lines stick out by being >>1
  4. Add up number of lines above threshold and report
Parameters
[in]TFdataPointer to REAL4VectorAligned of SFT powers
[in]ffdataPointer to ffdataStruct
[in]paramsPointer to UserInput_t
Returns
Pointer to INT4Vector of bin number of the lines

Definition at line 1231 of file TwoSpect.c.

◆ trackLines()

REAL4VectorSequence * trackLines ( const INT4Vector lines,
const INT4Vector binshifts,
const REAL4  minfbin,
const REAL4  df 
)

Track the lines for the sky position.

Parameters
[in]linesPointer to INT4Vector with list of lines
[in]binshiftsPointer to INT4Vector of SFT bin shifts
[in]minfbinFrequency value of the lowest frequency bin
[in]dfSpacing of frequency bins (typically 1/Tsft)
Returns
Pointer to REAL4VectorSequence containing lower/mid/upper frequency for each line

Definition at line 1318 of file TwoSpect.c.

◆ cleanLines()

INT4 cleanLines ( REAL4VectorAligned TFdata,
const REAL4VectorAligned background,
const INT4Vector lines,
const UserInput_t params,
const gsl_rng *  rng 
)

Test algorithm to clean lines.

NOT FULLY TESTED!

Parameters
[in,out]TFdataPointer to time-frequency data in a REAL4Vector to be cleaned
[in]backgroundPointer to REAL4Vector of running mean data
[in]linesPointer to INT4Vector of lines
[in]paramsPointer to UserInput_t
[in]rngPointer to gsl_rng
Returns
Status value

Definition at line 1359 of file TwoSpect.c.

◆ makeSecondFFT()

INT4 makeSecondFFT ( ffdataStruct output,
REAL4VectorAligned tfdata,
const REAL4FFTPlan *  plan 
)

Compute the second Fourier transform for TwoSpect.

Parameters
[out]outputPointer to the ffdataStruct to the containers for the second FFT
[in]tfdataPointer REAL4VectorAligned of mean subtracted and weighted data
[in]planPointer to REAL4FFTPlan
Returns
Status value

Definition at line 1435 of file TwoSpect.c.

◆ ffPlaneNoise()

INT4 ffPlaneNoise ( REAL4VectorAligned aveNoise,
const UserInput_t params,
const INT4Vector sftexist,
const REAL4VectorAligned aveNoiseInTime,
const REAL4VectorAligned antweights,
const REAL4VectorAligned backgroundScaling,
const REAL4FFTPlan *  plan,
const REAL4VectorAligned expDistVals,
const gsl_rng *  rng,
REAL8 normalization 
)

Measure of the average noise power in each 2nd FFT frequency bin.

Parameters
[out]aveNoisePointer to REAL4VectorAligned of the expected 2nd FFT powers
[in]paramsPointer to UserInput_t
[in]sftexistPointer to INT4Vector of SFTs existing or not
[in]aveNoiseInTimePointer to REAL4VectorAligned of running means
[in]antweightsPointer to REAL4VectorAligned of antenna pattern weights
[in]backgroundScalingPointer to REAL4VectorAligned of background scaling values
[in]planPointer to REAL4FFTPlan
[in]expDistValsPointer to REAL4VectorAligned of precomputed exponentially distributed random values to sample from
[in]rngPointer to gsl_rng
[in,out]normalizationPointer to REAL8 value of the normalization for the 2nd FFT
Returns
Status value

Definition at line 1596 of file TwoSpect.c.

◆ avgTFdataBand()

REAL4 avgTFdataBand ( const REAL4VectorAligned backgrnd,
UINT4  numfbins,
UINT4  numffts,
UINT4  binmin,
UINT4  binmax 
)

Determine the average of the noise power in each frequency bin across the band.

Parameters
[in]backgrndPointer to REAL4VectorAligned of the running mean values
[in]numfbinsNumber of frequency bins in the SFTs
[in]numfftsNumber of SFTs in the observation time
[in]binminMinimum SFT bin to look at with this algorithm
[in]binmaxMaximum SFT bin to look at with this algorithm
Returns
The average of the noise power across the frequency band

Definition at line 1507 of file TwoSpect.c.

◆ rmsTFdataBand()

REAL4 rmsTFdataBand ( const REAL4VectorAligned backgrnd,
UINT4  numfbins,
UINT4  numffts,
UINT4  binmin,
UINT4  binmax 
)

Determine the rms of the noise power in each frequency bin across the band.

Parameters
[in]backgrndPointer to REAL4Vector of the running mean values
[in]numfbinsNumber of frequency bins in the SFTs
[in]numfftsNumber of SFTs in the observation time
[in]binminMinimum SFT bin to look at with this algorithm
[in]binmaxMaximum SFT bin to look at with this algorithm
Returns
The RMS of the noise power across the frequency band

Definition at line 1541 of file TwoSpect.c.

◆ calcAveTFnoisePerFbinRatio()

REAL4VectorAligned * calcAveTFnoisePerFbinRatio ( const REAL4VectorAligned background,
const REAL4VectorAligned backgroundScaling,
const UINT4  numffts 
)

Calculate the ratio of the average SFT noise to the mean of the average SFT noise.

Parameters
[in]backgroundPointer to REAL4VectorAligned of the running means
[in]backgroundScalingPointer to REAL4VectorAligned of background scaling values
[in]numfftsNumber of SFTs in the total observation time
Returns
Pointer to REAL4VectorAligned of the ratio of values to the band mean

Definition at line 1398 of file TwoSpect.c.

◆ medianBackgroundBandInTime()

INT4 medianBackgroundBandInTime ( REAL4VectorAligned aveNoiseInTime,
const REAL4VectorAligned backgrnd,
const INT4Vector sftexist 
)

Definition at line 1566 of file TwoSpect.c.

◆ setupMultiLALDetector()

MultiLALDetector * setupMultiLALDetector ( LALStringVector IFO)
Parameters
[in]IFOPointer to LALStringVector of the IFO names like H1/L1/V1/etc.
Returns
Pointer to MultiLALDetector

Definition at line 1761 of file TwoSpect.c.

◆ readTwoSpectInputParams()

INT4 readTwoSpectInputParams ( UserInput_t uvar,
int  argc,
char argv[] 
)

Definition at line 1803 of file TwoSpect.c.

◆ printREAL4Vector2File()

INT4 printREAL4Vector2File ( const REAL4Vector vector,
const CHAR directory,
const CHAR filename 
)

Print REAL4Vector values to an ASCII file.

Parameters
[in]vectorPointer to the REAL4Vector to be printed
[in]directoryCHAR array of the file path
[in]filenameCHAR array of the file name
Returns
Status value

Definition at line 2087 of file TwoSpect.c.