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
DriveHoughColor.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2005 Badri Krishnan, Alicia Sintes
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 * \file DriveHoughColor.h
22 * \ingroup lalpulsar_bin_Hough
23 * \author Alicia Sintes, Badri Krishnan
24 * \brief Header file for non-demodulated Hough search
25 *
26 * File Name: DRIVEHOUGHCOLOR.h
27 *
28 * Authors: Sintes, A.M., Krishnan, B.
29 *
30 * History: Created by Sintes June 16, 2003
31 * to test part of the Hough-Driver code.
32 *
33 * -----------------------------------------------------------------------
34 */
35
36/*
37 * Protection against double inclusion (include-loop protection)
38 * Note the naming convention!
39 */
40
41#ifndef _DRIVEHOUGHCOLOR_H
42#define _DRIVEHOUGHCOLOR_H
43
44#include "config.h"
45
46#include <sys/types.h>
47#include <sys/stat.h>
48#include <fcntl.h>
49#include <string.h>
50#include <stdio.h>
51#include <stdlib.h>
52#include <math.h>
53#include <glob.h>
54#include <time.h>
55#include <errno.h>
56
57#include <gsl/gsl_cdf.h>
58
59#include <lal/Date.h>
60#include <lal/DetectorSite.h>
61#include <lal/LALDatatypes.h>
62#include <lal/LALHough.h>
63#include <lal/RngMedBias.h>
64#include <lal/LALRunningMedian.h>
65#include <lal/Velocity.h>
66#include <lal/Statistics.h>
67#include <lal/ComputeFstat.h>
68#include <lal/UserInput.h>
69#include <lal/SFTfileIO.h>
70#include <lal/NormalizeSFTRngMed.h>
71#include <lal/LALInitBarycenter.h>
72#include <lal/SFTClean.h>
73#include <lal/LALPulsarVCSInfo.h>
74
75#include "PeakSelect.h"
76
77/******************************************************
78 * Protection against C++ name mangling
79 */
80
81#ifdef __cplusplus
82extern "C" {
83#endif
84
85
86/******************************************************
87 * Error codes and messages.
88 */
89
90#define DRIVEHOUGHCOLOR_ENORM 0
91#define DRIVEHOUGHCOLOR_ESUB 1
92#define DRIVEHOUGHCOLOR_EARG 2
93#define DRIVEHOUGHCOLOR_EBAD 3
94#define DRIVEHOUGHCOLOR_EFILE 4
95#define DRIVEHOUGHCOLOR_EDIR 4
96#define DRIVEHOUGHCOLOR_ENULL 5
97#define DRIVEHOUGHCOLOR_ENONULL 5
98
99#define DRIVEHOUGHCOLOR_MSGENORM "Normal exit"
100#define DRIVEHOUGHCOLOR_MSGESUB "Subroutine failed"
101#define DRIVEHOUGHCOLOR_MSGEARG "Error parsing arguments"
102#define DRIVEHOUGHCOLOR_MSGEBAD "Bad argument values"
103#define DRIVEHOUGHCOLOR_MSGEFILE "Could not create output file"
104#define DRIVEHOUGHCOLOR_MSGEDIR "Could not create directory"
105#define DRIVEHOUGHCOLOR_MSGENULL "Null pointer"
106#define DRIVEHOUGHCOLOR_MSGENONULL "Not a Null pointer"
107
108/*********************************************************************/
109/* Macros for printing errors & testing subroutines (from Creighton) */
110/*********************************************************************/
111
112#define ERROR( code, msg, statement ) \
113do { \
114 if ( lalDebugLevel & LALERROR ) \
115 XLALPrintError( "Error[0] %d: program %s, file %s, line %d, %s\n" \
116 " %s %s\n", (code), *argv, __FILE__, \
117 __LINE__, "$Id$", statement ? statement : \
118 "", (msg) ); \
119} while (0)
120
121#define INFO( statement ) \
122do { \
123 if ( lalDebugLevel & LALINFO ) \
124 XLALPrintError( "Info[0]: program %s, file %s, line %d, %s\n" \
125 " %s\n", *argv, __FILE__, __LINE__, \
126 "$Id$", (statement) ); \
127} while (0)
128
129#define SUB( func, statusptr ) \
130do { \
131 if ( (func), (statusptr)->statusCode ) { \
132 ERROR( DRIVEHOUGHCOLOR_ESUB, DRIVEHOUGHCOLOR_MSGESUB, \
133 "Function call \"" #func "\" failed:" ); \
134 return DRIVEHOUGHCOLOR_ESUB; \
135 } \
136} while (0)
137/******************************************************************/
138
139#define PIXELFACTOR 2
140
141
142/* ******************************************************************
143 * Structure, enum, union, etc., typdefs.
144 */
145
146typedef struct tagREAL8Cart3CoorVector {
147 UINT4 length; /**< number of elements */
148 REAL8Cart3Coor *data; /**< x.y.z */
150
151typedef struct tagHoughSignificantEvent {
152 REAL8 nStar; /**< most significant number count in a skypatch*/
153 REAL8 nStarSignificance; /**< significance of number count nStar */
154 REAL8 freqStar; /**< frequency of nStar */
155 REAL8 alphaStar; /**< right-ascension of nStar */
156 REAL8 deltaStar; /**< declination of nStar */
157 REAL8 fdotStar; /**< value of first spindown parameter */
159
160typedef struct tagHoughSignificantEventVector {
164
165
166typedef struct tagHoughSkyPatchesInfo {
173
174/**
175 * struct fo storing all the variables affected by the
176 * selection of a subset of SFTs
177 */
178typedef struct tagBestVariables {
179 UINT4 length; /**< the number of SFTs to be selected */
180 REAL8Vector *weightsV; /**< noise and AM weights */
181 REAL8Vector *timeDiffV; /**< the vector of time diffs */
182 REAL8Cart3CoorVector *velV; /**< vector of detector velocities */
183 HOUGHPeakGramVector *pgV; /**< the vector of peakgrams */
185
186
187/*
188 * Functions Declarations (i.e., prototypes).
189 */
190
193 REAL8Periodogram1 *peri,
194 UINT2 *blocksRNG );
195
196
197/* ****************************************************** */
198
199#ifdef __cplusplus
200} /* Close C++ protection */
201#endif
202
203
204#endif /* Close double-include protection _DRIVEHOUGHCOLOR_H */
void Periodo2PSDrng(LALStatus *status, REAL8Periodogram1 *psd, REAL8Periodogram1 *peri, UINT2 *blocksRNG)
Header file for PeakSelect.c.
double REAL8
uint16_t UINT2
uint32_t UINT4
int32_t INT4
struct fo storing all the variables affected by the selection of a subset of SFTs
REAL8Vector * timeDiffV
the vector of time diffs
HOUGHPeakGramVector * pgV
the vector of peakgrams
REAL8Vector * weightsV
noise and AM weights
REAL8Cart3CoorVector * velV
vector of detector velocities
UINT4 length
the number of SFTs to be selected
This structure contains a vector of peak-grams (for the different time stamps)
Definition: LALHough.h:167
REAL8 nStarSignificance
significance of number count nStar
REAL8 deltaStar
declination of nStar
REAL8 freqStar
frequency of nStar
REAL8 alphaStar
right-ascension of nStar
REAL8 fdotStar
value of first spindown parameter
REAL8 nStar
most significant number count in a skypatch
HoughSignificantEvent * event
Three dimensional Cartessian coordinates.
Definition: LUT.h:308
REAL8Cart3Coor * data
x.y.z
UINT4 length
number of elements