Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALFrame 3.0.7.1-b246709
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LALFrameU.c
Go to the documentation of this file.
1/*
2* Copyright (C) 2013 Jolien Creighton
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#include "config.h"
21#include <stdlib.h>
22#include <string.h>
23
24#include <lal/XLALError.h>
25#include <lal/LALFrameU.h>
26
27enum {
31};
32
33/* enable FrameL support if available */
34#if defined HAVE_FRAMEL_H && defined HAVE_LIBFRAMEL
35# include "LALFrameUFrameL.h"
36# define CASE_FRAMEL(errval, function, ...) case LAL_FRAMEU_FRAME_LIBRARY_FRAMEL: return function ## _FrameL_ (__VA_ARGS__)
37# ifndef LAL_FRAMEU_FRAME_LIBRARY_DEFAULT
38# define LAL_FRAMEU_FRAME_LIBRARY_DEFAULT LAL_FRAMEU_FRAME_LIBRARY_FRAMEL
39# endif
40#else
41# define CASE_FRAMEL(errval, function, ...) case LAL_FRAMEU_FRAME_LIBRARY_FRAMEL: XLAL_ERROR_VAL(errval, XLAL_EERR, "FrameL library unavailable")
42#endif
43
44/* enable FrameC support if available */
45#if defined HAVE_FRAMECPPC_FRAMEC_H && defined HAVE_LIBFRAMECPPC
46# include "LALFrameUFrameC.h"
47# define CASE_FRAMEC(errval, function, ...) case LAL_FRAMEU_FRAME_LIBRARY_FRAMEC: return function ## _FrameC_ (__VA_ARGS__)
48# ifndef LAL_FRAMEU_FRAME_LIBRARY_DEFAULT
49# define LAL_FRAMEU_FRAME_LIBRARY_DEFAULT LAL_FRAMEU_FRAME_LIBRARY_FRAMEC
50# endif
51#else
52# define CASE_FRAMEC(errval, function, ...) case LAL_FRAMEU_FRAME_LIBRARY_FRAMEC: XLAL_ERROR_VAL(errval, XLAL_EERR, "FrameC library unavailable")
53#endif
54
55/* fall-back: no frame library available */
56/* actually, just kill compilation... */
57#ifndef LAL_FRAMEU_FRAME_LIBRARY_DEFAULT
58#define LAL_FRAMEU_FRAME_LIBRARY_DEFAULT LAL_FRAMEU_FRAME_LIBRARY_UNAVAILABLE
59#error No frame library available
60#endif
61
62#define FRAME_LIBRARY_SELECT_VAL(errval, function, ...) \
63 do { \
64 switch (XLALFrameLibrary()) { \
65 CASE_FRAMEL(errval, function, __VA_ARGS__); \
66 CASE_FRAMEC(errval, function, __VA_ARGS__); \
67 default: \
68 XLAL_ERROR_VAL(errval, XLAL_EERR, "No frame library available"); \
69 } \
70 } while (0)
71
72#define FRAME_LIBRARY_SELECT_VOID(function, ...) FRAME_LIBRARY_SELECT_VAL(/*void*/, function, __VA_ARGS__)
73#define FRAME_LIBRARY_SELECT_NULL(function, ...) FRAME_LIBRARY_SELECT_VAL(NULL, function, __VA_ARGS__)
74#define FRAME_LIBRARY_SELECT_REAL8(function, ...) FRAME_LIBRARY_SELECT_VAL(XLAL_REAL8_FAIL_NAN, function, __VA_ARGS__)
75#define FRAME_LIBRARY_SELECT(function, ...) FRAME_LIBRARY_SELECT_VAL(XLAL_FAILURE, function, __VA_ARGS__)
76
77/*
78 * Routine that returns selected frame library:
79 * if LAL_FRAME_LIBRARY is set, use the value from that environment;
80 * otherwise use the default value.
81 * Note: this is NOT threadsafe, but I doubt the frame libraries are
82 * threadsafe in any case....
83 */
84static int XLALFrameLibrary(void)
85{
86 static int lalFrameLibrary = -1;
87 if (lalFrameLibrary < 0) {
88 const char *env = getenv("LAL_FRAME_LIBRARY");
89 if (env) {
90 if (strcmp(env, "FrameL") == 0) {
91#if defined HAVE_FRAMEL_H && defined HAVE_LIBFRAMEL
92 lalFrameLibrary = LAL_FRAMEU_FRAME_LIBRARY_FRAMEL;
93#else
95 "LAL_FRAME_LIBRARY=%s: FrameL frame library not available", env);
96#endif
97 } else if (strcmp(env, "FrameC") == 0) {
98#if defined HAVE_FRAMECPPC_FRAMEC_H && defined HAVE_LIBFRAMECPPC
99 lalFrameLibrary = LAL_FRAMEU_FRAME_LIBRARY_FRAMEC;
100#else
102 "LAL_FRAME_LIBRARY=%s: FrameC frame library not available", env);
103#endif
104 } else {
105 XLAL_PRINT_WARNING("LAL_FRAME_LIBRARY=%s: No valid frame library specified [expect: \"FrameL\" or \"FrameC\"]", env);
106 lalFrameLibrary = LAL_FRAMEU_FRAME_LIBRARY_DEFAULT;
107 }
108 } else {
109 lalFrameLibrary = LAL_FRAMEU_FRAME_LIBRARY_DEFAULT;
110 }
111 switch (lalFrameLibrary) {
113 XLAL_PRINT_INFO("Using the FrameL frame library");
114 break;
116 XLAL_PRINT_INFO("Using the FrameC frame library");
117 break;
118 default:
119 XLAL_ERROR_VAL(LAL_FRAMEU_FRAME_LIBRARY_UNAVAILABLE, XLAL_EERR, "No frame library available");
120 }
121 }
122 return lalFrameLibrary;
123}
124
125void XLALFrameUFrFileClose(LALFrameUFrFile * stream)
126{
128}
129
130LALFrameUFrFile *XLALFrameUFrFileOpen(const char *filename, const char *mode)
131{
133}
134
135int XLALFrameUFileCksumValid(LALFrameUFrFile * stream)
136{
138}
139
141{
143}
144
145LALFrameUFrTOC *XLALFrameUFrTOCRead(LALFrameUFrFile * stream)
146{
148}
149
151{
153}
154
155double XLALFrameUFrTOCQueryGTimeModf(double *iptr, const LALFrameUFrTOC * toc, size_t pos)
156{
158}
159
160double XLALFrameUFrTOCQueryDt(const LALFrameUFrTOC * toc, size_t pos)
161{
163}
164
166{
168}
169
170const char *XLALFrameUFrTOCQueryAdcName(const LALFrameUFrTOC * toc, size_t adc)
171{
173}
174
176{
178}
179
180const char *XLALFrameUFrTOCQuerySimName(const LALFrameUFrTOC * toc, size_t sim)
181{
183}
184
186{
188}
189
190const char *XLALFrameUFrTOCQueryProcName(const LALFrameUFrTOC * toc, size_t proc)
191{
193}
194
196{
198}
199
200const char *XLALFrameUFrTOCQueryDetectorName(const LALFrameUFrTOC * toc, size_t det)
201{
203}
204
206{
208}
209
210LALFrameUFrameH *XLALFrameUFrameHAlloc(const char *name, double start1, double start2, double dt, int frnum)
211{
212 FRAME_LIBRARY_SELECT_NULL(XLALFrameUFrameHAlloc, name, start1, start2, dt, frnum);
213}
214
215LALFrameUFrameH *XLALFrameUFrameHRead(LALFrameUFrFile * stream, int pos)
216{
218}
219
220int XLALFrameUFrameHWrite(LALFrameUFrFile * stream, LALFrameUFrameH * frame)
221{
223}
224
225int XLALFrameUFrameHFrChanAdd(LALFrameUFrameH * frame, LALFrameUFrChan * channel)
226{
228}
229
230int XLALFrameUFrameHFrDetectorAdd(LALFrameUFrameH * frame, LALFrameUFrDetector * detector)
231{
233}
234
236{
238}
239
241{
243}
244
246{
248}
249
251{
253}
254
256{
258}
259
260double XLALFrameUFrameHQueryGTimeModf(double *iptr, const LALFrameUFrameH * frame)
261{
263}
264
266{
268}
269
271{
273}
274
276{
278}
279
280void XLALFrameUFrChanFree(LALFrameUFrChan * channel)
281{
283}
284
285LALFrameUFrChan *XLALFrameUFrChanRead(LALFrameUFrFile * stream, const char *name, size_t pos)
286{
288}
289
290LALFrameUFrChan *XLALFrameUFrAdcChanAlloc(const char *name, int dtype, size_t ndata)
291{
293}
294
295LALFrameUFrChan *XLALFrameUFrSimChanAlloc(const char *name, int dtype, size_t ndata)
296{
298}
299
300LALFrameUFrChan *XLALFrameUFrProcChanAlloc(const char *name, int type, int subtype, int dtype, size_t ndata)
301{
302 FRAME_LIBRARY_SELECT_NULL(XLALFrameUFrProcChanAlloc, name, type, subtype, dtype, ndata);
303}
304
305const char *XLALFrameUFrChanQueryName(const LALFrameUFrChan * channel)
306{
308}
309
310double XLALFrameUFrChanQueryTimeOffset(const LALFrameUFrChan * channel)
311{
313}
314
315int XLALFrameUFrChanSetSampleRate(LALFrameUFrChan * channel, double sampleRate)
316{
318}
319
320int XLALFrameUFrChanSetTimeOffset(LALFrameUFrChan * channel, double timeOffset)
321{
323}
324
325int XLALFrameUFrChanSetTRange(LALFrameUFrChan * channel, double tRange)
326{
328}
329
330int XLALFrameUFrChanVectorAlloc(LALFrameUFrChan * channel, int dtype, size_t ndata)
331{
333}
334
335int XLALFrameUFrChanVectorCompress(LALFrameUFrChan * channel, int compressLevel)
336{
338}
339
341{
343}
344
345const char *XLALFrameUFrChanVectorQueryName(const LALFrameUFrChan * channel)
346{
348}
349
351{
353}
354
355int XLALFrameUFrChanVectorQueryType(const LALFrameUFrChan * channel)
356{
358}
359
360void *XLALFrameUFrChanVectorQueryData(const LALFrameUFrChan * channel)
361{
363}
364
365size_t XLALFrameUFrChanVectorQueryNBytes(const LALFrameUFrChan * channel)
366{
368}
369
370size_t XLALFrameUFrChanVectorQueryNData(const LALFrameUFrChan * channel)
371{
373}
374
375size_t XLALFrameUFrChanVectorQueryNDim(const LALFrameUFrChan * channel)
376{
378}
379
380size_t XLALFrameUFrChanVectorQueryNx(const LALFrameUFrChan * channel, size_t dim)
381{
383}
384
385double XLALFrameUFrChanVectorQueryDx(const LALFrameUFrChan * channel, size_t dim)
386{
388}
389
390double XLALFrameUFrChanVectorQueryStartX(const LALFrameUFrChan * channel, size_t dim)
391{
393}
394
395const char *XLALFrameUFrChanVectorQueryUnitX(const LALFrameUFrChan * channel, size_t dim)
396{
398}
399
400const char *XLALFrameUFrChanVectorQueryUnitY(const LALFrameUFrChan * channel)
401{
403}
404
405int XLALFrameUFrChanVectorSetName(LALFrameUFrChan * channel, const char *name)
406{
408}
409
410int XLALFrameUFrChanVectorSetDx(LALFrameUFrChan * channel, double dx)
411{
413}
414
415int XLALFrameUFrChanVectorSetStartX(LALFrameUFrChan * channel, double x0)
416{
418}
419
420int XLALFrameUFrChanVectorSetUnitX(LALFrameUFrChan * channel, const char *unit)
421{
423}
424
425int XLALFrameUFrChanVectorSetUnitY(LALFrameUFrChan * channel, const char *unit)
426{
428}
429
430void XLALFrameUFrDetectorFree(LALFrameUFrDetector * detector)
431{
433}
434
435LALFrameUFrDetector *XLALFrameUFrDetectorRead(LALFrameUFrFile * stream, const char *name)
436{
438}
439
440LALFrameUFrDetector *XLALFrameUFrDetectorAlloc(const char *name, const char *prefix, double latitude, double longitude,
441 double elevation, double azimuthX, double azimuthY, double altitudeX, double altitudeY, double midpointX, double midpointY,
442 int localTime)
443{
444 FRAME_LIBRARY_SELECT_NULL(XLALFrameUFrDetectorAlloc, name, prefix, latitude, longitude, elevation, azimuthX, azimuthY,
445 altitudeX, altitudeY, midpointX, midpointY, localTime);
446}
447
448const char *XLALFrameUFrDetectorQueryName(const LALFrameUFrDetector * detector)
449{
451}
452
453const char *XLALFrameUFrDetectorQueryPrefix(const LALFrameUFrDetector * detector)
454{
456}
457
458double XLALFrameUFrDetectorQueryLongitude(const LALFrameUFrDetector * detector)
459{
461}
462
463double XLALFrameUFrDetectorQueryLatitude(const LALFrameUFrDetector * detector)
464{
466}
467
468double XLALFrameUFrDetectorQueryElevation(const LALFrameUFrDetector * detector)
469{
471}
472
473double XLALFrameUFrDetectorQueryArmXAzimuth(const LALFrameUFrDetector * detector)
474{
476}
477
478double XLALFrameUFrDetectorQueryArmYAzimuth(const LALFrameUFrDetector * detector)
479{
481}
482
483double XLALFrameUFrDetectorQueryArmXAltitude(const LALFrameUFrDetector * detector)
484{
486}
487
488double XLALFrameUFrDetectorQueryArmYAltitude(const LALFrameUFrDetector * detector)
489{
491}
492
493double XLALFrameUFrDetectorQueryArmXMidpoint(const LALFrameUFrDetector * detector)
494{
496}
497
498double XLALFrameUFrDetectorQueryArmYMidpoint(const LALFrameUFrDetector * detector)
499{
501}
502
503int XLALFrameUFrDetectorQueryLocalTime(const LALFrameUFrDetector * detector)
504{
506}
507
509{
511}
512
513LALFrameUFrHistory *XLALFrameUFrHistoryAlloc(const char *name, double gpssec, const char *comment)
514{
516}
#define FRAME_LIBRARY_SELECT_REAL8(function,...)
Definition: LALFrameU.c:74
#define FRAME_LIBRARY_SELECT_NULL(function,...)
Definition: LALFrameU.c:73
#define LAL_FRAMEU_FRAME_LIBRARY_DEFAULT
Definition: LALFrameU.c:58
static int XLALFrameLibrary(void)
Definition: LALFrameU.c:84
#define FRAME_LIBRARY_SELECT_VOID(function,...)
Definition: LALFrameU.c:72
@ LAL_FRAMEU_FRAME_LIBRARY_FRAMEC
Definition: LALFrameU.c:30
@ LAL_FRAMEU_FRAME_LIBRARY_FRAMEL
Definition: LALFrameU.c:29
@ LAL_FRAMEU_FRAME_LIBRARY_UNAVAILABLE
Definition: LALFrameU.c:28
#define FRAME_LIBRARY_SELECT(function,...)
Definition: LALFrameU.c:75
const char *const name
int XLALFrameUFrameHQueryFrame(const LALFrameUFrameH *frame)
Query FrameH structure for the frame number.
Definition: LALFrameU.c:250
const char * XLALFrameUFrTOCQuerySimName(const LALFrameUFrTOC *toc, size_t sim)
Query FrTOC structure for the name of a FrSimData structure.
Definition: LALFrameU.c:180
int XLALFrameUFrChanVectorQueryCompress(const LALFrameUFrChan *channel)
Query FrChan structure for the compression scheme of its FrVect structure.
Definition: LALFrameU.c:350
size_t XLALFrameUFrTOCQueryNFrame(const LALFrameUFrTOC *toc)
Query FrTOC structure for number of FrameH structures contained.
Definition: LALFrameU.c:150
LALFrameUFrameH * XLALFrameUFrameHAlloc(const char *name, double start1, double start2, double dt, int frnum)
Allocate memory for a new frame header FrameH structure.
Definition: LALFrameU.c:210
LALFrameUFrDetector * XLALFrameUFrDetectorAlloc(const char *name, const char *prefix, double latitude, double longitude, double elevation, double azimuthX, double azimuthY, double altitudeX, double altitudeY, double midpointX, double midpointY, int localTime)
Allocate memory for a new detector FrDetector structure.
Definition: LALFrameU.c:440
int XLALFrameUFrameHWrite(LALFrameUFrFile *stream, LALFrameUFrameH *frame)
Write a FrameH structure to an output FrFile stream.
Definition: LALFrameU.c:220
double XLALFrameUFrDetectorQueryElevation(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector elevation.
Definition: LALFrameU.c:468
double XLALFrameUFrDetectorQueryLatitude(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector latitude.
Definition: LALFrameU.c:463
void * XLALFrameUFrChanVectorQueryData(const LALFrameUFrChan *channel)
Query FrChan structure for the data pointer in its FrVect structure.
Definition: LALFrameU.c:360
int XLALFrameUFrChanVectorQueryType(const LALFrameUFrChan *channel)
Query FrChan structure for the data type of its FrVect structure.
Definition: LALFrameU.c:355
int XLALFrameUFrameHFrDetectorAdd(LALFrameUFrameH *frame, LALFrameUFrDetector *detector)
Add a FrDetector structure to a FrameH structure.
Definition: LALFrameU.c:230
int XLALFrameUFrChanSetTimeOffset(LALFrameUFrChan *channel, double timeOffset)
Set the time offset in a FrChan structure.
Definition: LALFrameU.c:320
int XLALFrameUFrChanSetTRange(LALFrameUFrChan *channel, double tRange)
Set the time range in a FrChan structure.
Definition: LALFrameU.c:325
const char * XLALFrameUFrChanVectorQueryName(const LALFrameUFrChan *channel)
Query FrChan structure for the name of its FrVect structure.
Definition: LALFrameU.c:345
void XLALFrameUFrTOCFree(LALFrameUFrTOC *toc)
Free a FrTOC structure.
Definition: LALFrameU.c:140
LALFrameUFrChan * XLALFrameUFrChanRead(LALFrameUFrFile *stream, const char *name, size_t pos)
Read a channel FrChan structure from a FrFile stream.
Definition: LALFrameU.c:285
size_t XLALFrameUFrTOCQuerySimN(const LALFrameUFrTOC *toc)
Query FrTOC structure for number of FrSimData structures.
Definition: LALFrameU.c:175
void XLALFrameUFrameHFree(LALFrameUFrameH *frame)
Free a FrameH structure.
Definition: LALFrameU.c:205
void XLALFrameUFrChanFree(LALFrameUFrChan *channel)
Free a FrChan structure.
Definition: LALFrameU.c:280
size_t XLALFrameUFrChanVectorQueryNDim(const LALFrameUFrChan *channel)
Query FrChan structure for the number of dimensions of the multi-dimensional data in its FrVect struc...
Definition: LALFrameU.c:375
void XLALFrameUFrHistoryFree(LALFrameUFrHistory *history)
Free a FrHistory structure.
Definition: LALFrameU.c:508
int XLALFrameUFrChanVectorSetDx(LALFrameUFrChan *channel, double dx)
Set the sampling interval for the data in the FrVect structure contained in a FrChan structure.
Definition: LALFrameU.c:410
int XLALFrameUFrameHFrChanAdd(LALFrameUFrameH *frame, LALFrameUFrChan *channel)
Add a FrChan structure to a FrameH structure.
Definition: LALFrameU.c:225
const char * XLALFrameUFrDetectorQueryPrefix(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector prefix.
Definition: LALFrameU.c:453
struct tagLALFrameUFrameH LALFrameUFrameH
Incomplete type for a frame header FrameH structure.
Definition: LALFrameU.h:64
int XLALFrameUFrChanVectorExpand(LALFrameUFrChan *channel)
Expands a FrVect structure within a FrChan structure.
Definition: LALFrameU.c:340
LALFrameUFrChan * XLALFrameUFrSimChanAlloc(const char *name, int dtype, size_t ndata)
Allocate memory for a new FrChan structure of FrSimData type.
Definition: LALFrameU.c:295
int XLALFrameUFrChanVectorSetStartX(LALFrameUFrChan *channel, double x0)
Set the starting value for the domain of the data in the FrVect structure contained in a FrChan struc...
Definition: LALFrameU.c:415
size_t XLALFrameUFrChanVectorQueryNx(const LALFrameUFrChan *channel, size_t dim)
Query FrChan structure for the number of points in the dim dimension of the multi-dimensional data in...
Definition: LALFrameU.c:380
double XLALFrameUFrameHQueryDt(const LALFrameUFrameH *frame)
Query FrameH structure for the duration.
Definition: LALFrameU.c:270
int XLALFrameUFrChanVectorSetUnitY(LALFrameUFrChan *channel, const char *unit)
Set the units of the data in the FrVect structure contained in a FrChan structure.
Definition: LALFrameU.c:425
int XLALFrameUFrameHQueryULeapS(const LALFrameUFrameH *frame)
Query FrameH structure for the number of leap seconds.
Definition: LALFrameU.c:265
LALFrameUFrHistory * XLALFrameUFrHistoryAlloc(const char *name, double gpssec, const char *comment)
Allocate memory for a new detector FrHistory structure.
Definition: LALFrameU.c:513
double XLALFrameUFrChanQueryTimeOffset(const LALFrameUFrChan *channel)
Query FrChan structure for time offset for this channel.
Definition: LALFrameU.c:310
LALFrameUFrTOC * XLALFrameUFrTOCRead(LALFrameUFrFile *stream)
Read the table of contents FrTOC structure for a FrFile stream.
Definition: LALFrameU.c:145
LALFrameUFrChan * XLALFrameUFrAdcChanAlloc(const char *name, int dtype, size_t ndata)
Allocate memory for a new FrChan structure of FrAdcData type.
Definition: LALFrameU.c:290
LALFrameUFrameH * XLALFrameUFrameHRead(LALFrameUFrFile *stream, int pos)
Read a frame header FrameH structure from a FrFile stream.
Definition: LALFrameU.c:215
int XLALFrameUFrameHFrHistoryAdd(LALFrameUFrameH *frame, LALFrameUFrHistory *history)
Add a FrHistory structure to a FrameH structure.
Definition: LALFrameU.c:235
size_t XLALFrameUFrTOCQueryProcN(const LALFrameUFrTOC *toc)
Query FrTOC structure for number of FrProcData structures.
Definition: LALFrameU.c:185
int XLALFrameUFrChanVectorAlloc(LALFrameUFrChan *channel, int dtype, size_t ndata)
Allocate memory for a FrVect structure within a FrChan structure.
Definition: LALFrameU.c:330
double XLALFrameUFrChanVectorQueryDx(const LALFrameUFrChan *channel, size_t dim)
Query FrChan structure for the sampling interval in the dim dimension of the multi-dimensional data i...
Definition: LALFrameU.c:385
const char * XLALFrameUFrTOCQueryProcName(const LALFrameUFrTOC *toc, size_t proc)
Query FrTOC structure for the name of a FrProcData structure.
Definition: LALFrameU.c:190
size_t XLALFrameUFrChanVectorQueryNData(const LALFrameUFrChan *channel)
Query FrChan structure for the number of points of data in its FrVect structure.
Definition: LALFrameU.c:370
const char * XLALFrameUFrameHQueryName(const LALFrameUFrameH *frame)
Query FrameH structure for its name.
Definition: LALFrameU.c:240
double XLALFrameUFrDetectorQueryArmXMidpoint(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector x-arm midpoint.
Definition: LALFrameU.c:493
double XLALFrameUFrDetectorQueryArmXAltitude(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector x-arm altitude.
Definition: LALFrameU.c:483
int XLALFrameUFrameHSetRun(LALFrameUFrameH *frame, int run)
Set the run number in a FrameH structure.
Definition: LALFrameU.c:275
struct tagLALFrameUFrHistory LALFrameUFrHistory
Incomplete type for a history data FrHistory structure.
Definition: LALFrameU.h:105
double XLALFrameUFrTOCQueryGTimeModf(double *iptr, const LALFrameUFrTOC *toc, size_t pos)
Query FrTOC structure for start time of a FrameH structure.
Definition: LALFrameU.c:155
const char * XLALFrameUFrChanVectorQueryUnitY(const LALFrameUFrChan *channel)
Query FrChan structure for sample units of the data in the FrVect structure.
Definition: LALFrameU.c:400
double XLALFrameUFrDetectorQueryArmYAltitude(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector y-arm altitude.
Definition: LALFrameU.c:488
void XLALFrameUFrDetectorFree(LALFrameUFrDetector *detector)
Free a FrDetector structure.
Definition: LALFrameU.c:430
int XLALFrameUFrChanVectorCompress(LALFrameUFrChan *channel, int compressLevel)
Compress a FrVect structure within a FrChan structure.
Definition: LALFrameU.c:335
const char * XLALFrameUFrTOCQueryAdcName(const LALFrameUFrTOC *toc, size_t adc)
Query FrTOC structure for the name of a FrAdcData structure.
Definition: LALFrameU.c:170
double XLALFrameUFrDetectorQueryArmYMidpoint(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector y-arm midpoint.
Definition: LALFrameU.c:498
const char * XLALFrameUFrChanVectorQueryUnitX(const LALFrameUFrChan *channel, size_t dim)
Query FrChan structure for the units of the domain of the dim dimension of the multi-dimensional data...
Definition: LALFrameU.c:395
LALFrameUFrFile * XLALFrameUFrFileOpen(const char *filename, const char *mode)
Open a frame file FrFile stream.
Definition: LALFrameU.c:130
double XLALFrameUFrDetectorQueryLongitude(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector longitude.
Definition: LALFrameU.c:458
double XLALFrameUFrChanVectorQueryStartX(const LALFrameUFrChan *channel, size_t dim)
Query FrChan structure for the starting value of the dim dimension of the multi-dimensional data in t...
Definition: LALFrameU.c:390
double XLALFrameUFrameHQueryGTimeModf(double *iptr, const LALFrameUFrameH *frame)
Query FrameH structure for the start time.
Definition: LALFrameU.c:260
struct tagLALFrameUFrTOC LALFrameUFrTOC
Incomplete type for a table of contents FrTOC structure.
Definition: LALFrameU.h:78
LALFrameUFrChan * XLALFrameUFrProcChanAlloc(const char *name, int type, int subtype, int dtype, size_t ndata)
Allocate memory for a new FrChan structure of FrAdcData type.
Definition: LALFrameU.c:300
double XLALFrameUFrTOCQueryDt(const LALFrameUFrTOC *toc, size_t pos)
Query FrTOC structure for duration of a FrameH structure.
Definition: LALFrameU.c:160
int XLALFrameUFrDetectorQueryLocalTime(const LALFrameUFrDetector *detector)
Query FrDetector structure for the local time offset at the detector.
Definition: LALFrameU.c:503
int XLALFrameUFrChanVectorSetName(LALFrameUFrChan *channel, const char *name)
Set the name of the FrVect structure contained in a FrChan structure.
Definition: LALFrameU.c:405
void XLALFrameUFrFileClose(LALFrameUFrFile *stream)
Close a FrFile stream.
Definition: LALFrameU.c:125
int XLALFrameUFileCksumValid(LALFrameUFrFile *stream)
Use checksum to determine if FrFile stream is valid.
Definition: LALFrameU.c:135
size_t XLALFrameUFrTOCQueryAdcN(const LALFrameUFrTOC *toc)
Query FrTOC structure for number of FrAdcData structures.
Definition: LALFrameU.c:165
int XLALFrameUFrameHQueryDataQuality(const LALFrameUFrameH *frame)
Query FrameH structure for the data quality word.
Definition: LALFrameU.c:255
int XLALFrameUFrameHQueryRun(const LALFrameUFrameH *frame)
Query FrameH structure for the run number.
Definition: LALFrameU.c:245
size_t XLALFrameUFrTOCQueryDetectorN(const LALFrameUFrTOC *toc)
Query FrTOC structure for number of FrDetector structures.
Definition: LALFrameU.c:195
int XLALFrameUFrChanVectorSetUnitX(LALFrameUFrChan *channel, const char *unit)
Set the units of the domain of the data in the FrVect structure contained in a FrChan structure.
Definition: LALFrameU.c:420
const char * XLALFrameUFrDetectorQueryName(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector name.
Definition: LALFrameU.c:448
double XLALFrameUFrDetectorQueryArmXAzimuth(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector x-arm azimuth.
Definition: LALFrameU.c:473
LALFrameUFrDetector * XLALFrameUFrDetectorRead(LALFrameUFrFile *stream, const char *name)
Read a detector FrDetector structure from a FrFile stream.
Definition: LALFrameU.c:435
int XLALFrameUFrChanSetSampleRate(LALFrameUFrChan *channel, double sampleRate)
Set the sample rate in a FrChan structure.
Definition: LALFrameU.c:315
size_t XLALFrameUFrChanVectorQueryNBytes(const LALFrameUFrChan *channel)
Query FrChan structure for the number of bytes of data in its FrVect structure.
Definition: LALFrameU.c:365
const char * XLALFrameUFrTOCQueryDetectorName(const LALFrameUFrTOC *toc, size_t det)
Query FrTOC structure for the name of a FrDetector structure.
Definition: LALFrameU.c:200
const char * XLALFrameUFrChanQueryName(const LALFrameUFrChan *channel)
Query FrChan structure for its name.
Definition: LALFrameU.c:305
double XLALFrameUFrDetectorQueryArmYAzimuth(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector y-arm azimuth.
Definition: LALFrameU.c:478
#define XLAL_ERROR_VAL(val,...)
#define XLAL_PRINT_INFO(...)
#define XLAL_PRINT_WARNING(...)
XLAL_EERR
XLAL_ESYS
filename
double dt
Definition: stream.c:110
char * channel
Definition: stream.c:108