1#ifndef _SPLINTER_PULSAR_H
2#define _SPLINTER_PULSAR_H
23#include <gsl/gsl_sort_double.h>
24#include <gsl/gsl_statistics_double.h>
25#include <gsl/gsl_sf_gamma.h>
27#include <lal/BinaryPulsarTiming.h>
28#include <lal/LALConstants.h>
29#include <lal/LALStdlib.h>
30#include <lal/LALAtomicDatatypes.h>
31#include <lal/LALDatatypes.h>
32#include <lal/AVFactories.h>
33#include <lal/LALBarycenter.h>
34#include <lal/LALInitBarycenter.h>
35#include <lal/SkyCoordinates.h>
36#include <lal/DetectorSite.h>
37#include <lal/DetResponse.h>
38#include <lal/FrequencySeries.h>
39#include <lal/SFTfileIO.h>
40#include <lal/LALString.h>
42#include <lal/TimeSeries.h>
43#include <lal/XLALError.h>
44#include <lal/LALCache.h>
45#include <lal/LALPulsarVCSInfo.h>
49"Usage: lalpulsar_SplInter [options]\n\n"\
50" --help (-h) display this message\n"\
51"\nRequired Input Variables:\n\n"\
52" --ifo (-i) name of ifo e.g. L1, H1, H2, G1\n"\
53" --start-freq (-S) Start frequency of the SFTs\n"\
54" --end-freq (-E) End frequency of the SFTs\n"\
55" --ephem-dir (-e) directory containing the ephemeris files\n"\
56" --output-dir (-o) directory for output data files\n"\
57" --seg-file (-l) name of file containing science segment list\n"\
58"\nPlus one of the following:\n\n"\
59" --param-file (-P) name of file containing initial pulsar\n\
60 parameters when using just one file as input\n\
62" --param-dir (-d) name of directory containing pulsar parameter\n\
63 files when using multiple input files (.par\n\
65"\n and one of the following:\n\n"\
66" --sft-cache (-F) location of list of SFTs for use, can use\n\
67 list:listsfts.txt or /location/*.sft\n"\
68" --sft-loc (-L) directory of files containing a list of SFTs\n\
69 for each segment, located in\n\
70 /sft-loc/Segment_Start-End.sftcache, where\n\
71 Start and End are the start and end of the\n\
72 segments in the seg-file.\n"\
73" --sft-lalcache (-C) file containing a list of SFTs in the LALCache\n\
75"\nThe following are not required but are set to defaults if not\n\
77" --starttime (-s) start time of the analysis (default 0 i.e. from\n\
78 the start of the available data/segment list)\n"\
79" --finishtime (-f) finish time of the analysis (default Infinity\n\
80 i.e. to the end of the available data/segment\n\
82" --psr-name (-N) set the name of the pulsar for the output file.\n\
83 This option will overwrite any name set in\n\
84 the parfile. The name is only set if the\n\
85 param-file option is used. (default: not set)\n"\
86" --stddev-thresh (-T) Set the number of standard deviations to use as\n\
87 the threshold for removing outliers. Set to\n\
88 zero for no outlier removal to be performed.\n\
90" --freq-factor (-m) factor which multiplies the pulsar spin\n\
91 frequency (default 2.0 i.e. a signal from a\n\
93" --bandwidth (-b) width of frequency band around central\n\
94 frequency to use when performing the\n\
95 interpolation. (default 0.3Hz)\n"\
96" --min-seg-length (-M) Minimum length of segments (default 1800s)\n"\
97" --max-seg-length (-Z) Maximum length of segments (default INFINITY).\n\
98 Use this to reduce memory requirement if\n\
99 trying to read in SFTs for long segement.\n"\
100" --gzip (-G) If this flag is set then the output files will\n\
102"\nThe following flags are used in testing only, but are included here\n\
103for completeness (defaults for all are not to set the flag) \n"\
104" --geocentreFlag (-g) Flag to set the position of the ifo to be at\n\
106" --baryFlag (-B) Flag to set the position of the ifo to be at\n\
107 the solar system barycentre.\n"\
108" --output-timing (-t) Flags whether to print timing information to\n\
112#define XLAL_FRESNEL_EPS 6.0e-8
113#define XLAL_FRESNEL_MAXIT 100
114#define XLAL_FRESNEL_FPMIN 1.0e-30
115#define XLAL_FRESNEL_XMIN 1.5
117#define FILENAME_MAXLEN 1024
119typedef struct tagInputParams {
162typedef struct tagSplInterParams {
REAL8Vector * subtract_running_median(REAL8Vector *data, REAL8Vector *timeStamp, UINT4 npoints)
void get_input_args(InputParams *inputParam, int argc, char *argv[])
INT4 remove_outliers_using_running_median_data(REAL8Vector *redata, REAL8Vector *imdata, REAL8Vector *rermdata, REAL8Vector *imrmdata, REAL8Vector *times, REAL8 stddevthresh)
INT4 XLALFresnel(REAL8 *C, REAL8 *S, REAL8 x)