LALPulsar 7.1.1.1-eeff03c
pulsar_crosscorr.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2007 Badri Krishnan
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with with program; see the file COPYING. If not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301 USA
18 */
19
20/**
21 * \defgroup lalpulsar_bin_CrossCorr Cross-Correlation Search Applications
22 * \ingroup lalpulsar_bin_Apps
23 */
24
25/**
26 * \author Christine Chung, Badri Krishnan, John Whelan
27 * \date 2008
28 * \file
29 * \ingroup lalpulsar_bin_CrossCorr
30 * \brief Header for CW cross-correlation search
31 *
32 */
33
34/*
35 * Protection against double inclusion (include-loop protection)
36 * Note the naming convention!
37 */
38
39#ifndef _PULSAR_CROSSCORR_H
40#define _PULSAR_CROSSCORR_H
41
42#include "config.h"
43
44#include <sys/types.h>
45#include <sys/stat.h>
46#include <fcntl.h>
47#include <string.h>
48#include <stdio.h>
49#include <stdlib.h>
50#include <math.h>
51#include <glob.h>
52#include <time.h>
53#include <errno.h>
54
55#include <gsl/gsl_cdf.h>
56
57#include <lal/AVFactories.h>
58#include <lal/Date.h>
59#include <lal/DetectorSite.h>
60#include <lal/LALDatatypes.h>
61#include <lal/LALHough.h>
62#include <lal/RngMedBias.h>
63#include <lal/LALRunningMedian.h>
64#include <lal/Velocity.h>
65#include <lal/Statistics.h>
66#include <lal/ComputeFstat.h>
67#include <lal/UserInput.h>
68#include <lal/SFTfileIO.h>
69#include <lal/NormalizeSFTRngMed.h>
70#include <lal/LALInitBarycenter.h>
71#include <lal/SFTClean.h>
72#include <lal/FrequencySeries.h>
73#include <lal/Sequence.h>
74#include <lal/PulsarCrossCorr.h>
75#include <lal/LALPulsarVCSInfo.h>
76
77
78/******************************************************
79 * Protection against C++ name mangling
80 */
81
82#ifdef __cplusplus
83extern "C" {
84#endif
85
86
87/******************************************************
88 * Error codes and messages.
89 */
90
91#define PULSAR_CROSSCORR_ENORM 0
92#define PULSAR_CROSSCORR_ESUB 1
93#define PULSAR_CROSSCORR_EARG 2
94#define PULSAR_CROSSCORR_EBAD 3
95#define PULSAR_CROSSCORR_EFILE 4
96#define PULSAR_CROSSCORR_EDIR 5
97#define PULSAR_CROSSCORR_ENULL 6
98#define PULSAR_CROSSCORR_ENONULL 7
99#define PULSAR_CROSSCORR_EVAL 8
100#define PULSAR_CROSSCORR_EMEM 9
101
102#define PULSAR_CROSSCORR_MSGENORM "Normal exit"
103#define PULSAR_CROSSCORR_MSGESUB "Subroutine failed"
104#define PULSAR_CROSSCORR_MSGEARG "Error parsing arguments"
105#define PULSAR_CROSSCORR_MSGEBAD "Bad argument values"
106#define PULSAR_CROSSCORR_MSGEFILE "Could not create output file"
107#define PULSAR_CROSSCORR_MSGEDIR "Could not create directory"
108#define PULSAR_CROSSCORR_MSGENULL "Null pointer"
109#define PULSAR_CROSSCORR_MSGENONULL "Non-null pointer"
110#define PULSAR_CROSSCORR_MSGEVAL "Invalid value"
111#define PULSAR_CROSSCORR_MSGEMEM "Out of memory"
112
113#define PIXELFACTOR 2
114
115
116/* ******************************************************************
117 * Structure, enum, union, etc., typdefs.
118 */
119
120/*
121 * Functions Declarations (i.e., prototypes).
122 */
123
125 SkyPatchesInfo *out,
126 CHAR *skyFileName,
127 CHAR *skyRegion,
128 REAL8 dAlpha,
129 REAL8 dDelta );
130
132 REAL8Vector *fdots,
133 PulsarDopplerParams *thisPoint,
134 LIGOTimeGPS refTime,
135 REAL8 f_current,
136 REAL8 q1_current,
137 REAL8 q2_current,
138 REAL8 n_current,
139 REAL8 fdot_current,
140 REAL8 fddot_current );
141
142
145 SFTListElement *sftHead,
146 REAL8ListElement *freqHead,
147 REAL8ListElement *phaseHead,
148 SkyPosition skypos,
150 PulsarDopplerParams *thisPoint );
151
153 REAL8Vector *fdots,
154 REAL8 f0,
155 REAL8 q1,
156 REAL8 q2,
157 REAL8 n );
158
160 SFTCatalog *catalog,
161 SFTVector **sft,
162 REAL8 fMin,
163 REAL8 fMax,
164 INT4 sftindex );
165
167 SFTListElement **sftHead,
168 SFTListElement **sftTail,
169 SFTtype *sft );
170
172 PSDListElement **psdHead,
173 PSDListElement **psdTail,
174 INT4 length );
175
177 REAL8ListElement **head,
178 REAL8ListElement **tail );
179
182 CrossCorrBeamFnListElement **beamTail );
183
185 SFTListElement **sftHead );
186
188 PSDListElement **psdHead );
189
191 REAL8ListElement **head );
192
194 CrossCorrBeamFnListElement **beamHead );
195
196
197/* ****************************************************** */
198
199#ifdef __cplusplus
200} /* Close C++ protection */
201#endif
202
203
204#endif /* Close double-include protection _PULSAR_CROSSCORR_H */
double REAL8
char CHAR
int32_t INT4
void DeleteSFTHead(LALStatus *status, SFTListElement **sftHead)
void AddBeamFntoList(LALStatus *status, CrossCorrBeamFnListElement **beamHead, CrossCorrBeamFnListElement **beamTail)
void CopySFTFromCatalog(LALStatus *status, SFTCatalog *catalog, SFTVector **sft, REAL8 fMin, REAL8 fMax, INT4 sftindex)
void AddPSDtoList(LALStatus *status, PSDListElement **psdHead, PSDListElement **psdTail, INT4 length)
void DeletePSDHead(LALStatus *status, PSDListElement **psdHead)
void CalculateFdots(LALStatus *status, REAL8Vector *fdots, REAL8 f0, REAL8 q1, REAL8 q2, REAL8 n)
void AddSFTtoList(LALStatus *status, SFTListElement **sftHead, SFTListElement **sftTail, SFTtype *sft)
void InitDoppParams(LALStatus *status, REAL8Vector *fdots, PulsarDopplerParams *thisPoint, LIGOTimeGPS refTime, REAL8 f_current, REAL8 q1_current, REAL8 q2_current, REAL8 n_current, REAL8 fdot_current, REAL8 fddot_current)
void DeleteREAL8Head(LALStatus *status, REAL8ListElement **head)
void DeleteBeamFnHead(LALStatus *status, CrossCorrBeamFnListElement **beamHead)
void GetBeamInfo(LALStatus *status, CrossCorrBeamFnListElement *beamHead, SFTListElement *sftHead, REAL8ListElement *freqHead, REAL8ListElement *phaseHead, SkyPosition skypos, EphemerisData *edat, PulsarDopplerParams *thisPoint)
void AddREAL8toList(LALStatus *status, REAL8ListElement **head, REAL8ListElement **tail)
void SetUpRadiometerSkyPatches(LALStatus *status, SkyPatchesInfo *out, CHAR *skyFileName, CHAR *skyRegion, REAL8 dAlpha, REAL8 dDelta)
Set up location of skypatch centers and sizes If user specified skyRegion then use DopplerScan functi...
A vector of COMPLEX8FrequencySeries.
This structure contains all information about the center-of-mass positions of the Earth and Sun,...
Type containing the 'Doppler-parameters' affecting the time-evolution of the phase.
An "SFT-catalogue": a vector of SFTdescriptors, as returned by XLALSFTdataFind()
Definition: SFTfileIO.h:238
struct holding info about skypoints