Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALFrame 3.0.7.1-8a6b96f
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LALFrameU.h
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 <stddef.h>
21#include <time.h>
22
23#ifndef _LALFRAMEU_H
24#define _LALFRAMEU_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29#if 0
30}
31#endif
32
33/**
34 * @defgroup LALFrameU_h Header LALFrameU.h
35 * @ingroup lalframe_general
36 *
37 * @author Jolien Creighton
38 * @brief Provides a unified low-level interface to frame libraries.
39 * @details
40 * This provides a unified interface for reading and writing data files
41 * in the "Frame Format for Interferometric Gravitational Wave Detectors".
42 * @sa <em>Specification of a Common Data Frame Format for Interferometric
43 * Gravitational Wave Detectors (IGWD)</em>
44 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
45 * @sa Virgo Frame Library [http://lappweb.in2p3.fr/virgo/FrameL].
46 * @sa FrameCPP Library [http://www.ldas-sw.ligo.caltech.edu/doc/framecpp/html].
47 */
48/** @{ */
49
56
57/**
58 * @brief Incomplete type for a frame header FrameH structure.
59 * @sa Section 4.3.2.3 of
60 * <em>Specification of a Common Data Frame Format for Interferometric
61 * Gravitational Wave Detectors (IGWD)</em>
62 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
63 */
65
66/**
67 * @brief Incomplete type for a frame file FrFile stream.
68 */
69typedef struct tagLALFrameUFrFile LALFrameUFrFile;
70
71/**
72 * @brief Incomplete type for a table of contents FrTOC structure.
73 * @sa Section 4.3.2.19 of
74 * <em>Specification of a Common Data Frame Format for Interferometric
75 * Gravitational Wave Detectors (IGWD)</em>
76 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
77 */
79
80/**
81 * @brief Incomplete type for a data channel FrChan structure.
82 * @sa Sections 4.3.2.4, 4.3.2.11, and 4.3.2.14 of
83 * <em>Specification of a Common Data Frame Format for Interferometric
84 * Gravitational Wave Detectors (IGWD)</em>
85 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
86 */
87typedef struct tagLALFrameUFrChan LALFrameUFrChan;
88
89/**
90 * @brief Incomplete type for a detector data FrDetector structure.
91 * @sa Section 4.3.2.5 of
92 * <em>Specification of a Common Data Frame Format for Interferometric
93 * Gravitational Wave Detectors (IGWD)</em>
94 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
95 */
96typedef struct tagLALFrameUFrDetector LALFrameUFrDetector;
97
98/**
99 * @brief Incomplete type for a history data FrHistory structure.
100 * @sa Section 4.3.2.9 of
101 * <em>Specification of a Common Data Frame Format for Interferometric
102 * Gravitational Wave Detectors (IGWD)</em>
103 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
104 */
106
107/**
108 * @brief Compression scheme codes.
109 * @details These compression scheme Id codes are from Appendix B of
110 * <em>Specification of a Common Data Frame Format for Interferometric
111 * Gravitational Wave Detectors (IGWD)</em>
112 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
113 */
115 /** @brief Id for uncompressed raw values. */
117
118 /** @brief Id for gzip compression. */
120
121 /** @brief Id for gzip compression of differential values. */
123
124 /** @brief Id for differentiation and zero suppression for 2-byte word
125 * integer types only. */
127
128 /** @brief Id for differentiation and zero suppression for 4-byte word
129 * (integer or floating-point). */
132
133/**
134 * @brief FrVect data type codes.
135 * @details These data type Id codes are from Appendix C of
136 * <em>Specification of a Common Data Frame Format for Interferometric
137 * Gravitational Wave Detectors (IGWD)</em>
138 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
139 */
141 /** @brief Id for 8-bit signed char data type. */
143
144 /** @brief Id for 16-bit signed integer data type. */
146
147 /** @brief Id for 64-bit double precision floating point data type. */
149
150 /** @brief Id for 32-bit single precision floating point data type. */
152
153 /** @brief Id for 32-bit signed integer data type. */
155
156 /** @brief Id for 64-bit signed integer data type. */
158
159 /** @brief Id for 64-bit single precision complex data type. */
161
162 /** @brief Id for 128-bit double precision complex data type. */
164
165 /** @brief Id for string data type. */
167
168 /** @brief Id for 16-bit unsigned integer data type. */
170
171 /** @brief Id for 32-bit unsigned integer data type. */
173
174 /** @brief Id for 64-bit unsigned integer data type. */
176
177 /** @brief Id for 8-bit unsigned char data type. */
180
181/**
182 * @brief FrProcData type codes.
183 * @details These type codes are from section 4.3.2.11 of
184 * <em>Specification of a Common Data Frame Format for Interferometric
185 * Gravitational Wave Detectors (IGWD)</em>
186 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
187 */
189 /** @brief Id for unknown or user-defined data. */
191
192 /** @brief Id for time-series data. */
194
195 /** @brief Id for frequency-series data. */
197
198 /** @brief Id for other one-dimensional series data. */
200
201 /** @brief Id for time-frequency data. */
203
204 /** @brief Id for wavelet data. */
206
207 /** @brief Id for multi-dimensional data. */
210
211/**
212 * @brief FrProcData subtype codes for frequency series.
213 * @details These type codes are from section 4.3.2.11 of
214 * <em>Specification of a Common Data Frame Format for Interferometric
215 * Gravitational Wave Detectors (IGWD)</em>
216 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
217 */
219 /** @brief Id for unknown or user-defined data. */
221
222 /** @brief Id for DFT data. */
224
225 /** @brief Id for amplitude spectral density data. */
227
228 /** @brief Id for power spectral density data. */
230
231 /** @brief Id for cross spectral density data. */
233
234 /** @brief Id for coherence data. */
236
237 /** @brief Id for transfer function data. */
240
241/* TODO: add routines:
242int XLALFrameUFrFileIGWDVersion(LALFrameUFrFile *stream);
243*/
244
245/**
246 * @name FrFile Routines
247 * @{
248 */
249
250/**
251 * @brief Close a FrFile stream.
252 * @param stream Pointer to the FrFile stream to close.
253 */
254void XLALFrameUFrFileClose(LALFrameUFrFile * stream);
255
256/**
257 * @brief Open a frame file FrFile stream.
258 * @param filename Filename of frame file to open.
259 * @param mode Access mode: either "r" for read or "w" for write.
260 * @return Pointer to a FrFile stream.
261 * @retval NULL Failure.
262 * @attention The calling routine is responsible for freeing the returned
263 * pointer with XLALFrameUFrFileClose().
264 */
265LALFrameUFrFile *XLALFrameUFrFileOpen(const char *filename, const char *mode);
266
267/**
268 * @brief Use checksum to determine if FrFile stream is valid.
269 * @param stream Pointer to the FrFile stream to check.
270 * @warning Pointers to FrTOC might be left dangling by this function.
271 * @return Logical value indicating if the FrFile stream checksum is correct.
272 * @retval 1 The FrFile stream is valid.
273 * @retval 0 The FrFile stream has an incorrect checksum or an error occurred.
274 */
275int XLALFrameUFileCksumValid(LALFrameUFrFile * stream);
276
277/** @} */
278
279/**
280 * @name FrTOC Routines
281 * @{
282 */
283
284/**
285 * @brief Free a FrTOC structure.
286 * @param toc Pointer to the FrTOC structure to free.
287 * @sa Section 4.3.2.19 of
288 * <em>Specification of a Common Data Frame Format for Interferometric
289 * Gravitational Wave Detectors (IGWD)</em>
290 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
291 */
293
294/**
295 * @brief Read the table of contents FrTOC structure for a FrFile stream.
296 * @param stream Pointer to the input FrFile stream from which to read FrTOC.
297 * @return Pointer to the FrTOC structure.
298 * @retval NULL Failure.
299 * @attention The calling routine is responsible for freeing the returned
300 * pointer with XLALFrameUFrTOCFree().
301 * @warning The pointer returned might be shallow and might be left
302 * dangling if the stream is closed or reopened. The FrTOC structure
303 * should be freed before calling XLALFrameUFrFileClose() or
304 * XLALFrameUFileCksumValid().
305 * @sa Section 4.3.2.19 of
306 * <em>Specification of a Common Data Frame Format for Interferometric
307 * Gravitational Wave Detectors (IGWD)</em>
308 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
309 */
310LALFrameUFrTOC *XLALFrameUFrTOCRead(LALFrameUFrFile * stream);
311
312/** @} */
313
314/**
315 * @name FrTOC Query Routines
316 * @{
317 */
318
319/**
320 * @brief Query FrTOC structure for number of FrameH structures contained.
321 * @param toc Pointer to the FrTOC structure to be queried.
322 * @return Number of FrameH structures contained.
323 * @retval (size_t)(-1) Failure.
324 * @sa Section 4.3.2.19 of
325 * <em>Specification of a Common Data Frame Format for Interferometric
326 * Gravitational Wave Detectors (IGWD)</em>
327 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
328 */
330
331/**
332 * @brief Query FrTOC structure for start time of a FrameH structure.
333 * @param iptr Pointer to the integer number of seconds of the GPS start time.
334 * @param toc Pointer to the FrTOC structure to be queried.
335 * @param pos Index position of the FrameH structure.
336 * @return Fractional part of the GPS start time.
337 * @retval LAL_REAL8_FAIL_NAN Failure.
338 * @sa Section 4.3.2.19 of
339 * <em>Specification of a Common Data Frame Format for Interferometric
340 * Gravitational Wave Detectors (IGWD)</em>
341 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
342 */
343double XLALFrameUFrTOCQueryGTimeModf(double *iptr, const LALFrameUFrTOC * toc, size_t pos);
344
345/**
346 * @brief Query FrTOC structure for duration of a FrameH structure.
347 * @param toc Pointer to the FrTOC structure to be queried.
348 * @param pos Index position of the FrameH structure.
349 * @return Duration of the frame in seconds.
350 * @retval LAL_REAL8_FAIL_NAN Failure.
351 * @sa Section 4.3.2.19 of
352 * <em>Specification of a Common Data Frame Format for Interferometric
353 * Gravitational Wave Detectors (IGWD)</em>
354 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
355 */
356double XLALFrameUFrTOCQueryDt(const LALFrameUFrTOC * toc, size_t pos);
357
358/**
359 * @brief Query FrTOC structure for number of FrAdcData structures.
360 * @param toc Pointer to the FrTOC structure to be queried.
361 * @return Number of FrAdcData structures.
362 * @retval (size_t)(-1) Failure.
363 * @sa Section 4.3.2.19 of
364 * <em>Specification of a Common Data Frame Format for Interferometric
365 * Gravitational Wave Detectors (IGWD)</em>
366 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
367 */
368size_t XLALFrameUFrTOCQueryAdcN(const LALFrameUFrTOC * toc);
369
370/**
371 * @brief Query FrTOC structure for the name of a FrAdcData structure.
372 * @param toc Pointer to the FrTOC structure to be queried.
373 * @param adc Index position of the FrAdcData structure.
374 * @return Pointer to string with the name of the FrAdcData structure.
375 * @retval NULL Failure.
376 * @warning The pointer returned is shallow and will be left dangling
377 * when the FrTOC structure is freed. The calling routine should not
378 * attempt to free the returned pointer.
379 * @sa Section 4.3.2.19 of
380 * <em>Specification of a Common Data Frame Format for Interferometric
381 * Gravitational Wave Detectors (IGWD)</em>
382 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
383 */
384const char *XLALFrameUFrTOCQueryAdcName(const LALFrameUFrTOC * toc, size_t adc);
385
386/**
387 * @brief Query FrTOC structure for number of FrSimData structures.
388 * @param toc Pointer to the FrTOC structure to be queried.
389 * @return Number of FrSimData structures.
390 * @retval (size_t)(-1) Failure.
391 * @sa Section 4.3.2.19 of
392 * <em>Specification of a Common Data Frame Format for Interferometric
393 * Gravitational Wave Detectors (IGWD)</em>
394 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
395 */
396size_t XLALFrameUFrTOCQuerySimN(const LALFrameUFrTOC * toc);
397
398/**
399 * @brief Query FrTOC structure for the name of a FrSimData structure.
400 * @param toc Pointer to the FrTOC structure to be queried.
401 * @param sim Index position of the FrSimData structure.
402 * @return Pointer to string with the name of the FrSimData structure.
403 * @retval NULL Failure.
404 * @warning The pointer returned is shallow and will be left dangling
405 * when the FrTOC structure is freed. The calling routine should not
406 * attempt to free the returned pointer.
407 * @sa Section 4.3.2.19 of
408 * <em>Specification of a Common Data Frame Format for Interferometric
409 * Gravitational Wave Detectors (IGWD)</em>
410 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
411 */
412const char *XLALFrameUFrTOCQuerySimName(const LALFrameUFrTOC * toc, size_t sim);
413
414/**
415 * @brief Query FrTOC structure for number of FrProcData structures.
416 * @param toc Pointer to the FrTOC structure to be queried.
417 * @return Number of FrProcData structures.
418 * @retval (size_t)(-1) Failure.
419 * @sa Section 4.3.2.19 of
420 * <em>Specification of a Common Data Frame Format for Interferometric
421 * Gravitational Wave Detectors (IGWD)</em>
422 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
423 */
424size_t XLALFrameUFrTOCQueryProcN(const LALFrameUFrTOC * toc);
425
426/**
427 * @brief Query FrTOC structure for the name of a FrProcData structure.
428 * @param toc Pointer to the FrTOC structure to be queried.
429 * @param proc Index position of the FrProcData structure.
430 * @return Pointer to string with the name of the FrProcData structure.
431 * @retval NULL Failure.
432 * @warning The pointer returned is shallow and will be left dangling
433 * when the FrTOC structure is freed. The calling routine should not
434 * attempt to free the returned pointer.
435 * @sa Section 4.3.2.19 of
436 * <em>Specification of a Common Data Frame Format for Interferometric
437 * Gravitational Wave Detectors (IGWD)</em>
438 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
439 */
440const char *XLALFrameUFrTOCQueryProcName(const LALFrameUFrTOC * toc, size_t proc);
441
442/**
443 * @brief Query FrTOC structure for number of FrDetector structures.
444 * @return Number of FrDetector structures.
445 * @retval (size_t)(-1) Failure.
446 * @sa Section 4.3.2.19 of
447 * <em>Specification of a Common Data Frame Format for Interferometric
448 * Gravitational Wave Detectors (IGWD)</em>
449 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
450 */
452
453/**
454 * @brief Query FrTOC structure for the name of a FrDetector structure.
455 * @param toc Pointer to the FrTOC structure to be queried.
456 * @param det Index position of the FrDetector structure.
457 * @return Pointer to string with the name of the FrDetector structure.
458 * @retval NULL Failure.
459 * @warning The pointer returned is shallow and will be left dangling
460 * when the FrTOC structure is freed. The calling routine should not
461 * attempt to free the returned pointer.
462 * @sa Section 4.3.2.19 of
463 * <em>Specification of a Common Data Frame Format for Interferometric
464 * Gravitational Wave Detectors (IGWD)</em>
465 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
466 */
467const char *XLALFrameUFrTOCQueryDetectorName(const LALFrameUFrTOC * toc, size_t det);
468
469/** @} */
470
471/**
472 * @name FrameH Routines
473 * @{
474 */
475
476/**
477 * @brief Free a FrameH structure.
478 * @param frame Pointer to the FrameH structure to free.
479 */
481
482/**
483 * @brief Allocate memory for a new frame header FrameH structure.
484 * @param name Name for this FrameH structure.
485 * @param start1 First of two double precision floating point numbers specifying the GPS start time in seconds for this FrameH structure (to be added to start2).
486 * @param start2 Second of two double precision floating point numbers GPS start time in seconds for this FrameH structure (to be added to start1).
487 * @param dt Duration in seconds for this FrameH structure.
488 * @param frnum Number for this FrameH structure.
489 * @return Pointer to a new FrameH structure.
490 * @retval NULL Failure.
491 * @note To maintain precision, the start time is broken into two double
492 * precision floating point values, start1 and start2, which, when added
493 * together is the GPS start time in seconds.
494 * @attention The calling routine is responsible for freeing the returned
495 * pointer with XLALFrameUFrameHFree().
496 * @sa Section 4.3.2.3 of
497 * <em>Specification of a Common Data Frame Format for Interferometric
498 * Gravitational Wave Detectors (IGWD)</em>
499 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
500 */
501LALFrameUFrameH *XLALFrameUFrameHAlloc(const char *name, double start1, double start2, double dt, int frnum);
502
503/**
504 * @brief Read a frame header FrameH structure from a FrFile stream.
505 * @param stream Pointer to the input FrFile stream.
506 * @param pos Index position of the FrameH structure to read.
507 * @return Pointer to a frame header FrameH structure.
508 * @retval NULL Failure.
509 * @attention The calling routine is responsible for freeing the returned
510 * pointer with XLALFrameUFrameHFree().
511 * @sa Section 4.3.2.3 of
512 * <em>Specification of a Common Data Frame Format for Interferometric
513 * Gravitational Wave Detectors (IGWD)</em>
514 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
515 */
516LALFrameUFrameH *XLALFrameUFrameHRead(LALFrameUFrFile * stream, int pos);
517
518/**
519 * @brief Write a FrameH structure to an output FrFile stream.
520 * @param stream Pointer to the output FrFile stream.
521 * @param frame Pointer to the FrameH structure to be written.
522 * @retval 0 Success.
523 * @retval <0 Failure.
524 * @sa Section 4.3.2.3 of
525 * <em>Specification of a Common Data Frame Format for Interferometric
526 * Gravitational Wave Detectors (IGWD)</em>
527 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
528 */
529int XLALFrameUFrameHWrite(LALFrameUFrFile * stream, LALFrameUFrameH * frame);
530
531/** @} */
532
533/**
534 * @name FrameH Add Routines
535 * @{
536 */
537
538/**
539 * @brief Add a FrChan structure to a FrameH structure.
540 * @param frame Pointer to the FrameH structure.
541 * @param channel Pointer to the FrChan structure to be written.
542 * @retval 0 Success.
543 * @retval <0 Failure.
544 * @sa Section 4.3.2.3 of
545 * <em>Specification of a Common Data Frame Format for Interferometric
546 * Gravitational Wave Detectors (IGWD)</em>
547 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
548 */
549int XLALFrameUFrameHFrChanAdd(LALFrameUFrameH * frame, LALFrameUFrChan * channel);
550
551/**
552 * @brief Add a FrDetector structure to a FrameH structure.
553 * @param frame Pointer to the FrameH structure.
554 * @param detector Pointer to the FrDetector structure to be written.
555 * @retval 0 Success.
556 * @retval <0 Failure.
557 * @sa Section 4.3.2.3 of
558 * <em>Specification of a Common Data Frame Format for Interferometric
559 * Gravitational Wave Detectors (IGWD)</em>
560 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
561 */
562int XLALFrameUFrameHFrDetectorAdd(LALFrameUFrameH * frame, LALFrameUFrDetector * detector);
563
564/**
565 * @brief Add a FrHistory structure to a FrameH structure.
566 * @param frame Pointer to the FrameH structure.
567 * @param history Pointer to the FrHistory structure to be written.
568 * @retval 0 Success.
569 * @retval <0 Failure.
570 * @sa Section 4.3.2.3 of
571 * <em>Specification of a Common Data Frame Format for Interferometric
572 * Gravitational Wave Detectors (IGWD)</em>
573 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
574 */
576
577/** @} */
578
579/**
580 * @name FrameH Query Routines
581 * @{
582 */
583
584/**
585 * @brief Query FrameH structure for its name.
586 * @param frame Pointer to the FrameH structure to be queried.
587 * @return Pointer to string with the name of the FrameH structure.
588 * @retval NULL Failure.
589 * @warning The pointer returned is shallow and will be left dangling
590 * when the FrameH structure is freed. The calling routine should not
591 * attempt to free the returned pointer.
592 * @sa Section 4.3.2.3 of
593 * <em>Specification of a Common Data Frame Format for Interferometric
594 * Gravitational Wave Detectors (IGWD)</em>
595 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
596 */
597const char *XLALFrameUFrameHQueryName(const LALFrameUFrameH * frame);
598
599/**
600 * @brief Query FrameH structure for the run number.
601 * @param frame Pointer to the FrameH structure to be queried.
602 * @return The run number associated with the FrameH structure.
603 * @retval <0 Failure.
604 * @sa Section 4.3.2.3 of
605 * <em>Specification of a Common Data Frame Format for Interferometric
606 * Gravitational Wave Detectors (IGWD)</em>
607 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
608 */
610
611/**
612 * @brief Query FrameH structure for the frame number.
613 * @param frame Pointer to the FrameH structure to be queried.
614 * @return The frame number associated with the FrameH structure.
615 * @retval <0 Failure.
616 * @sa Section 4.3.2.3 of
617 * <em>Specification of a Common Data Frame Format for Interferometric
618 * Gravitational Wave Detectors (IGWD)</em>
619 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
620 */
622
623/**
624 * @brief Query FrameH structure for the data quality word.
625 * @param frame Pointer to the FrameH structure to be queried.
626 * @return The 32-bit data quality word expressed as an int type.
627 * @retval <0 Failure.
628 * @sa Section 4.3.2.3 of
629 * <em>Specification of a Common Data Frame Format for Interferometric
630 * Gravitational Wave Detectors (IGWD)</em>
631 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
632 */
634
635/**
636 * @brief Query FrameH structure for the start time.
637 * @param iptr Pointer to the integer number of seconds of the GPS start time.
638 * @param frame Pointer to the FrameH structure to be queried.
639 * @return Fractional part of the GPS start time.
640 * @retval LAL_REAL8_FAIL_NAN Failure.
641 * @sa Section 4.3.2.3 of
642 * <em>Specification of a Common Data Frame Format for Interferometric
643 * Gravitational Wave Detectors (IGWD)</em>
644 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
645 */
646double XLALFrameUFrameHQueryGTimeModf(double *iptr, const LALFrameUFrameH * frame);
647
648/**
649 * @brief Query FrameH structure for the number of leap seconds.
650 * @param frame Pointer to the FrameH structure to be queried.
651 * @return The number of leap seconds (TAI-UTC).
652 * @retval <0 Failure.
653 * @sa Section 4.3.2.3 of
654 * <em>Specification of a Common Data Frame Format for Interferometric
655 * Gravitational Wave Detectors (IGWD)</em>
656 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
657 */
659
660/**
661 * @brief Query FrameH structure for the duration.
662 * @param frame Pointer to the FrameH structure to be queried.
663 * @return The duration of the FrameH structure in seconds.
664 * @retval LAL_REAL8_FAIL_NAN Failure.
665 * @sa Section 4.3.2.3 of
666 * <em>Specification of a Common Data Frame Format for Interferometric
667 * Gravitational Wave Detectors (IGWD)</em>
668 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
669 */
670double XLALFrameUFrameHQueryDt(const LALFrameUFrameH * frame);
671
672/** @} */
673
674/**
675 * @name FrameH Set Routines
676 * @{
677 */
678
679/**
680 * @brief Set the run number in a FrameH structure.
681 * @param frame Pointer to the FrameH structure to be modified.
682 * @param run The value of the run number to be set.
683 * @retval 0 Success.
684 * @retval <0 Failure.
685 * @sa Section 4.3.2.3 of
686 * <em>Specification of a Common Data Frame Format for Interferometric
687 * Gravitational Wave Detectors (IGWD)</em>
688 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
689 */
690int XLALFrameUFrameHSetRun(LALFrameUFrameH * frame, int run);
691
692/** @} */
693
694/**
695 * @name FrChan Routines
696 * @{
697 */
698
699/**
700 * @brief Free a FrChan structure.
701 * @param channel Pointer to the FrChan structure to free.
702 * @sa Sections 4.3.2.4, 4.3.2.11, and 4.3.2.14 of
703 * <em>Specification of a Common Data Frame Format for Interferometric
704 * Gravitational Wave Detectors (IGWD)</em>
705 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
706 */
707void XLALFrameUFrChanFree(LALFrameUFrChan * channel);
708
709/**
710 * @brief Read a channel FrChan structure from a FrFile stream.
711 * @param stream Pointer to the input FrFile stream.
712 * @param name Name of the FrChan structure to be read.
713 * @param pos Index position of the FrameH structure containing the FrChan.
714 * @return Pointer to a channel FrChan structure.
715 * @retval NULL Failure.
716 * @attention The calling routine is responsible for freeing the returned
717 * pointer with XLALFrameUFrChanFree().
718 * @sa Sections 4.3.2.4, 4.3.2.11, and 4.3.2.14 of
719 * <em>Specification of a Common Data Frame Format for Interferometric
720 * Gravitational Wave Detectors (IGWD)</em>
721 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
722 */
723LALFrameUFrChan *XLALFrameUFrChanRead(LALFrameUFrFile * stream, const char *name, size_t pos);
724
725/**
726 * @brief Allocate memory for a new FrChan structure of FrAdcData type.
727 * @param name Name for this FrChan structure.
728 * @param dtype Data type code given in #LALFrameUFrVectDataType.
729 * @param ndata Number of data points contained in this FrChan structure.
730 * @return Pointer to a new FrChan structure.
731 * @retval NULL Failure.
732 * @attention The calling routine is responsible for freeing the returned
733 * pointer with XLALFrameUFrChanFree().
734 * @sa Sections 4.3.2.4 of
735 * <em>Specification of a Common Data Frame Format for Interferometric
736 * Gravitational Wave Detectors (IGWD)</em>
737 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
738 */
739LALFrameUFrChan *XLALFrameUFrAdcChanAlloc(const char *name, int dtype, size_t ndata);
740
741/**
742 * @brief Allocate memory for a new FrChan structure of FrSimData type.
743 * @param name Name for this FrChan structure.
744 * @param dtype Data type code given in #LALFrameUFrVectDataType.
745 * @param ndata Number of data points contained in this FrChan structure.
746 * @return Pointer to a new FrChan structure.
747 * @retval NULL Failure.
748 * @attention The calling routine is responsible for freeing the returned
749 * pointer with XLALFrameUFrChanFree().
750 * @sa Sections 4.3.2.11 of
751 * <em>Specification of a Common Data Frame Format for Interferometric
752 * Gravitational Wave Detectors (IGWD)</em>
753 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
754 */
755LALFrameUFrChan *XLALFrameUFrSimChanAlloc(const char *name, int dtype, size_t ndata);
756
757/**
758 * @brief Allocate memory for a new FrChan structure of FrAdcData type.
759 * @param name Name for this FrChan structure.
760 * @param type FrProcData type code given in #LALFrameUFrProcDataType.
761 * @param subtype FrProcData subtype code given in #LALFrameUFrProcDataSubType.
762 * @param dtype Data type code given in #LALFrameUFrVectDataType.
763 * @param ndata Number of data points contained in this FrChan structure.
764 * @return Pointer to a new FrChan structure.
765 * @retval NULL Failure.
766 * @attention The calling routine is responsible for freeing the returned
767 * pointer with XLALFrameUFrChanFree().
768 * @sa Sections 4.3.2.14 of
769 * <em>Specification of a Common Data Frame Format for Interferometric
770 * Gravitational Wave Detectors (IGWD)</em>
771 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
772 */
773LALFrameUFrChan *XLALFrameUFrProcChanAlloc(const char *name, int type, int subtype, int dtype, size_t ndata);
774
775/** @} */
776
777/**
778 * @name FrChan Query Routines
779 * @{
780 */
781
782/**
783 * @brief Query FrChan structure for its name.
784 * @param channel Pointer to the FrChan structure to be queried.
785 * @return Pointer to string with the name of the FrChan structure.
786 * @retval NULL Failure.
787 * @warning The pointer returned is shallow and will be left dangling
788 * when the FrChan structure is freed. The calling routine should not
789 * attempt to free the returned pointer.
790 * @sa Sections 4.3.2.4, 4.3.2.11, and 4.3.2.14 of
791 * <em>Specification of a Common Data Frame Format for Interferometric
792 * Gravitational Wave Detectors (IGWD)</em>
793 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
794 */
795const char *XLALFrameUFrChanQueryName(const LALFrameUFrChan * channel);
796
797/**
798 * @brief Query FrChan structure for time offset for this channel.
799 * @param channel Pointer to the FrChan structure to be queried.
800 * @return The offset of the first sample relative to the frame start
801 * time in seconds.
802 * @retval LAL_REAL8_FAIL_NAN Failure.
803 * @remark The offset must be positive and smaller than the frame length.
804 * Time offsets are always added together: to obtain the time of the
805 * first sample, add the time offset to the frame start time as obtained
806 * from the routine XLALFrameUFrTOCQueryGTimeModf() or from the routine
807 * XLALFrameUFrameHQueryGTimeModf().
808 * @sa Sections 4.3.2.4, 4.3.2.11, and 4.3.2.14 of
809 * <em>Specification of a Common Data Frame Format for Interferometric
810 * Gravitational Wave Detectors (IGWD)</em>
811 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
812 */
813double XLALFrameUFrChanQueryTimeOffset(const LALFrameUFrChan * channel);
814
815/** @} */
816
817/**
818 * @name FrChan Set Routines
819 * @{
820 */
821
822/**
823 * @brief Set the sample rate in a FrChan structure.
824 * @param channel Pointer to the FrChan structure to be modified.
825 * @param sampleRate The value of the sample rate in Hertz to be set.
826 * @retval 0 Success.
827 * @retval <0 Failure.
828 * @sa Sections 4.3.2.4, 4.3.2.11, and 4.3.2.14 of
829 * <em>Specification of a Common Data Frame Format for Interferometric
830 * Gravitational Wave Detectors (IGWD)</em>
831 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
832 */
833int XLALFrameUFrChanSetSampleRate(LALFrameUFrChan * channel, double sampleRate);
834
835/**
836 * @brief Set the time offset in a FrChan structure.
837 * @param channel Pointer to the FrChan structure to be modified.
838 * @param timeOffset The offset of the first sample relative to the frame
839 * start time in seconds.
840 * @retval 0 Success.
841 * @retval <0 Failure.
842 * @remark The offset must be positive and smaller than the frame length.
843 * Time offsets are always added together: to obtain the time of the
844 * first sample, add the time offset to the frame start time as obtained
845 * from the routine XLALFrameUFrTOCQueryGTimeModf() or from the routine
846 * XLALFrameUFrameHQueryGTimeModf().
847 * @sa Sections 4.3.2.4, 4.3.2.11, and 4.3.2.14 of
848 * <em>Specification of a Common Data Frame Format for Interferometric
849 * Gravitational Wave Detectors (IGWD)</em>
850 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
851 */
852int XLALFrameUFrChanSetTimeOffset(LALFrameUFrChan * channel, double timeOffset);
853
854/**
855 * @brief Set the time range in a FrChan structure.
856 * @param channel Pointer to the FrChan structure to be modified.
857 * @param tRange The duration of sampled data in seconds.
858 * @retval 0 Success.
859 * @retval <0 Failure.
860 * @remark tRange is redundant with the axis informatino in the data vector
861 * in some cases. If a redundancy exists, the data must be identical to that
862 * in the FrVect for the earliest time dimension (e.g., for a time series,
863 * tRange = dx[0]*nx[0]). If a discrepancy exists then the FrVect values
864 * take precedence.
865 * @sa Section 4.3.2.11 of
866 * <em>Specification of a Common Data Frame Format for Interferometric
867 * Gravitational Wave Detectors (IGWD)</em>
868 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
869 */
870int XLALFrameUFrChanSetTRange(LALFrameUFrChan * channel, double tRange);
871
872/** @} */
873
874/**
875 * @name FrVect Routines
876 * @{
877 */
878
879/**
880 * @brief Allocate memory for a FrVect structure within a FrChan structure.
881 * @param channel Pointer to the FrChan structure to be modified.
882 * @param dtype Data type code given in #LALFrameUFrVectDataType.
883 * @param ndata Number of data points contained the FrVect structure.
884 * @retval 0 Success.
885 * @retval <0 Failure.
886 * @sa Sections 4.3.2.20 of
887 * <em>Specification of a Common Data Frame Format for Interferometric
888 * Gravitational Wave Detectors (IGWD)</em>
889 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
890 */
891int XLALFrameUFrChanVectorAlloc(LALFrameUFrChan * channel, int dtype, size_t ndata);
892
893/**
894 * @brief Compress a FrVect structure within a FrChan structure.
895 * @param channel Pointer to the FrChan structure to be modified.
896 * @param compressLevel Compression scheme given in
897 * #LALFrameUFrVectCompressionScheme.
898 * @retval 0 Success.
899 * @retval <0 Failure.
900 * @sa Sections 4.3.2.20 of
901 * <em>Specification of a Common Data Frame Format for Interferometric
902 * Gravitational Wave Detectors (IGWD)</em>
903 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
904 */
905int XLALFrameUFrChanVectorCompress(LALFrameUFrChan * channel, int compressLevel);
906
907/**
908 * @brief Expands a FrVect structure within a FrChan structure.
909 * @param channel Pointer to the FrChan structure to be modified.
910 * @retval 0 Success.
911 * @retval <0 Failure.
912 * @sa Sections 4.3.2.20 of
913 * <em>Specification of a Common Data Frame Format for Interferometric
914 * Gravitational Wave Detectors (IGWD)</em>
915 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
916 */
917int XLALFrameUFrChanVectorExpand(LALFrameUFrChan * channel);
918
919/** @} */
920
921/**
922 * @name FrVect Query Routines
923 * @{
924 */
925
926/**
927 * @brief Query FrChan structure for the name of its FrVect structure.
928 * @param channel Pointer to the FrChan structure to be queried.
929 * @return Pointer to string with the name of the FrVect structure.
930 * @retval NULL Failure.
931 * @warning The pointer returned is shallow and will be left dangling
932 * when the FrChan structure is freed. The calling routine should not
933 * attempt to free the returned pointer.
934 * @sa Sections 4.3.2.20 of
935 * <em>Specification of a Common Data Frame Format for Interferometric
936 * Gravitational Wave Detectors (IGWD)</em>
937 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
938 */
939const char *XLALFrameUFrChanVectorQueryName(const LALFrameUFrChan * channel);
940
941/**
942 * @brief Query FrChan structure for the compression scheme of its
943 * FrVect structure.
944 * @param channel Pointer to the FrChan structure to be queried.
945 * @return The compression scheme of the FrVect structure as given in
946 * #LALFrameUFrVectCompressionScheme.
947 * @retval <0 Failure.
948 * @sa Sections 4.3.2.20 of
949 * <em>Specification of a Common Data Frame Format for Interferometric
950 * Gravitational Wave Detectors (IGWD)</em>
951 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
952 */
953int XLALFrameUFrChanVectorQueryCompress(const LALFrameUFrChan * channel);
954
955/**
956 * @brief Query FrChan structure for the data type of its FrVect structure.
957 * @param channel Pointer to the FrChan structure to be queried.
958 * @return The data type of the FrVect structure as given in
959 * #LALFrameUFrVectDataType.
960 * @retval <0 Failure.
961 * @sa Sections 4.3.2.20 of
962 * <em>Specification of a Common Data Frame Format for Interferometric
963 * Gravitational Wave Detectors (IGWD)</em>
964 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
965 */
966int XLALFrameUFrChanVectorQueryType(const LALFrameUFrChan * channel);
967
968/**
969 * @brief Query FrChan structure for the data pointer in its FrVect structure.
970 * @param channel Pointer to the FrChan structure to be queried.
971 * @return Pointer to the data in the FrVect structure.
972 * @retval NULL Failure.
973 * @warning The pointer returned is shallow and will be left dangling
974 * when the FrChan structure is freed. The calling routine should not
975 * attempt to free the returned pointer.
976 * @sa Sections 4.3.2.20 of
977 * <em>Specification of a Common Data Frame Format for Interferometric
978 * Gravitational Wave Detectors (IGWD)</em>
979 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
980 */
981void *XLALFrameUFrChanVectorQueryData(const LALFrameUFrChan * channel);
982
983/**
984 * @brief Query FrChan structure for the number of bytes of data in its
985 * FrVect structure.
986 * @param channel Pointer to the FrChan structure to be queried.
987 * @return The number of bytes of data in the FrVect structure.
988 * @retval (size_t)(-1) Failure.
989 * @sa Sections 4.3.2.20 of
990 * <em>Specification of a Common Data Frame Format for Interferometric
991 * Gravitational Wave Detectors (IGWD)</em>
992 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
993 */
994size_t XLALFrameUFrChanVectorQueryNBytes(const LALFrameUFrChan * channel);
995
996/**
997 * @brief Query FrChan structure for the number of points of data in its
998 * FrVect structure.
999 * @param channel Pointer to the FrChan structure to be queried.
1000 * @return The number of bytes of data in the FrVect structure.
1001 * @retval (size_t)(-1) Failure.
1002 * @sa Sections 4.3.2.20 of
1003 * <em>Specification of a Common Data Frame Format for Interferometric
1004 * Gravitational Wave Detectors (IGWD)</em>
1005 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1006 */
1007size_t XLALFrameUFrChanVectorQueryNData(const LALFrameUFrChan * channel);
1008
1009/**
1010 * @brief Query FrChan structure for the number of dimensions of
1011 * the multi-dimensional data in its FrVect structure.
1012 * @param channel Pointer to the FrChan structure to be queried.
1013 * @return The number of dimensions of the data in the FrVect structure.
1014 * @retval (size_t)(-1) Failure.
1015 * @sa Sections 4.3.2.20 of
1016 * <em>Specification of a Common Data Frame Format for Interferometric
1017 * Gravitational Wave Detectors (IGWD)</em>
1018 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1019 */
1020size_t XLALFrameUFrChanVectorQueryNDim(const LALFrameUFrChan * channel);
1021
1022/**
1023 * @brief Query FrChan structure for the number of points in the @a dim
1024 * dimension of the multi-dimensional data in the FrVect structure.
1025 * @param channel Pointer to the FrChan structure to be queried.
1026 * @param dim The dimension of the multi-dimensional data.
1027 * @return The number of points in the @a dim dimension of the data in the
1028 * FrVect structure.
1029 * @retval (size_t)(-1) Failure.
1030 * @sa Sections 4.3.2.20 of
1031 * <em>Specification of a Common Data Frame Format for Interferometric
1032 * Gravitational Wave Detectors (IGWD)</em>
1033 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1034 */
1035size_t XLALFrameUFrChanVectorQueryNx(const LALFrameUFrChan * channel, size_t dim);
1036
1037/**
1038 * @brief Query FrChan structure for the sampling interval in the @a dim
1039 * dimension of the multi-dimensional data in the FrVect structure.
1040 * @param channel Pointer to the FrChan structure to be queried.
1041 * @param dim The dimension of the multi-dimensional data.
1042 * @return The sampling interval in the @a dim dimension of the data in the
1043 * FrVect structure.
1044 * @retval LAL_REAL8_FAIL_NAN Failure.
1045 * @sa Sections 4.3.2.20 of
1046 * <em>Specification of a Common Data Frame Format for Interferometric
1047 * Gravitational Wave Detectors (IGWD)</em>
1048 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1049 */
1050double XLALFrameUFrChanVectorQueryDx(const LALFrameUFrChan * channel, size_t dim);
1051
1052/**
1053 * @brief Query FrChan structure for the starting value of the @a dim
1054 * dimension of the multi-dimensional data in the FrVect structure.
1055 * @param channel Pointer to the FrChan structure to be queried.
1056 * @param dim The dimension of the multi-dimensional data.
1057 * @return The starting value of the @a dim dimension of the data in the
1058 * FrVect structure.
1059 * @retval LAL_REAL8_FAIL_NAN Failure.
1060 * @sa Sections 4.3.2.20 of
1061 * <em>Specification of a Common Data Frame Format for Interferometric
1062 * Gravitational Wave Detectors (IGWD)</em>
1063 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1064 */
1065double XLALFrameUFrChanVectorQueryStartX(const LALFrameUFrChan * channel, size_t dim);
1066
1067/**
1068 * @brief Query FrChan structure for the units of the domain of the @a dim
1069 * dimension of the multi-dimensional data in the FrVect structure.
1070 * @param channel Pointer to the FrChan structure to be queried.
1071 * @param dim The dimension of the multi-dimensional data.
1072 * @return Pointer to a string containing the units of the domain of the @a dim
1073 * dimension of the data in the FrVect structure.
1074 * @retval NULL Failure.
1075 * @warning The pointer returned is shallow and will be left dangling
1076 * when the FrChan structure is freed. The calling routine should not
1077 * attempt to free the returned pointer.
1078 * @sa Sections 4.3.2.20 of
1079 * <em>Specification of a Common Data Frame Format for Interferometric
1080 * Gravitational Wave Detectors (IGWD)</em>
1081 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1082 */
1083const char *XLALFrameUFrChanVectorQueryUnitX(const LALFrameUFrChan * channel, size_t dim);
1084
1085/**
1086 * @brief Query FrChan structure for sample units of the data in the FrVect
1087 * structure.
1088 * @param channel Pointer to the FrChan structure to be queried.
1089 * @return Pointer to a string containing the sample units of the data in the
1090 * FrVect structure.
1091 * @retval NULL Failure.
1092 * @warning The pointer returned is shallow and will be left dangling
1093 * when the FrChan structure is freed. The calling routine should not
1094 * attempt to free the returned pointer.
1095 * @sa Sections 4.3.2.20 of
1096 * <em>Specification of a Common Data Frame Format for Interferometric
1097 * Gravitational Wave Detectors (IGWD)</em>
1098 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1099 */
1100const char *XLALFrameUFrChanVectorQueryUnitY(const LALFrameUFrChan * channel);
1101
1102/** @} */
1103
1104/**
1105 * @name FrVect Set Routines
1106 * @{
1107 */
1108
1109/**
1110 * @brief Set the name of the FrVect structure contained in a FrChan structure.
1111 * @param channel Pointer to the FrChan structure to be modified.
1112 * @param name Pointer to a string with the name for the FrVect structure.
1113 * @retval 0 Success.
1114 * @retval <0 Failure.
1115 * @sa Sections 4.3.2.20 of
1116 * <em>Specification of a Common Data Frame Format for Interferometric
1117 * Gravitational Wave Detectors (IGWD)</em>
1118 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1119 */
1120int XLALFrameUFrChanVectorSetName(LALFrameUFrChan * channel, const char *name);
1121
1122/**
1123 * @brief Set the sampling interval for the data in the FrVect structure
1124 * contained in a FrChan structure.
1125 * @param channel Pointer to the FrChan structure to be modified.
1126 * @param dx The sampling interval for the data.
1127 * @retval 0 Success.
1128 * @retval <0 Failure.
1129 * @sa Sections 4.3.2.20 of
1130 * <em>Specification of a Common Data Frame Format for Interferometric
1131 * Gravitational Wave Detectors (IGWD)</em>
1132 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1133 */
1134int XLALFrameUFrChanVectorSetDx(LALFrameUFrChan * channel, double dx);
1135
1136/**
1137 * @brief Set the starting value for the domain of the data in the FrVect
1138 * structure contained in a FrChan structure.
1139 * @param channel Pointer to the FrChan structure to be modified.
1140 * @param x0 The starting value for the domain of the data in the FrVect
1141 * structure.
1142 * @retval 0 Success.
1143 * @retval <0 Failure.
1144 * @sa Sections 4.3.2.20 of
1145 * <em>Specification of a Common Data Frame Format for Interferometric
1146 * Gravitational Wave Detectors (IGWD)</em>
1147 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1148 */
1149int XLALFrameUFrChanVectorSetStartX(LALFrameUFrChan * channel, double x0);
1150
1151/**
1152 * @brief Set the units of the domain of the data in the FrVect structure
1153 * contained in a FrChan structure.
1154 * @param channel Pointer to the FrChan structure to be modified.
1155 * @param unit Pointer to a string containing the units of the domain of the
1156 * data in the FrVect structure.
1157 * @retval 0 Success.
1158 * @retval <0 Failure.
1159 * @sa Sections 4.3.2.20 of
1160 * <em>Specification of a Common Data Frame Format for Interferometric
1161 * Gravitational Wave Detectors (IGWD)</em>
1162 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1163 */
1164int XLALFrameUFrChanVectorSetUnitX(LALFrameUFrChan * channel, const char *unit);
1165
1166/**
1167 * @brief Set the units of the data in the FrVect structure contained in a
1168 * FrChan structure.
1169 * @param channel Pointer to the FrChan structure to be modified.
1170 * @param unit Pointer to a string containing the units of the data in the
1171 * FrVect structure.
1172 * @retval 0 Success.
1173 * @retval <0 Failure.
1174 * @sa Sections 4.3.2.20 of
1175 * <em>Specification of a Common Data Frame Format for Interferometric
1176 * Gravitational Wave Detectors (IGWD)</em>
1177 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1178 */
1179int XLALFrameUFrChanVectorSetUnitY(LALFrameUFrChan * channel, const char *unit);
1180
1181/* TODO: a bunch more things to set coming up!!! */
1182
1183/** @} */
1184
1185/**
1186 * @name FrDetector Routines
1187 * @{
1188 */
1189
1190/**
1191 * @brief Free a FrDetector structure.
1192 * @param detector Pointer to the FrDetector structure to free.
1193 * @sa Section 4.3.2.5 of
1194 * <em>Specification of a Common Data Frame Format for Interferometric
1195 * Gravitational Wave Detectors (IGWD)</em>
1196 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1197 */
1198void XLALFrameUFrDetectorFree(LALFrameUFrDetector * detector);
1199
1200/**
1201 * @brief Read a detector FrDetector structure from a FrFile stream.
1202 * @param stream Pointer to the input FrFile stream.
1203 * @param name Name of the FrDetector structure to be read.
1204 * @return Pointer to a detector FrDetector structure.
1205 * @retval NULL Failure.
1206 * @attention The calling routine is responsible for freeing the returned
1207 * pointer with XLALFrameUFrDetectorFree().
1208 * @sa Section 4.3.2.5 of
1209 * <em>Specification of a Common Data Frame Format for Interferometric
1210 * Gravitational Wave Detectors (IGWD)</em>
1211 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1212 */
1213LALFrameUFrDetector *XLALFrameUFrDetectorRead(LALFrameUFrFile * stream, const char *name);
1214
1215/**
1216 * @brief Allocate memory for a new detector FrDetector structure.
1217 * @param name Name for this FrDetector structure.
1218 * @param prefix UNDOCUMENTED
1219 * @param latitude Latitude North of the equator of detector in radians.
1220 * @param longitude Longitude East of Greenwich meridian of detector in radians.
1221 * @param elevation Elevation of detector above WGS84 ellipsoid in meters.
1222 * @param azimuthX Orientation of x-arm in radians East of North.
1223 * @param azimuthY Orientation of y-arm in radians East of North.
1224 * @param altitudeX Altitude (pitch) angle of x-arm in radians above horizaon
1225 * (local tangent to WGS84 ellipsoid).
1226 * @param altitudeY Altitude (pitch) angle of y-arm in radians above horizaon
1227 * (local tangent to WGS84 ellipsoid).
1228 * @param midpointX Distance in meters between detector vertex and the middle
1229 * of the x-arm.
1230 * @param midpointY Distance in meters between detector vertex and the middle
1231 * of the y-arm.
1232 * @param localTime Local seasonal time minus UTC in seconds.
1233 * @return Pointer to a new FrDetector structure.
1234 * @retval NULL Failure.
1235 * @attention The calling routine is responsible for freeing the returned
1236 * pointer with XLALFrameUFrDetectorFree().
1237 * @sa Section 4.3.2.5 of
1238 * <em>Specification of a Common Data Frame Format for Interferometric
1239 * Gravitational Wave Detectors (IGWD)</em>
1240 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1241 * @sa <em>Beam Pattern Response Functions and Times of Arrival for Earthbound
1242 * Interferometer</em>
1243 * LIGO-T010110 [https://dcc.ligo.org/LIGO-T010110/public]
1244 */
1245LALFrameUFrDetector *XLALFrameUFrDetectorAlloc(const char *name,
1246 const char *prefix, double latitude, double longitude, double elevation,
1247 double azimuthX, double azimuthY, double altitudeX, double altitudeY, double midpointX, double midpointY, int localTime);
1248
1249/** @} */
1250
1251/**
1252 * @name FrDetector Query Routines
1253 * @{
1254 */
1255
1256/**
1257 * @brief Query FrDetector structure for the detector name.
1258 * @param detector Pointer to the FrDetector structure to be queried.
1259 * @return Pointer to string with the name of the FrDetector structure.
1260 * @retval NULL Failure.
1261 * @warning The pointer returned is shallow and will be left dangling
1262 * when the FrDetector structure is freed. The calling routine should not
1263 * attempt to free the returned pointer.
1264 * @sa Section 4.3.2.5 of
1265 * <em>Specification of a Common Data Frame Format for Interferometric
1266 * Gravitational Wave Detectors (IGWD)</em>
1267 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1268 */
1269const char *XLALFrameUFrDetectorQueryName(const LALFrameUFrDetector * detector);
1270
1271/**
1272 * @brief Query FrDetector structure for the detector prefix.
1273 * @param detector Pointer to the FrDetector structure to be queried.
1274 * @return Pointer to string with the prefix of the detector.
1275 * @retval NULL Failure.
1276 * @warning The pointer returned is shallow and will be left dangling
1277 * when the FrDetector structure is freed. The calling routine should not
1278 * attempt to free the returned pointer.
1279 * @sa Section 4.3.2.5 of
1280 * <em>Specification of a Common Data Frame Format for Interferometric
1281 * Gravitational Wave Detectors (IGWD)</em>
1282 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1283 */
1284const char *XLALFrameUFrDetectorQueryPrefix(const LALFrameUFrDetector * detector);
1285
1286/**
1287 * @brief Query FrDetector structure for the detector longitude.
1288 * @param detector Pointer to the FrDetector structure to be queried.
1289 * @return The detector longitude in radians East of the Greenwich meridian.
1290 * @retval LAL_REAL8_FAIL_NAN Failure.
1291 * @sa Section 4.3.2.5 of
1292 * <em>Specification of a Common Data Frame Format for Interferometric
1293 * Gravitational Wave Detectors (IGWD)</em>
1294 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1295 * @sa <em>Beam Pattern Response Functions and Times of Arrival for Earthbound
1296 * Interferometer</em>
1297 * LIGO-T010110 [https://dcc.ligo.org/LIGO-T010110/public]
1298 */
1299double XLALFrameUFrDetectorQueryLongitude(const LALFrameUFrDetector * detector);
1300
1301/**
1302 * @brief Query FrDetector structure for the detector latitude.
1303 * @param detector Pointer to the FrDetector structure to be queried.
1304 * @return The detector latitude in radians North of the equator.
1305 * @retval LAL_REAL8_FAIL_NAN Failure.
1306 * @sa Section 4.3.2.5 of
1307 * <em>Specification of a Common Data Frame Format for Interferometric
1308 * Gravitational Wave Detectors (IGWD)</em>
1309 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1310 * @sa <em>Beam Pattern Response Functions and Times of Arrival for Earthbound
1311 * Interferometer</em>
1312 * LIGO-T010110 [https://dcc.ligo.org/LIGO-T010110/public]
1313 */
1314double XLALFrameUFrDetectorQueryLatitude(const LALFrameUFrDetector * detector);
1315
1316/**
1317 * @brief Query FrDetector structure for the detector elevation.
1318 * @param detector Pointer to the FrDetector structure to be queried.
1319 * @return The detector elevation in meters relative to the WGS84 ellipsoid.
1320 * @retval LAL_REAL8_FAIL_NAN Failure.
1321 * @sa Section 4.3.2.5 of
1322 * <em>Specification of a Common Data Frame Format for Interferometric
1323 * Gravitational Wave Detectors (IGWD)</em>
1324 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1325 * @sa <em>Beam Pattern Response Functions and Times of Arrival for Earthbound
1326 * Interferometer</em>
1327 * LIGO-T010110 [https://dcc.ligo.org/LIGO-T010110/public]
1328 */
1329double XLALFrameUFrDetectorQueryElevation(const LALFrameUFrDetector * detector);
1330
1331/**
1332 * @brief Query FrDetector structure for the detector x-arm azimuth.
1333 * @param detector Pointer to the FrDetector structure to be queried.
1334 * @return The orientation of the x-arm in radians East of North.
1335 * @retval LAL_REAL8_FAIL_NAN Failure.
1336 * @sa Section 4.3.2.5 of
1337 * <em>Specification of a Common Data Frame Format for Interferometric
1338 * Gravitational Wave Detectors (IGWD)</em>
1339 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1340 * @sa <em>Beam Pattern Response Functions and Times of Arrival for Earthbound
1341 * Interferometer</em>
1342 * LIGO-T010110 [https://dcc.ligo.org/LIGO-T010110/public]
1343 */
1344double XLALFrameUFrDetectorQueryArmXAzimuth(const LALFrameUFrDetector * detector);
1345
1346/**
1347 * @brief Query FrDetector structure for the detector y-arm azimuth.
1348 * @param detector Pointer to the FrDetector structure to be queried.
1349 * @return The orientation of the y-arm in radians East of North.
1350 * @retval LAL_REAL8_FAIL_NAN Failure.
1351 * @sa Section 4.3.2.5 of
1352 * <em>Specification of a Common Data Frame Format for Interferometric
1353 * Gravitational Wave Detectors (IGWD)</em>
1354 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1355 * @sa <em>Beam Pattern Response Functions and Times of Arrival for Earthbound
1356 * Interferometer</em>
1357 * LIGO-T010110 [https://dcc.ligo.org/LIGO-T010110/public]
1358 */
1359double XLALFrameUFrDetectorQueryArmYAzimuth(const LALFrameUFrDetector * detector);
1360
1361/**
1362 * @brief Query FrDetector structure for the detector x-arm altitude.
1363 * @param detector Pointer to the FrDetector structure to be queried.
1364 * @return The altitude (pitch) of the x-arm in radians above horizontal
1365 * (local tangent to WGS84 ellipsoid).
1366 * @retval LAL_REAL8_FAIL_NAN Failure.
1367 * @sa Section 4.3.2.5 of
1368 * <em>Specification of a Common Data Frame Format for Interferometric
1369 * Gravitational Wave Detectors (IGWD)</em>
1370 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1371 * @sa <em>Beam Pattern Response Functions and Times of Arrival for Earthbound
1372 * Interferometer</em>
1373 * LIGO-T010110 [https://dcc.ligo.org/LIGO-T010110/public]
1374 */
1375double XLALFrameUFrDetectorQueryArmXAltitude(const LALFrameUFrDetector * detector);
1376
1377/**
1378 * @brief Query FrDetector structure for the detector y-arm altitude.
1379 * @param detector Pointer to the FrDetector structure to be queried.
1380 * @return The altitude (pitch) of the y-arm in radians above horizontal
1381 * (local tangent to WGS84 ellipsoid).
1382 * @retval LAL_REAL8_FAIL_NAN Failure.
1383 * @sa Section 4.3.2.5 of
1384 * <em>Specification of a Common Data Frame Format for Interferometric
1385 * Gravitational Wave Detectors (IGWD)</em>
1386 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1387 * @sa <em>Beam Pattern Response Functions and Times of Arrival for Earthbound
1388 * Interferometer</em>
1389 * LIGO-T010110 [https://dcc.ligo.org/LIGO-T010110/public]
1390 */
1391double XLALFrameUFrDetectorQueryArmYAltitude(const LALFrameUFrDetector * detector);
1392
1393/**
1394 * @brief Query FrDetector structure for the detector x-arm midpoint.
1395 * @param detector Pointer to the FrDetector structure to be queried.
1396 * @return The distance in meters between the detector vertex and the
1397 * midpoint of the x-arm.
1398 * @retval LAL_REAL8_FAIL_NAN Failure.
1399 * @sa Section 4.3.2.5 of
1400 * <em>Specification of a Common Data Frame Format for Interferometric
1401 * Gravitational Wave Detectors (IGWD)</em>
1402 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1403 * @sa <em>Beam Pattern Response Functions and Times of Arrival for Earthbound
1404 * Interferometer</em>
1405 * LIGO-T010110 [https://dcc.ligo.org/LIGO-T010110/public]
1406 */
1407double XLALFrameUFrDetectorQueryArmXMidpoint(const LALFrameUFrDetector * detector);
1408
1409/**
1410 * @brief Query FrDetector structure for the detector y-arm midpoint.
1411 * @param detector Pointer to the FrDetector structure to be queried.
1412 * @return The distance in meters between the detector vertex and the
1413 * midpoint of the y-arm.
1414 * @retval LAL_REAL8_FAIL_NAN Failure.
1415 * @sa Section 4.3.2.5 of
1416 * <em>Specification of a Common Data Frame Format for Interferometric
1417 * Gravitational Wave Detectors (IGWD)</em>
1418 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1419 * @sa <em>Beam Pattern Response Functions and Times of Arrival for Earthbound
1420 * Interferometer</em>
1421 * LIGO-T010110 [https://dcc.ligo.org/LIGO-T010110/public]
1422 */
1423double XLALFrameUFrDetectorQueryArmYMidpoint(const LALFrameUFrDetector * detector);
1424
1425/**
1426 * @brief Query FrDetector structure for the local time offset at the detector.
1427 * @param detector Pointer to the FrDetector structure to be queried.
1428 * @return The local seasonal time minus UTC in seconds.
1429 * @sa Section 4.3.2.5 of
1430 * <em>Specification of a Common Data Frame Format for Interferometric
1431 * Gravitational Wave Detectors (IGWD)</em>
1432 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1433 * @sa <em>Beam Pattern Response Functions and Times of Arrival for Earthbound
1434 * Interferometer</em>
1435 * LIGO-T010110 [https://dcc.ligo.org/LIGO-T010110/public]
1436 */
1437int XLALFrameUFrDetectorQueryLocalTime(const LALFrameUFrDetector * detector);
1438
1439/** @} */
1440
1441/**
1442 * @name FrHistory Routines
1443 * @{
1444 */
1445
1446/**
1447 * @brief Free a FrHistory structure.
1448 * @param history Pointer to the FrHistory structure to free.
1449 * @sa Section 4.3.2.9 of
1450 * <em>Specification of a Common Data Frame Format for Interferometric
1451 * Gravitational Wave Detectors (IGWD)</em>
1452 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1453 */
1455
1456/**
1457 * @brief Allocate memory for a new detector FrHistory structure.
1458 * @param name Name for this FrDetector structure.
1459 * @param gpssec Time stamp in GPS seconds for this FrHistory structure.
1460 * @param comment History comment for this FrHistory structure.
1461 * @return Pointer to a new FrHistory structure.
1462 * @retval NULL Failure.
1463 * @attention The calling routine is responsible for freeing the returned
1464 * pointer with XLALFrameUFrHistoryFree().
1465 * @sa Section 4.3.2.9 of
1466 * <em>Specification of a Common Data Frame Format for Interferometric
1467 * Gravitational Wave Detectors (IGWD)</em>
1468 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130/public].
1469 */
1470LALFrameUFrHistory *XLALFrameUFrHistoryAlloc(const char *name, double gpssec, const char *comment);
1471
1472/** @} */
1473
1474/** @} */
1475
1476#if 0
1477{
1478#endif
1479#ifdef __cplusplus
1480}
1481#endif
1482
1483#endif /* _LALFRAMEU_H */
#define tagLALFrameUFrameH
Definition: LALFrameC.c:70
#define tagLALFrameUFrHistory
Definition: LALFrameC.c:73
#define tagLALFrameUFrTOC
Definition: LALFrameC.c:72
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
LALFrameUFrProcDataType
FrProcData type codes.
Definition: LALFrameU.h:188
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
LALFrameUFrProcDataSubType
FrProcData subtype codes for frequency series.
Definition: LALFrameU.h:218
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
LALFrameUFrVectCompressionScheme
Compression scheme codes.
Definition: LALFrameU.h:114
double XLALFrameUFrDetectorQueryArmXAzimuth(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector x-arm azimuth.
Definition: LALFrameU.c:473
LALFrameUFrVectDataType
FrVect data type codes.
Definition: LALFrameU.h:140
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
@ LAL_FRAMEU_FR_PROC_TYPE_TIME_FREQUENCY
Id for time-frequency data.
Definition: LALFrameU.h:202
@ LAL_FRAMEU_FR_PROC_TYPE_MULTI_DIMENSIONAL
Id for multi-dimensional data.
Definition: LALFrameU.h:208
@ LAL_FRAMEU_FR_PROC_TYPE_WAVELET
Id for wavelet data.
Definition: LALFrameU.h:205
@ LAL_FRAMEU_FR_PROC_TYPE_TIME_SERIES
Id for time-series data.
Definition: LALFrameU.h:193
@ LAL_FRAMEU_FR_PROC_TYPE_OTHER_1D_SERIES
Id for other one-dimensional series data.
Definition: LALFrameU.h:199
@ LAL_FRAMEU_FR_PROC_TYPE_UNKNOWN
Id for unknown or user-defined data.
Definition: LALFrameU.h:190
@ LAL_FRAMEU_FR_PROC_TYPE_FREQUENCY_SERIES
Id for frequency-series data.
Definition: LALFrameU.h:196
@ LAL_FRAMEU_FR_PROC_SUB_TYPE_COHERENCE
Id for coherence data.
Definition: LALFrameU.h:235
@ LAL_FRAMEU_FR_PROC_SUB_TYPE_CROSS_SPECTRAL_DENSITY
Id for cross spectral density data.
Definition: LALFrameU.h:232
@ LAL_FRAMEU_FR_PROC_SUB_TYPE_DFT
Id for DFT data.
Definition: LALFrameU.h:223
@ LAL_FRAMEU_FR_PROC_SUB_TYPE_POWER_SPECTRAL_DENSITY
Id for power spectral density data.
Definition: LALFrameU.h:229
@ LAL_FRAMEU_FR_PROC_SUB_TYPE_AMPLITUDE_SPECTRAL_DENSITY
Id for amplitude spectral density data.
Definition: LALFrameU.h:226
@ LAL_FRAMEU_FR_PROC_SUB_TYPE_TRANSFER_FUNCTION
Id for transfer function data.
Definition: LALFrameU.h:238
@ LAL_FRAMEU_FR_PROC_SUB_TYPE_UNKNOWN
Id for unknown or user-defined data.
Definition: LALFrameU.h:220
@ LAL_FRAMEU_FR_VECT_COMPRESS_DIFF_GZIP
Id for gzip compression of differential values.
Definition: LALFrameU.h:122
@ LAL_FRAMEU_FR_VECT_COMPRESS_ZERO_SUPPRESS_WORD_2
Id for differentiation and zero suppression for 2-byte word integer types only.
Definition: LALFrameU.h:126
@ LAL_FRAMEU_FR_VECT_COMPRESS_RAW
Id for uncompressed raw values.
Definition: LALFrameU.h:116
@ LAL_FRAMEU_FR_VECT_COMPRESS_GZIP
Id for gzip compression.
Definition: LALFrameU.h:119
@ LAL_FRAMEU_FR_VECT_COMPRESS_ZERO_SUPPRESS_WORD_4
Id for differentiation and zero suppression for 4-byte word (integer or floating-point).
Definition: LALFrameU.h:130
@ LAL_FRAMEU_FR_VECT_STRING
Id for string data type.
Definition: LALFrameU.h:166
@ LAL_FRAMEU_FR_VECT_16C
Id for 128-bit double precision complex data type.
Definition: LALFrameU.h:163
@ LAL_FRAMEU_FR_VECT_C
Id for 8-bit signed char data type.
Definition: LALFrameU.h:142
@ LAL_FRAMEU_FR_VECT_4R
Id for 32-bit single precision floating point data type.
Definition: LALFrameU.h:151
@ LAL_FRAMEU_FR_VECT_2S
Id for 16-bit signed integer data type.
Definition: LALFrameU.h:145
@ LAL_FRAMEU_FR_VECT_8S
Id for 64-bit signed integer data type.
Definition: LALFrameU.h:157
@ LAL_FRAMEU_FR_VECT_8U
Id for 64-bit unsigned integer data type.
Definition: LALFrameU.h:175
@ LAL_FRAMEU_FR_VECT_4S
Id for 32-bit signed integer data type.
Definition: LALFrameU.h:154
@ LAL_FRAMEU_FR_VECT_8C
Id for 64-bit single precision complex data type.
Definition: LALFrameU.h:160
@ LAL_FRAMEU_FR_VECT_1U
Id for 8-bit unsigned char data type.
Definition: LALFrameU.h:178
@ LAL_FRAMEU_FR_VECT_8R
Id for 64-bit double precision floating point data type.
Definition: LALFrameU.h:148
@ LAL_FRAMEU_FR_VECT_4U
Id for 32-bit unsigned integer data type.
Definition: LALFrameU.h:172
@ LAL_FRAMEU_FR_VECT_2U
Id for 16-bit unsigned integer data type.
Definition: LALFrameU.h:169
double dt
Definition: stream.c:110
char * channel
Definition: stream.c:108
Incomplete type for a data channel FrChan structure.
Definition: LALFrameL.c:104
Incomplete type for a detector data FrDetector structure.
Definition: LALFrameC.c:91
Incomplete type for a frame file FrFile stream.
Definition: LALFrameC.c:76