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
SFTbin.h
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 Badri Krishnan, Alicia Sintes Olives
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 *
22 * File Name: SFTbin.h
23 *
24 * Authors: Sintes, A.M., Krishnan, B. & inspired from Siemens, X.
25 *
26 *
27 * History: Created by Sintes May 21, 2003
28 * Modified...
29 *
30 *-----------------------------------------------------------------------
31 */
32
33/**
34 * \author A.M. Sintes
35 *
36 * ### Header SFTbin.h ###
37 *
38 * Routines for reading SFT binary files
39 *
40 * ### Synopsis ###
41 *
42 * \code
43 * #include <lal/SFTbin.h>
44 * \endcode
45 */
46
47/*
48 * 4. Protection against double inclusion (include-loop protection)
49 * Note the naming convention!
50 */
51
52#ifndef _SFTBIN_H
53#define _SFTBIN_H
54
55/*
56 * 5. Includes. This header may include others; if so, they go immediately
57 * after include-loop protection. Includes should appear in the following
58 * order:
59 * a. Standard library includes
60 * b. LDAS includes
61 * c. LAL includes
62 */
63
64#include <stdlib.h>
65#include <math.h>
66#include <stdio.h>
67#include <stdlib.h>
68#include <string.h>
69#include <lal/LALStdlib.h>
70#include <lal/LALConstants.h>
71#include <lal/AVFactories.h>
72#include <lal/SeqFactories.h>
73#include <lal/SFTfileIO.h>
74#include <lal/Random.h>
75#include <lal/PulsarDataTypes.h>
76#include <lal/UserInput.h>
77#include <lal/LUT.h>
78#include <lal/RngMedBias.h>
79
80#include <gsl/gsl_statistics.h>
81#include <gsl/gsl_rng.h>
82#include <gsl/gsl_randist.h>
83#include <gsl/gsl_sort.h>
84/*
85 * Protection against C++ name mangling
86 */
87
88#ifdef __cplusplus
89extern "C" {
90#endif
91
92/*
93 * 7. Error codes and messages. This must be auto-extracted for
94 * inclusion in the documentation.
95 */
96
97/**\name Error Codes */ /** @{ */
98
99#define SFTBINH_ENULL 1
100#define SFTBINH_EFILE 2
101#define SFTBINH_EHEADER 3
102#define SFTBINH_EENDIAN 4
103#define SFTBINH_EVAL 5
104#define SFTBINH_ESEEK 9
105#define SFTBINH_EREAD 10
106#define SFTBINH_EWRITE 11
107
108#define SFTBINH_MSGENULL "Null pointer"
109#define SFTBINH_MSGEFILE "Could not open file"
110#define SFTBINH_MSGEHEADER "Incorrect header in file"
111#define SFTBINH_MSGEENDIAN "Incorrect endian type"
112#define SFTBINH_MSGEVAL "Invalid value"
113#define SFTBINH_MSGESEEK "fseek failed"
114#define SFTBINH_MSGEREAD "fread failed"
115#define SFTBINH_MSGEWRITE "fwrite failed"
116
117
118/** @} */
119
120
121/* ******************************************************
122 * 8. Macros. But, note that macros are deprecated.
123 * They could be moved to the modules where are needed
124 */
125
126/* *******************************************************
127 * 9. Constant Declarations. (discouraged)
128 */
129
130
131
132/* **************************************************************
133 * 10. Structure, enum, union, etc., typdefs.
134 */
135
136
137typedef struct tagCOMPLEX8SFTData1 { /* simple case */
138 LIGOTimeGPS epoch; /* epoch of first series sample */
141 INT4 length; /* number of elements in data */
142 COMPLEX8 *data; /* pointer to the data */
144
145typedef struct tagCOMPLEX8SFTvector1 {
146 UINT4 length; /* number of elements */
147 COMPLEX8SFTData1 *sft; /* pointer to the data */
149
150typedef struct tagCOMPLEX16SFTData1 { /* simple case */
151 LIGOTimeGPS epoch; /* epoch of first series sample */
154 INT4 length; /* number of elements in data */
155 COMPLEX16 *data; /* pointer to the data */
157
158typedef struct tagREAL8Periodogram1 { /* simple case */
159 LIGOTimeGPS epoch; /* epoch of first series sample */
162 INT4 length; /* number of elements in data */
163 REAL8 *data; /* pointer to the data */
165
166
167
168/*
169 * 11. Extern Global variables. (discouraged)
170 */
171
172
173/*
174 * 12. Functions Declarations (i.e., prototypes).
175 */
176
177
179 REAL8Periodogram1 *peri,
181 );
182
184 REAL8Periodogram1 *peri,
185 SFTtype *sft
186 );
187
188
189#ifdef __cplusplus
190} /* Close C++ protection */
191#endif
192
193#endif /* Close double-include protection _SFTBIN_H */
void SFT2Periodogram(LALStatus *status, REAL8Periodogram1 *peri, SFTtype *sft)
Definition: SFTbin.c:133
void COMPLEX8SFT2Periodogram1(LALStatus *status, REAL8Periodogram1 *peri, COMPLEX8SFTData1 *sft)
OBSOLETE – Use LAL functions from SFTfileIO.c instead.
Definition: SFTbin.c:69
double complex COMPLEX16
double REAL8
uint32_t UINT4
float complex COMPLEX8
int32_t INT4
LIGOTimeGPS epoch
Definition: SFTbin.h:151
COMPLEX16 * data
Definition: SFTbin.h:155
REAL8 timeBase
Definition: SFTbin.h:152
INT4 fminBinIndex
Definition: SFTbin.h:153
LIGOTimeGPS epoch
Definition: SFTbin.h:138
REAL8 timeBase
Definition: SFTbin.h:139
COMPLEX8 * data
Definition: SFTbin.h:142
INT4 fminBinIndex
Definition: SFTbin.h:140
COMPLEX8SFTData1 * sft
Definition: SFTbin.h:147
REAL8 timeBase
Definition: SFTbin.h:160
LIGOTimeGPS epoch
Definition: SFTbin.h:159
INT4 fminBinIndex
Definition: SFTbin.h:161
REAL8 * data
Definition: SFTbin.h:163