Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-8a6b96f
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
SpectralInterpolation.h
Go to the documentation of this file.
1#ifndef _SPLINTER_PULSAR_H
2#define _SPLINTER_PULSAR_H
3
4#define _GNU_SOURCE /* for alphasort() and scandir() */
5
6#include "config.h"
7
8#include <sys/time.h>
9
10#include <complex.h>
11#include <stdio.h>
12#include <stdlib.h>
13#include <unistd.h>
14#include <errno.h>
15#include <stdarg.h>
16#include <math.h>
17#include <string.h>
18#include <getopt.h>
19#include <unistd.h>
20#include <sys/types.h>
21#include <sys/stat.h>
22
23#include <gsl/gsl_sort_double.h>
24#include <gsl/gsl_statistics_double.h>
25#include <gsl/gsl_sf_gamma.h>
26
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>
41#include <lal/Units.h>
42#include <lal/TimeSeries.h>
43#include <lal/XLALError.h>
44#include <lal/LALCache.h>
45#include <lal/LALPulsarVCSInfo.h>
46
47/* Usage format string. */
48#define USAGE \
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\
61 (.par file)\n"\
62" --param-dir (-d) name of directory containing pulsar parameter\n\
63 files when using multiple input files (.par\n\
64 files)\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\
74 format.\n"\
75"\nThe following are not required but are set to defaults if not\n\
76specified:\n\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\
81 list)\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\
89 (default zero)\n"\
90" --freq-factor (-m) factor which multiplies the pulsar spin\n\
91 frequency (default 2.0 i.e. a signal from a\n\
92 triaxial pulsar)\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\
101 be gzipped\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\
105 the geocentre.\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\
109 stderr\n"\
110"\n"
111
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
116
117#define FILENAME_MAXLEN 1024
118
119typedef struct tagInputParams {
120 CHAR ifo[3];
121
123 CHAR paramfile[FILENAME_MAXLEN];
124
125 CHAR PSRname [12];
127
130
132
133 REAL8 stddevthresh;
136
138
139 CHAR filePattern[FILENAME_MAXLEN];
140
142 CHAR segfile[FILENAME_MAXLEN];
143
144 REAL8 freqfactor;
146
147 UINT4 geocentre;
153
156
159
161
162typedef struct tagSplInterParams {
164
169
170void get_input_args( InputParams *inputParam, int argc, char *argv[] );
171
173 REAL8Vector *imrmdata, REAL8Vector *times, REAL8 stddevthresh );
174
176
178
179#endif /* _SPLINTER_PULSAR_H */
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)
#define FILENAME_MAXLEN
double REAL8
char CHAR
uint32_t UINT4
int32_t INT4
float data[BLOCKSIZE]
Definition: hwinject.c:360