70#include <lal/LALStdlib.h>
71#include <lal/LALConstants.h>
72#include <lal/AVFactories.h>
73#include <lal/SeqFactories.h>
74#include <lal/SFTfileIO.h>
75#include <lal/Random.h>
76#include <lal/PulsarDataTypes.h>
77#include <lal/UserInput.h>
79#include <lal/RngMedBias.h>
81#include <gsl/gsl_statistics.h>
82#include <gsl/gsl_rng.h>
83#include <gsl/gsl_randist.h>
84#include <gsl/gsl_sort.h>
93#define SFTCLEANH_ENULL 1
94#define SFTCLEANH_EFILE 2
95#define SFTCLEANH_EHEADER 3
96#define SFTCLEANH_EENDIAN 4
97#define SFTCLEANH_EVAL 5
98#define SFTCLEANH_ELINENAME 6
99#define SFTCLEANH_ESEEK 9
100#define SFTCLEANH_EREAD 10
101#define SFTCLEANH_EWRITE 11
103#define SFTCLEANH_MSGENULL "Null pointer"
104#define SFTCLEANH_MSGEFILE "Could not open file"
105#define SFTCLEANH_MSGEHEADER "Incorrect header in file"
106#define SFTCLEANH_MSGEENDIAN "Incorrect endian type"
107#define SFTCLEANH_MSGEVAL "Invalid value"
108#define SFTCLEANH_MSGELINENAME "Invalid linefile name"
109#define SFTCLEANH_MSGESEEK "fseek failed"
110#define SFTCLEANH_MSGEREAD "fread failed"
111#define SFTCLEANH_MSGEWRITE "fwrite failed"
132typedef struct tagLineNoiseInfo {
143typedef struct tagLineHarmonicsInfo {
void LALCleanMultiSFTVect(LALStatus *status, MultiSFTVector *multVect, INT4 width, INT4 window, LineNoiseInfo *lineInfo, RandomParams *randPar)
Function to clean a sft vector – calls LALCleanCOMPLEX8SFT repeatedly for each sft in vector.
void LALFindNumberLines(LALStatus *status, LineNoiseInfo *lineInfo, CHAR *fname)
Finds total number of spectral-lines contained in case the input file is a list of explicit spectral ...
void LALRemoveKnownLinesInSFTVect(LALStatus *status, SFTVector *sftVect, INT4 width, INT4 window, CHAR *linefile, RandomParams *randPar)
function to remove lines from a sft vector given a file containing list of lines
void LALRemoveKnownLinesInMultiSFTVector(LALStatus *status, MultiSFTVector *multiSFTVect, INT4 width, INT4 window, LALStringVector *linefiles, RandomParams *randPar)
top level function to remove lines from a multi sft vector given a list of files containing list of k...
void LALCleanSFTVector(LALStatus *status, SFTVector *sftVect, INT4 width, INT4 window, LineNoiseInfo *lineInfo, RandomParams *randPar)
Function to clean a sft vector – calls LALCleanCOMPLEX8SFT repeatedly for each sft in vector.
void LALChooseLines(LALStatus *status, LineNoiseInfo *outLine, LineNoiseInfo *inLine, REAL8 freqMin, REAL8 freqMax)
Takes a set of spectral lines and a frequency range as input and returns those lines which lie within...
void LALReadLineInfo(LALStatus *status, LineNoiseInfo *lineInfo, CHAR *fname)
Reads information from file containing list of explicit lines - obsolete.
void LALCheckLines(LALStatus *status, INT4 *flag, LineNoiseInfo *lines, REAL8 freq)
Function to count how many lines affect a given frequency.
void LALFindNumberHarmonics(LALStatus *status, LineHarmonicsInfo *harmonicInfo, CHAR *fname)
Looks into the input file containing list of lines, does some checks on the file format,...
void LALReadHarmonicsInfo(LALStatus *status, LineHarmonicsInfo *lineInfo, CHAR *fname)
Reads in the contents of the input line-info file and fills up the LineHarmonicsInfo structure.
void LALHarmonics2Lines(LALStatus *status, LineNoiseInfo *lineInfo, LineHarmonicsInfo *harmonicsInfo)
Converts the list of harmonic sets into an explicit list of spectral lines.
void LALCleanCOMPLEX8SFT(LALStatus *status, SFTtype *sft, INT4 width, INT4 window, LineNoiseInfo *lineInfo, RandomParams *randPar)
Function for cleaning a SFT given a set of known spectral disturbances.
A vector of COMPLEX8FrequencySeries.
structure for storing the contents of the input list of known spectral disturbances
REAL8 * gapFreq
frequency difference between adjacent harmonics in Hz
REAL8 * rightWing
width to the right in Hz
INT4 nHarmonicSets
number of sets of harmonics
REAL8 * leftWing
width to the left of each line in set in Hz
INT4 * numHarmonics
Number of harmonics.
REAL8 * startFreq
starting frequency of set in Hz
structure for storing list of spectral lines – constructed by expanding list of harmonics
REAL8 * lineFreq
central frequency of the line in Hz
REAL8 * leftWing
width to the left from central frequency in Hz
REAL8 * rightWing
width to the right in Hz
INT4 nLines
number of lines
A collection of SFT vectors – one for each IFO in a multi-IFO search.