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
LALFrameIO.h
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 Bernd Machenschalk, Jolien Creighton, Robert Adam Mercer, Xavier Siemens
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#ifndef _LALFRAMEIO_H
21#define _LALFRAMEIO_H
22
23#include <lal/LALDatatypes.h>
24#include <lal/LALDetectors.h>
25#include <lal/LALFrameU.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30#if 0
31}
32#endif
33
34struct tagLALFrFile;
35
36/**
37 * @defgroup LALFrameIO_h Header LALFrameIO.h
38 * @ingroup lalframe_general
39 *
40 * @author Jolien Creighton
41 * @brief Provides an intermediate-level interface for working on individual frame-files.
42 * @details
43 * This provides an intermediate-level LAL interface for working on individual frame files.
44 * @sa <em>Specification of a Common Data Frame Format for Interferometric
45 * Gravitational Wave Detectors (IGWD)</em>
46 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
47 */
48/** @{ */
49
50/**
51 * @defgroup LALFrameIO_h_read Frame Reading Routines
52 * @brief Intermediate-level routines for reading frame files.
53 * @details
54 * These routines provide the intermediate-level routines for reading from
55 * frame files and converting the contents to LAL data types.
56 * @{
57 */
58
59/**
60 * @brief Incomplete type for a frame file structure.
61 * @details
62 * This structure contains the information used for reading from a frame file.
63 */
64typedef struct tagLALFrFile LALFrFile;
65
66/**
67 * @name Frame File Open/Close/Checksum Routines
68 * @{
69 */
70
71/**
72 * @brief Close a frame file described by a LALFrFile structure.
73 * @note This routine is a no-op if passed a NULL pointer.
74 * @param frfile Pointer to the ::LALFrFile structure
75 * @retval 0 Successfully closed the file and freed memory.
76 */
77int XLALFrFileClose(LALFrFile * frfile);
78
79/**
80 * @brief Open frame file for reading and return a LALFrFile structure.
81 * @note Only "file:" protocol is supported in URLs.
82 * @param url URL of the frame file to be opened.
83 * @return Pointer to a LALFrFile structure that can be used to read the frame
84 * file, or NULL if the URL could not be opened.
85 */
86LALFrFile *XLALFrFileOpenURL(const char *url);
87
88/**
89 * @brief Use checksum to determine if a frame file is valid.
90 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
91 * @return Logical value indicating if the frame file checksum is correct.
92 * @retval 1 The frame file is valid.
93 * @retval 0 The frame file has an incorrect checksum or an error occurred.
94 */
96
97/** @} */
98
99/**
100 * @name Routines to Query Frame File Contents
101 * @{
102 */
103
104/**
105 * @brief Query a frame file for the number of frames contained in the file.
106 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
107 * @return Then number of frame structures contained.
108 * @retval (size_t)(-1) Failure.
109 */
110size_t XLALFrFileQueryNFrame(const LALFrFile * frfile);
111
112/**
113 * @brief Query a frame file for the start time of a particular frame.
114 * @param[out] start Pointer to a \c LIGOTimeGPS structure containing the start time.
115 * @param[in] frfile Pointer to a ::LALFrFile structure associated with a frame file.
116 * @param[in] pos The index of the frame in the frame file.
117 * @returns The pointer to the \c LIGOTimeGPS parameter start, with its values
118 * set to the start GPS time of the specified frame.
119 */
120LIGOTimeGPS *XLALFrFileQueryGTime(LIGOTimeGPS * start, const LALFrFile * frfile, size_t pos);
121
122/**
123 * @brief Query a frame file for the duration of a particular frame.
124 * @param[in] frfile Pointer to a ::LALFrFile structure associated with a frame file.
125 * @param[in] pos The index of the frame in the frame file.
126 * @returns The duration of the frame file in seconds.
127 * @retval LAL_REAL8_FAIL_NAN Failure.
128 */
129double XLALFrFileQueryDt(const LALFrFile * frfile, size_t pos);
130
131/**
132 * @brief Query a frame file for the data type of a channel in a frame.
133 * @param[in] frfile Pointer to a ::LALFrFile structure associated with a frame file.
134 * @param[in] chname String containing the name of the channel.
135 * @param[in] pos The index of the frame in the frame file.
136 * @returns The \c LALTYPECODE value of the data type of the channel.
137 * @retval LAL_CHAR_TYPE_CODE Channel is an array of type char.
138 * @retval LAL_I2_TYPE_CODE Channel is an array of type int16_t.
139 * @retval LAL_I4_TYPE_CODE Channel is an array of type int32_t.
140 * @retval LAL_I8_TYPE_CODE Channel is an array of type int64_t.
141 * @retval LAL_UCHAR_TYPE_CODE Channel is an array of type unsigned char.
142 * @retval LAL_U2_TYPE_CODE Channel is an array of type uint16_t.
143 * @retval LAL_U4_TYPE_CODE Channel is an array of type uint32_t.
144 * @retval LAL_U8_TYPE_CODE Channel is an array of type uint64_t.
145 * @retval LAL_S_TYPE_CODE Channel is an array of type float.
146 * @retval LAL_D_TYPE_CODE Channel is an array of type double.
147 * @retval LAL_C_TYPE_CODE Channel is an array of type float complex.
148 * @retval LAL_Z_TYPE_CODE Channel is an array of type double complex.
149 * @retval -1 Failure.
150 */
151LALTYPECODE XLALFrFileQueryChanType(const LALFrFile * frfile, const char *chname, size_t pos);
152
153/**
154 * @brief Query a frame file for the number of data points in a channel in a frame.
155 * @param[in] frfile Pointer to a ::LALFrFile structure associated with a frame file.
156 * @param[in] chname String containing the name of the channel.
157 * @param[in] pos The index of the frame in the frame file.
158 * @returns The length of the data vector of the channel in the specified frame.
159 * @retval (size_t)(-1) Failure.
160 */
161size_t XLALFrFileQueryChanVectorLength(const LALFrFile * frfile, const char *chname, size_t pos);
162
163/** @} */
164
165/**
166 * @name Routines to Read Channel Metadata
167 * @{
168 */
169
170/**
171 * @brief Acquires metadata about a specified channel in a frame.
172 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
173 * @param chname String containing the name of the channel.
174 * @param pos The index of the frame in the frame file.
175 * @returns A pointer to a newly allocated \c INT2TimeSeries containing the correct
176 * channel name, sample units, epoch, and sampling interval. No data is actually
177 * read by this routine, and the length of the data vector is set to 0.
178 * @retval NULL Failure.
179 */
180INT2TimeSeries *XLALFrFileReadINT2TimeSeriesMetadata(LALFrFile * frfile, const char *chname, size_t pos);
181
182/**
183 * @brief Acquires metadata about a specified channel in a frame.
184 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
185 * @param chname String containing the name of the channel.
186 * @param pos The index of the frame in the frame file.
187 * @returns A pointer to a newly allocated \c INT4TimeSeries containing the correct
188 * channel name, sample units, epoch, and sampling interval. No data is actually
189 * read by this routine, and the length of the data vector is set to 0.
190 * @retval NULL Failure.
191 */
192INT4TimeSeries *XLALFrFileReadINT4TimeSeriesMetadata(LALFrFile * frfile, const char *chname, size_t pos);
193
194/**
195 * @brief Acquires metadata about a specified channel in a frame.
196 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
197 * @param chname String containing the name of the channel.
198 * @param pos The index of the frame in the frame file.
199 * @returns A pointer to a newly allocated \c INT8TimeSeries containing the correct
200 * channel name, sample units, epoch, and sampling interval. No data is actually
201 * read by this routine, and the length of the data vector is set to 0.
202 * @retval NULL Failure.
203 */
204INT8TimeSeries *XLALFrFileReadINT8TimeSeriesMetadata(LALFrFile * frfile, const char *chname, size_t pos);
205
206/**
207 * @brief Acquires metadata about a specified channel in a frame.
208 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
209 * @param chname String containing the name of the channel.
210 * @param pos The index of the frame in the frame file.
211 * @returns A pointer to a newly allocated \c UINT2TimeSeries containing the correct
212 * channel name, sample units, epoch, and sampling interval. No data is actually
213 * read by this routine, and the length of the data vector is set to 0.
214 * @retval NULL Failure.
215 */
216UINT2TimeSeries *XLALFrFileReadUINT2TimeSeriesMetadata(LALFrFile * frfile, const char *chname, size_t pos);
217
218/**
219 * @brief Acquires metadata about a specified channel in a frame.
220 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
221 * @param chname String containing the name of the channel.
222 * @param pos The index of the frame in the frame file.
223 * @returns A pointer to a newly allocated \c UINT4TimeSeries containing the correct
224 * channel name, sample units, epoch, and sampling interval. No data is actually
225 * read by this routine, and the length of the data vector is set to 0.
226 * @retval NULL Failure.
227 */
228UINT4TimeSeries *XLALFrFileReadUINT4TimeSeriesMetadata(LALFrFile * frfile, const char *chname, size_t pos);
229
230/**
231 * @brief Acquires metadata about a specified channel in a frame.
232 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
233 * @param chname String containing the name of the channel.
234 * @param pos The index of the frame in the frame file.
235 * @returns A pointer to a newly allocated \c UINT8TimeSeries containing the correct
236 * channel name, sample units, epoch, and sampling interval. No data is actually
237 * read by this routine, and the length of the data vector is set to 0.
238 * @retval NULL Failure.
239 */
240UINT8TimeSeries *XLALFrFileReadUINT8TimeSeriesMetadata(LALFrFile * frfile, const char *chname, size_t pos);
241
242/**
243 * @brief Acquires metadata about a specified channel in a frame.
244 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
245 * @param chname String containing the name of the channel.
246 * @param pos The index of the frame in the frame file.
247 * @returns A pointer to a newly allocated \c REAL4TimeSeries containing the correct
248 * channel name, sample units, epoch, and sampling interval. No data is actually
249 * read by this routine, and the length of the data vector is set to 0.
250 * @retval NULL Failure.
251 */
252REAL4TimeSeries *XLALFrFileReadREAL4TimeSeriesMetadata(LALFrFile * frfile, const char *chname, size_t pos);
253
254/**
255 * @brief Acquires metadata about a specified channel in a frame.
256 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
257 * @param chname String containing the name of the channel.
258 * @param pos The index of the frame in the frame file.
259 * @returns A pointer to a newly allocated \c REAL8TimeSeries containing the correct
260 * channel name, sample units, epoch, and sampling interval. No data is actually
261 * read by this routine, and the length of the data vector is set to 0.
262 * @retval NULL Failure.
263 */
264REAL8TimeSeries *XLALFrFileReadREAL8TimeSeriesMetadata(LALFrFile * frfile, const char *chname, size_t pos);
265
266/**
267 * @brief Acquires metadata about a specified channel in a frame.
268 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
269 * @param chname String containing the name of the channel.
270 * @param pos The index of the frame in the frame file.
271 * @returns A pointer to a newly allocated \c COMPLEX8TimeSeries containing the correct
272 * channel name, sample units, epoch, and sampling interval. No data is actually
273 * read by this routine, and the length of the data vector is set to 0.
274 * @retval NULL Failure.
275 */
277
278/**
279 * @brief Acquires metadata about a specified channel in a frame.
280 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
281 * @param chname String containing the name of the channel.
282 * @param pos The index of the frame in the frame file.
283 * @returns A pointer to a newly allocated \c COMPLEX16TimeSeries containing the correct
284 * channel name, sample units, epoch, and sampling interval. No data is actually
285 * read by this routine, and the length of the data vector is set to 0.
286 * @retval NULL Failure.
287 */
289
290/**
291 * @brief Acquires metadata about a specified channel in a frame.
292 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
293 * @param chname String containing the name of the channel.
294 * @param pos The index of the frame in the frame file.
295 * @returns A pointer to a newly allocated \c REAL4FrequencySeries containing the correct
296 * channel name, sample units, epoch, and sampling interval. No data is actually
297 * read by this routine, and the length of the data vector is set to 0.
298 * @retval NULL Failure.
299 */
301
302/**
303 * @brief Acquires metadata about a specified channel in a frame.
304 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
305 * @param chname String containing the name of the channel.
306 * @param pos The index of the frame in the frame file.
307 * @returns A pointer to a newly allocated \c REAL8FrequencySeries containing the correct
308 * channel name, sample units, epoch, and sampling interval. No data is actually
309 * read by this routine, and the length of the data vector is set to 0.
310 * @retval NULL Failure.
311 */
313
314/**
315 * @brief Acquires metadata about a specified channel in a frame.
316 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
317 * @param chname String containing the name of the channel.
318 * @param pos The index of the frame in the frame file.
319 * @returns A pointer to a newly allocated \c COMPLEX8FrequencySeries containing the correct
320 * channel name, sample units, epoch, and sampling interval. No data is actually
321 * read by this routine, and the length of the data vector is set to 0.
322 * @retval NULL Failure.
323 */
325
326/**
327 * @brief Acquires metadata about a specified channel in a frame.
328 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
329 * @param chname String containing the name of the channel.
330 * @param pos The index of the frame in the frame file.
331 * @returns A pointer to a newly allocated \c COMPLEX16FrequencySeries containing the correct
332 * channel name, sample units, epoch, and sampling interval. No data is actually
333 * read by this routine, and the length of the data vector is set to 0.
334 * @retval NULL Failure.
335 */
337
338/** @} */
339
340/**
341 * @name Routines to Read Channel Data
342 * @{
343 */
344
345/**
346 * @brief Reads data from a channel in a frame.
347 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
348 * @param chname String containing the name of the channel.
349 * @param pos The index of the frame in the frame file.
350 * @returns A pointer to a newly allocated \c INT2TimeSeries containing the data
351 * from the specified channel in the specified frame.
352 * @retval NULL Failure.
353 */
354INT2TimeSeries *XLALFrFileReadINT2TimeSeries(LALFrFile * frfile, const char *chname, size_t pos);
355
356/**
357 * @brief Reads data from a channel in a frame.
358 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
359 * @param chname String containing the name of the channel.
360 * @param pos The index of the frame in the frame file.
361 * @returns A pointer to a newly allocated \c INT4TimeSeries containing the data
362 * from the specified channel in the specified frame.
363 * @retval NULL Failure.
364 */
365INT4TimeSeries *XLALFrFileReadINT4TimeSeries(LALFrFile * frfile, const char *chname, size_t pos);
366
367/**
368 * @brief Reads data from a channel in a frame.
369 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
370 * @param chname String containing the name of the channel.
371 * @param pos The index of the frame in the frame file.
372 * @returns A pointer to a newly allocated \c INT8TimeSeries containing the data
373 * from the specified channel in the specified frame.
374 * @retval NULL Failure.
375 */
376INT8TimeSeries *XLALFrFileReadINT8TimeSeries(LALFrFile * frfile, const char *chname, size_t pos);
377
378/**
379 * @brief Reads data from a channel in a frame.
380 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
381 * @param chname String containing the name of the channel.
382 * @param pos The index of the frame in the frame file.
383 * @returns A pointer to a newly allocated \c UINT2TimeSeries containing the data
384 * from the specified channel in the specified frame.
385 * @retval NULL Failure.
386 */
387UINT2TimeSeries *XLALFrFileReadUINT2TimeSeries(LALFrFile * frfile, const char *chname, size_t pos);
388
389/**
390 * @brief Reads data from a channel in a frame.
391 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
392 * @param chname String containing the name of the channel.
393 * @param pos The index of the frame in the frame file.
394 * @returns A pointer to a newly allocated \c UINT4TimeSeries containing the data
395 * from the specified channel in the specified frame.
396 * @retval NULL Failure.
397 */
398UINT4TimeSeries *XLALFrFileReadUINT4TimeSeries(LALFrFile * frfile, const char *chname, size_t pos);
399
400/**
401 * @brief Reads data from a channel in a frame.
402 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
403 * @param chname String containing the name of the channel.
404 * @param pos The index of the frame in the frame file.
405 * @returns A pointer to a newly allocated \c UINT8TimeSeries containing the data
406 * from the specified channel in the specified frame.
407 * @retval NULL Failure.
408 */
409UINT8TimeSeries *XLALFrFileReadUINT8TimeSeries(LALFrFile * frfile, const char *chname, size_t pos);
410
411/**
412 * @brief Reads data from a channel in a frame.
413 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
414 * @param chname String containing the name of the channel.
415 * @param pos The index of the frame in the frame file.
416 * @returns A pointer to a newly allocated \c REAL4TimeSeries containing the data
417 * from the specified channel in the specified frame.
418 * @retval NULL Failure.
419 */
420REAL4TimeSeries *XLALFrFileReadREAL4TimeSeries(LALFrFile * frfile, const char *chname, size_t pos);
421
422/**
423 * @brief Reads data from a channel in a frame.
424 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
425 * @param chname String containing the name of the channel.
426 * @param pos The index of the frame in the frame file.
427 * @returns A pointer to a newly allocated \c REAL8TimeSeries containing the data
428 * from the specified channel in the specified frame.
429 * @retval NULL Failure.
430 */
431REAL8TimeSeries *XLALFrFileReadREAL8TimeSeries(LALFrFile * frfile, const char *chname, size_t pos);
432
433/**
434 * @brief Reads data from a channel in a frame.
435 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
436 * @param chname String containing the name of the channel.
437 * @param pos The index of the frame in the frame file.
438 * @returns A pointer to a newly allocated \c COMPLEX8TimeSeries containing the data
439 * from the specified channel in the specified frame.
440 * @retval NULL Failure.
441 */
442COMPLEX8TimeSeries *XLALFrFileReadCOMPLEX8TimeSeries(LALFrFile * frfile, const char *chname, size_t pos);
443
444/**
445 * @brief Reads data from a channel in a frame.
446 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
447 * @param chname String containing the name of the channel.
448 * @param pos The index of the frame in the frame file.
449 * @returns A pointer to a newly allocated \c COMPLEX16TimeSeries containing the data
450 * from the specified channel in the specified frame.
451 * @retval NULL Failure.
452 */
453COMPLEX16TimeSeries *XLALFrFileReadCOMPLEX16TimeSeries(LALFrFile * frfile, const char *chname, size_t pos);
454
455/**
456 * @brief Reads data from a channel in a frame.
457 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
458 * @param chname String containing the name of the channel.
459 * @param pos The index of the frame in the frame file.
460 * @returns A pointer to a newly allocated \c REAL4FrequencySeries containing the data
461 * from the specified channel in the specified frame.
462 * @retval NULL Failure.
463 */
464REAL4FrequencySeries *XLALFrFileReadREAL4FrequencySeries(LALFrFile * frfile, const char *chname, size_t pos);
465
466/**
467 * @brief Reads data from a channel in a frame.
468 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
469 * @param chname String containing the name of the channel.
470 * @param pos The index of the frame in the frame file.
471 * @returns A pointer to a newly allocated \c REAL8FrequencySeries containing the data
472 * from the specified channel in the specified frame.
473 * @retval NULL Failure.
474 */
475REAL8FrequencySeries *XLALFrFileReadREAL8FrequencySeries(LALFrFile * frfile, const char *chname, size_t pos);
476
477/**
478 * @brief Reads data from a channel in a frame.
479 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
480 * @param chname String containing the name of the channel.
481 * @param pos The index of the frame in the frame file.
482 * @returns A pointer to a newly allocated \c COMPLEX8FrequencySeries containing the data
483 * from the specified channel in the specified frame.
484 * @retval NULL Failure.
485 */
487
488/**
489 * @brief Reads data from a channel in a frame.
490 * @param frfile Pointer to a ::LALFrFile structure associated with a frame file.
491 * @param chname String containing the name of the channel.
492 * @param pos The index of the frame in the frame file.
493 * @returns A pointer to a newly allocated \c COMPLEX8FrequencySeries containing the data
494 * from the specified channel in the specified frame.
495 * @retval NULL Failure.
496 */
498
499/** @} */
500
501/** @} */
502
503/**
504 * @defgroup LALFrameIO_h_write Frame Writing Routines
505 * @brief Intermediate-level routines for writing frame files.
506 * @details
507 * These routines provide the intermediate-level routines for writing
508 * LAL data types to frame files.
509 * @{
510 */
511
512/**
513 * @brief Incomplete type for a frame header structure.
514 * @details
515 * This structure contains information about an individual frame. In this
516 * interface, these frames are constructed for writing to frame files.
517 * @sa Section 4.3.2.3 of
518 * <em>Specification of a Common Data Frame Format for Interferometric
519 * Gravitational Wave Detectors (IGWD)</em>
520 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
521 */
523
524/**
525 * @name Basic Frame Writing Routines
526 * @brief These routines can be used to directly output series data to a frame file.
527 * @{
528 */
529
530/**
531 * @brief Creates a frame file holding the data in a \c INT2TimeSeries.
532 * @details
533 * Outputs the data contained in a \c INT2TimeSeries to a frame file
534 * whose name is derived from the series name. The name of the file
535 * conforms to the convention LIGO-T010150. If the name begins with
536 * @c XmYn:channel_name then this routine adds the appropriate detector
537 * structures for prefixes @c Xm and @c Yn to the frame, and the name of
538 * the file will be <tt>XmYn-description-<start>-<duration>.gwf</tt>.
539 * The data is written as a FrProcData structure.
540 * @param[in] series The series to write to the frame file.
541 * @param[in] fnum The frame number of the frame to write.
542 * @retval 0 Success.
543 * @retval -1 Failure.
544 * @sa LIGO-T010150 [https://dcc.ligo.org/LIGO-T010150/public]
545 * @sa Section 4.3.2.11 of
546 * <em>Specification of a Common Data Frame Format for Interferometric
547 * Gravitational Wave Detectors (IGWD)</em>
548 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
549 */
550int XLALFrWriteINT2TimeSeries(const INT2TimeSeries * series, int fnum);
551
552/**
553 * @brief Creates a frame file holding the data in a \c INT4TimeSeries.
554 * @details
555 * Outputs the data contained in a \c INT4TimeSeries to a frame file
556 * whose name is derived from the series name. The name of the file
557 * conforms to the convention LIGO-T010150. If the name begins with
558 * @c XmYn:description then this routine adds the appropriate detector
559 * structures for prefixes @c Xm and @c Yn to the frame, and the name of
560 * the file will be <tt>XmYn-description-<start>-<duration>.gwf</tt>.
561 * The data is written as a FrProcData structure.
562 * @param[in] series The series to write to the frame file.
563 * @param[in] fnum The frame number of the frame to write.
564 * @retval 0 Success.
565 * @retval -1 Failure.
566 * @sa LIGO-T010150 [https://dcc.ligo.org/LIGO-T010150/public]
567 * @sa Section 4.3.2.11 of
568 * <em>Specification of a Common Data Frame Format for Interferometric
569 * Gravitational Wave Detectors (IGWD)</em>
570 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
571 */
572int XLALFrWriteINT4TimeSeries(const INT4TimeSeries * series, int fnum);
573
574/**
575 * @brief Creates a frame file holding the data in a \c INT8TimeSeries.
576 * @details
577 * Outputs the data contained in a \c INT8TimeSeries to a frame file
578 * whose name is derived from the series name. The name of the file
579 * conforms to the convention LIGO-T010150. If the name begins with
580 * @c XmYn:description then this routine adds the appropriate detector
581 * structures for prefixes @c Xm and @c Yn to the frame, and the name of
582 * the file will be <tt>XmYn-description-<start>-<duration>.gwf</tt>.
583 * The data is written as a FrProcData structure.
584 * @param[in] series The series to write to the frame file.
585 * @param[in] fnum The frame number of the frame to write.
586 * @retval 0 Success.
587 * @retval -1 Failure.
588 * @sa LIGO-T010150 [https://dcc.ligo.org/LIGO-T010150/public]
589 * @sa Section 4.3.2.11 of
590 * <em>Specification of a Common Data Frame Format for Interferometric
591 * Gravitational Wave Detectors (IGWD)</em>
592 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
593 */
594int XLALFrWriteINT8TimeSeries(const INT8TimeSeries * series, int fnum);
595
596/**
597 * @brief Creates a frame file holding the data in a \c REAL4TimeSeries.
598 * @details
599 * Outputs the data contained in a \c REAL4TimeSeries to a frame file
600 * whose name is derived from the series name. The name of the file
601 * conforms to the convention LIGO-T010150. If the name begins with
602 * @c XmYn:description then this routine adds the appropriate detector
603 * structures for prefixes @c Xm and @c Yn to the frame, and the name of
604 * the file will be <tt>XmYn-description-<start>-<duration>.gwf</tt>.
605 * The data is written as a FrProcData structure.
606 * @param[in] series The series to write to the frame file.
607 * @param[in] fnum The frame number of the frame to write.
608 * @retval 0 Success.
609 * @retval -1 Failure.
610 * @sa LIGO-T010150 [https://dcc.ligo.org/LIGO-T010150/public]
611 * @sa Section 4.3.2.11 of
612 * <em>Specification of a Common Data Frame Format for Interferometric
613 * Gravitational Wave Detectors (IGWD)</em>
614 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
615 */
616int XLALFrWriteREAL4TimeSeries(const REAL4TimeSeries * series, int fnum);
617
618/**
619 * @brief Creates a frame file holding the data in a \c REAL8TimeSeries.
620 * @details
621 * Outputs the data contained in a \c REAL8TimeSeries to a frame file
622 * whose name is derived from the series name. The name of the file
623 * conforms to the convention LIGO-T010150. If the name begins with
624 * @c XmYn:description then this routine adds the appropriate detector
625 * structures for prefixes @c Xm and @c Yn to the frame, and the name of
626 * the file will be <tt>XmYn-description-<start>-<duration>.gwf</tt>.
627 * The data is written as a FrProcData structure.
628 * @param[in] series The series to write to the frame file.
629 * @param[in] fnum The frame number of the frame to write.
630 * @retval 0 Success.
631 * @retval -1 Failure.
632 * @sa LIGO-T010150 [https://dcc.ligo.org/LIGO-T010150/public]
633 * @sa Section 4.3.2.11 of
634 * <em>Specification of a Common Data Frame Format for Interferometric
635 * Gravitational Wave Detectors (IGWD)</em>
636 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
637 */
638int XLALFrWriteREAL8TimeSeries(const REAL8TimeSeries * series, int fnum);
639
640/**
641 * @brief Creates a frame file holding the data in a \c COMPLEX8TimeSeries.
642 * @details
643 * Outputs the data contained in a \c COMPLEX8TimeSeries to a frame file
644 * whose name is derived from the series name. The name of the file
645 * conforms to the convention LIGO-T010150. If the name begins with
646 * @c XmYn:description then this routine adds the appropriate detector
647 * structures for prefixes @c Xm and @c Yn to the frame, and the name of
648 * the file will be <tt>XmYn-description-<start>-<duration>.gwf</tt>.
649 * The data is written as a FrProcData structure.
650 * @param[in] series The series to write to the frame file.
651 * @param[in] fnum The frame number of the frame to write.
652 * @retval 0 Success.
653 * @retval -1 Failure.
654 * @sa LIGO-T010150 [https://dcc.ligo.org/LIGO-T010150/public]
655 * @sa Section 4.3.2.11 of
656 * <em>Specification of a Common Data Frame Format for Interferometric
657 * Gravitational Wave Detectors (IGWD)</em>
658 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
659 */
661
662/**
663 * @brief Creates a frame file holding the data in a \c COMPLEX16TimeSeries.
664 * @details
665 * Outputs the data contained in a \c COMPLEX16TimeSeries to a frame file
666 * whose name is derived from the series name. The name of the file
667 * conforms to the convention LIGO-T010150. If the name begins with
668 * @c XmYn:description then this routine adds the appropriate detector
669 * structures for prefixes @c Xm and @c Yn to the frame, and the name of
670 * the file will be <tt>XmYn-description-<start>-<duration>.gwf</tt>.
671 * The data is written as a FrProcData structure.
672 * @param[in] series The series to write to the frame file.
673 * @param[in] fnum The frame number of the frame to write.
674 * @retval 0 Success.
675 * @retval -1 Failure.
676 * @sa LIGO-T010150 [https://dcc.ligo.org/LIGO-T010150/public]
677 * @sa Section 4.3.2.11 of
678 * <em>Specification of a Common Data Frame Format for Interferometric
679 * Gravitational Wave Detectors (IGWD)</em>
680 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
681 */
683
684/**
685 * @brief Creates a frame file holding the data in a \c REAL4FrequencySeries.
686 * @details
687 * Outputs the data contained in a \c REAL4FrequencySeries to a frame file
688 * whose name is derived from the series name. The name of the file
689 * conforms to the convention LIGO-T010150. If the name begins with
690 * @c XmYn:description then this routine adds the appropriate detector
691 * structures for prefixes @c Xm and @c Yn to the frame, and the name of
692 * the file will be <tt>XmYn-description-<start>-<duration>.gwf</tt>.
693 * The data is written as a FrProcData structure.
694 *
695 * The subtypes are as follows:
696 *
697 * Value | Subtype
698 * :----: | :-------------------------
699 * 0 | Unknown / User-Defined
700 * 1 | Discrete Fourier Transform
701 * 2 | Amplitude Spectral Density
702 * 3 | Power Spectral Density
703 * 4 | Cross Spectral Density
704 * 5 | Coherence
705 * 6 | Transfer Function
706 *
707 * @param[in] series The series to write to the frame file.
708 * @param[in] fnum The frame number of the frame to write.
709 * @param[in] subtype The FrProcData subtype of this data.
710 * @retval 0 Success.
711 * @retval -1 Failure.
712 * @sa LIGO-T010150 [https://dcc.ligo.org/LIGO-T010150/public]
713 * @sa Section 4.3.2.11 of
714 * <em>Specification of a Common Data Frame Format for Interferometric
715 * Gravitational Wave Detectors (IGWD)</em>
716 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
717 */
718int XLALFrWriteREAL4FrequencySeries(const REAL4FrequencySeries * series, int fnum, int subtype);
719
720/**
721 * @brief Creates a frame file holding the data in a \c REAL8FrequencySeries.
722 * @details
723 * Outputs the data contained in a \c REAL8FrequencySeries to a frame file
724 * whose name is derived from the series name. The name of the file
725 * conforms to the convention LIGO-T010150. If the name begins with
726 * @c XmYn:description then this routine adds the appropriate detector
727 * structures for prefixes @c Xm and @c Yn to the frame, and the name of
728 * the file will be <tt>XmYn-description-<start>-<duration>.gwf</tt>.
729 * The data is written as a FrProcData structure.
730 *
731 * The subtypes are as follows:
732 *
733 * Value | Subtype
734 * :----: | :-------------------------
735 * 0 | Unknown / User-Defined
736 * 1 | Discrete Fourier Transform
737 * 2 | Amplitude Spectral Density
738 * 3 | Power Spectral Density
739 * 4 | Cross Spectral Density
740 * 5 | Coherence
741 * 6 | Transfer Function
742 *
743 * @param[in] series The series to write to the frame file.
744 * @param[in] fnum The frame number of the frame to write.
745 * @param[in] subtype The FrProcData subtype of this data.
746 * @retval 0 Success.
747 * @retval -1 Failure.
748 * @sa LIGO-T010150 [https://dcc.ligo.org/LIGO-T010150/public]
749 * @sa Section 4.3.2.11 of
750 * <em>Specification of a Common Data Frame Format for Interferometric
751 * Gravitational Wave Detectors (IGWD)</em>
752 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
753 */
754int XLALFrWriteREAL8FrequencySeries(const REAL8FrequencySeries * series, int fnum, int subtype);
755
756/**
757 * @brief Creates a frame file holding the data in a \c COMPLEX8FrequencySeries.
758 * @details
759 * Outputs the data contained in a \c COMPLEX8FrequencySeries to a frame file
760 * whose name is derived from the series name. The name of the file
761 * conforms to the convention LIGO-T010150. If the name begins with
762 * @c XmYn:description then this routine adds the appropriate detector
763 * structures for prefixes @c Xm and @c Yn to the frame, and the name of
764 * the file will be <tt>XmYn-description-<start>-<duration>.gwf</tt>.
765 * The data is written as a FrProcData structure.
766 *
767 * The subtypes are as follows:
768 *
769 * Value | Subtype
770 * :----: | :-------------------------
771 * 0 | Unknown / User-Defined
772 * 1 | Discrete Fourier Transform
773 * 2 | Amplitude Spectral Density
774 * 3 | Power Spectral Density
775 * 4 | Cross Spectral Density
776 * 5 | Coherence
777 * 6 | Transfer Function
778 *
779 * @param[in] series The series to write to the frame file.
780 * @param[in] fnum The frame number of the frame to write.
781 * @param[in] subtype The FrProcData subtype of this data.
782 * @retval 0 Success.
783 * @retval -1 Failure.
784 * @sa LIGO-T010150 [https://dcc.ligo.org/LIGO-T010150/public]
785 * @sa Section 4.3.2.11 of
786 * <em>Specification of a Common Data Frame Format for Interferometric
787 * Gravitational Wave Detectors (IGWD)</em>
788 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
789 */
790int XLALFrWriteCOMPLEX8FrequencySeries(const COMPLEX8FrequencySeries * series, int fnum, int subtype);
791
792/**
793 * @brief Creates a frame file holding the data in a \c COMPLEX16FrequencySeries.
794 * @details
795 * Outputs the data contained in a \c COMPLEX16FrequencySeries to a frame file
796 * whose name is derived from the series name. The name of the file
797 * conforms to the convention LIGO-T010150. If the name begins with
798 * @c XmYn:description then this routine adds the appropriate detector
799 * structures for prefixes @c Xm and @c Yn to the frame, and the name of
800 * the file will be <tt>XmYn-description-<start>-<duration>.gwf</tt>.
801 * The data is written as a FrProcData structure.
802 *
803 * The subtypes are as follows:
804 *
805 * Value | Subtype
806 * :----: | :-------------------------
807 * 0 | Unknown / User-Defined
808 * 1 | Discrete Fourier Transform
809 * 2 | Amplitude Spectral Density
810 * 3 | Power Spectral Density
811 * 4 | Cross Spectral Density
812 * 5 | Coherence
813 * 6 | Transfer Function
814 *
815 * @param[in] series The series to write to the frame file.
816 * @param[in] fnum The frame number of the frame to write.
817 * @param[in] subtype The FrProcData subtype of this data.
818 * @retval 0 Success.
819 * @retval -1 Failure.
820 * @sa LIGO-T010150 [https://dcc.ligo.org/LIGO-T010150/public]
821 * @sa Section 4.3.2.11 of
822 * <em>Specification of a Common Data Frame Format for Interferometric
823 * Gravitational Wave Detectors (IGWD)</em>
824 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
825 */
826int XLALFrWriteCOMPLEX16FrequencySeries(const COMPLEX16FrequencySeries * series, int fnum, int subtype);
827
828/** @} */
829
830/**
831 * @name Advanced Frame Writing Routines
832 * @brief Routines allowing for more control of the data written to a frame file.
833 * @details
834 * These routines allow the user to add specific components to a ::LALFrameH structure,
835 * which represents a single frame. Various channels of and other data types can be
836 * added to the ::LALFrameH structure, and then the frame can be written to a frame file.
837 * @{
838 */
839
840/**
841 * @brief Frees a frame structure.
842 * @note This routine is a no-op if passed a NULL pointer.
843 * @param frame Pointer to a ::LALFrameH structure.
844 */
845void XLALFrameFree(LALFrameH * frame);
846
847/**
848 * @brief Creates a new frame structure.
849 * @details
850 * Creates a new frame structure with a specified start time, duration, project
851 * name (i.e., "LIGO"), run serial number, frame serial number within the run,
852 * and detectors associated with the data that will be added to the frame. The
853 * detectors are specified in a flag field composed of the various detector bits,
854 * e.g., <tt>( LAL_LHO_4K_DETECTOR_BIT | LAL_LLO_4K_DETECTOR_BIT )</tt> would
855 * attach detector structures to the frame for the LIGO Hanford and Livingston
856 * observatories. See @ref LALDetectors_h.
857 * @param[in] epoch Pointer to a \c LIGOTimeGPS structure containing the start time of this frame.
858 * @param[in] duration Duration of this frame in seconds.
859 * @param[in] project String describing the project associated with this frame.
860 * @param[in] run Run number associated with this frame.
861 * @param[in] frnum Frame number (within the run) associated with this frame.
862 * @param[in] detectorFlags Flag field specifying the detectors to be associated with the frame.
863 * @returns Pointer to a new frame structure, or NULL if failure.
864 * @sa Section 4.3.2.3 of
865 * <em>Specification of a Common Data Frame Format for Interferometric
866 * Gravitational Wave Detectors (IGWD)</em>
867 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
868 */
869LALFrameH *XLALFrameNew(const LIGOTimeGPS * epoch, double duration, const char *project, int run, int frnum, INT8 detectorFlags);
870
871/**
872 * @brief Adds a history structure to a frame.
873 * @remark
874 * History records can be added to a frame, e.g., to detail how the data was
875 * generated. For example, the program name, version information, etc., can
876 * be added to a frame. The name of the history record should match the name
877 * of the FrProcData channel that it is associated with.
878 * @param frame Pointer to a ::LALFrameH frame structure to which the history will be added.
879 * @param name String containing the name of the history record that will be added.
880 * @param comment The history comment that will be added.
881 * @retval 0 Success.
882 * @retval -1 Failure.
883 * @sa Section 4.3.2.9 of
884 * <em>Specification of a Common Data Frame Format for Interferometric
885 * Gravitational Wave Detectors (IGWD)</em>
886 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
887 */
888int XLALFrameAddFrHistory(LALFrameH * frame, const char *name, const char *comment);
889
890/**
891 * @brief Adds a detector structure to a frame.
892 * @param frame Pointer to a ::LALFrameH frame structure to which the detector will be added.
893 * @param detector Pointer to a \c LALFrDetector structure to add to the frame.
894 * @retval 0 Success.
895 * @retval -1 Failure.
896 * @sa Section 4.3.2.5 of
897 * <em>Specification of a Common Data Frame Format for Interferometric
898 * Gravitational Wave Detectors (IGWD)</em>
899 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
900 */
901int XLALFrameAddFrDetector(LALFrameH * frame, const LALFrDetector * detector);
902
903/**
904 * @brief Adds an \c INT2TimeSeries to a frame as a FrAdcData channel.
905 * @remark FrAdcData channels contains "raw" interferometer data.
906 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
907 * @param series Pointer to the series to add to the frame.
908 * @retval 0 Success.
909 * @retval -1 Failure.
910 * @sa Section 4.3.2.4 of
911 * <em>Specification of a Common Data Frame Format for Interferometric
912 * Gravitational Wave Detectors (IGWD)</em>
913 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
914 */
916
917/**
918 * @brief Adds an \c INT4TimeSeries to a frame as a FrAdcData channel.
919 * @remark FrAdcData channels contains "raw" interferometer data.
920 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
921 * @param series Pointer to the series to add to the frame.
922 * @retval 0 Success.
923 * @retval -1 Failure.
924 * @sa Section 4.3.2.4 of
925 * <em>Specification of a Common Data Frame Format for Interferometric
926 * Gravitational Wave Detectors (IGWD)</em>
927 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
928 */
930
931/**
932 * @brief Adds an \c REAL4TimeSeries to a frame as a FrAdcData channel.
933 * @remark FrAdcData channels contains "raw" interferometer data.
934 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
935 * @param series Pointer to the series to add to the frame.
936 * @retval 0 Success.
937 * @retval -1 Failure.
938 * @sa Section 4.3.2.4 of
939 * <em>Specification of a Common Data Frame Format for Interferometric
940 * Gravitational Wave Detectors (IGWD)</em>
941 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
942 */
944
945/**
946 * @brief Adds an \c REAL8TimeSeries to a frame as a FrAdcData channel.
947 * @remark FrAdcData channels contains "raw" interferometer data.
948 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
949 * @param series Pointer to the series to add to the frame.
950 * @retval 0 Success.
951 * @retval -1 Failure.
952 * @sa Section 4.3.2.4 of
953 * <em>Specification of a Common Data Frame Format for Interferometric
954 * Gravitational Wave Detectors (IGWD)</em>
955 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
956 */
958
959/**
960 * @brief Adds an \c INT2TimeSeries to a frame as a FrSimData channel.
961 * @remark FrSimData channels contains simulated interferometer data.
962 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
963 * @param series Pointer to the series to add to the frame.
964 * @retval 0 Success.
965 * @retval -1 Failure.
966 * @sa Section 4.3.2.14 of
967 * <em>Specification of a Common Data Frame Format for Interferometric
968 * Gravitational Wave Detectors (IGWD)</em>
969 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
970 */
972
973/**
974 * @brief Adds an \c INT4TimeSeries to a frame as a FrSimData channel.
975 * @remark FrSimData channels contains simulated interferometer data.
976 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
977 * @param series Pointer to the series to add to the frame.
978 * @retval 0 Success.
979 * @retval -1 Failure.
980 * @sa Section 4.3.2.14 of
981 * <em>Specification of a Common Data Frame Format for Interferometric
982 * Gravitational Wave Detectors (IGWD)</em>
983 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
984 */
986
987/**
988 * @brief Adds an \c REAL4TimeSeries to a frame as a FrSimData channel.
989 * @remark FrSimData channels contains simulated interferometer data.
990 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
991 * @param series Pointer to the series to add to the frame.
992 * @retval 0 Success.
993 * @retval -1 Failure.
994 * @sa Section 4.3.2.14 of
995 * <em>Specification of a Common Data Frame Format for Interferometric
996 * Gravitational Wave Detectors (IGWD)</em>
997 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
998 */
1000
1001/**
1002 * @brief Adds an \c REAL8TimeSeries to a frame as a FrSimData channel.
1003 * @remark FrSimData channels contains simulated interferometer data.
1004 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1005 * @param series Pointer to the series to add to the frame.
1006 * @retval 0 Success.
1007 * @retval -1 Failure.
1008 * @sa Section 4.3.2.14 of
1009 * <em>Specification of a Common Data Frame Format for Interferometric
1010 * Gravitational Wave Detectors (IGWD)</em>
1011 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
1012 */
1014
1015/**
1016 * @brief Adds an \c INT2TimeSeries to a frame as a FrProcData channel.
1017 * @remark FrProcData channels contains post-processed data.
1018 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1019 * @param series Pointer to the series to add to the frame.
1020 * @retval 0 Success.
1021 * @retval -1 Failure.
1022 * @sa Section 4.3.2.11 of
1023 * <em>Specification of a Common Data Frame Format for Interferometric
1024 * Gravitational Wave Detectors (IGWD)</em>
1025 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
1026 */
1028
1029/**
1030 * @brief Adds an \c INT4TimeSeries to a frame as a FrProcData channel.
1031 * @remark FrProcData channels contains post-processed data.
1032 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1033 * @param series Pointer to the series to add to the frame.
1034 * @retval 0 Success.
1035 * @retval -1 Failure.
1036 * @sa Section 4.3.2.11 of
1037 * <em>Specification of a Common Data Frame Format for Interferometric
1038 * Gravitational Wave Detectors (IGWD)</em>
1039 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
1040 */
1042
1043/**
1044 * @brief Adds an \c INT8TimeSeries to a frame as a FrProcData channel.
1045 * @remark FrProcData channels contains post-processed data.
1046 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1047 * @param series Pointer to the series to add to the frame.
1048 * @retval 0 Success.
1049 * @retval -1 Failure.
1050 * @sa Section 4.3.2.11 of
1051 * <em>Specification of a Common Data Frame Format for Interferometric
1052 * Gravitational Wave Detectors (IGWD)</em>
1053 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
1054 */
1056
1057/**
1058 * @brief Adds an \c UINT2TimeSeries to a frame as a FrProcData channel.
1059 * @remark FrProcData channels contains post-processed data.
1060 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1061 * @param series Pointer to the series to add to the frame.
1062 * @retval 0 Success.
1063 * @retval -1 Failure.
1064 * @sa Section 4.3.2.11 of
1065 * <em>Specification of a Common Data Frame Format for Interferometric
1066 * Gravitational Wave Detectors (IGWD)</em>
1067 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
1068 */
1070
1071/**
1072 * @brief Adds an \c UINT4TimeSeries to a frame as a FrProcData channel.
1073 * @remark FrProcData channels contains post-processed data.
1074 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1075 * @param series Pointer to the series to add to the frame.
1076 * @retval 0 Success.
1077 * @retval -1 Failure.
1078 * @sa Section 4.3.2.11 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-v1/public].
1082 */
1084
1085/**
1086 * @brief Adds an \c UINT8TimeSeries to a frame as a FrProcData channel.
1087 * @remark FrProcData channels contains post-processed data.
1088 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1089 * @param series Pointer to the series to add to the frame.
1090 * @retval 0 Success.
1091 * @retval -1 Failure.
1092 * @sa Section 4.3.2.11 of
1093 * <em>Specification of a Common Data Frame Format for Interferometric
1094 * Gravitational Wave Detectors (IGWD)</em>
1095 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
1096 */
1098
1099/**
1100 * @brief Adds an \c REAL4TimeSeries to a frame as a FrProcData channel.
1101 * @remark FrProcData channels contains post-processed data.
1102 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1103 * @param series Pointer to the series to add to the frame.
1104 * @retval 0 Success.
1105 * @retval -1 Failure.
1106 * @sa Section 4.3.2.11 of
1107 * <em>Specification of a Common Data Frame Format for Interferometric
1108 * Gravitational Wave Detectors (IGWD)</em>
1109 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
1110 */
1112
1113/**
1114 * @brief Adds an \c REAL8TimeSeries to a frame as a FrProcData channel.
1115 * @remark FrProcData channels contains post-processed data.
1116 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1117 * @param series Pointer to the series to add to the frame.
1118 * @retval 0 Success.
1119 * @retval -1 Failure.
1120 * @sa Section 4.3.2.11 of
1121 * <em>Specification of a Common Data Frame Format for Interferometric
1122 * Gravitational Wave Detectors (IGWD)</em>
1123 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
1124 */
1126
1127/**
1128 * @brief Adds an \c COMPLEX8TimeSeries to a frame as a FrProcData channel.
1129 * @remark FrProcData channels contains post-processed data.
1130 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1131 * @param series Pointer to the series to add to the frame.
1132 * @retval 0 Success.
1133 * @retval -1 Failure.
1134 * @sa Section 4.3.2.11 of
1135 * <em>Specification of a Common Data Frame Format for Interferometric
1136 * Gravitational Wave Detectors (IGWD)</em>
1137 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
1138 */
1140
1141/**
1142 * @brief Adds an \c COMPLEX16TimeSeries to a frame as a FrProcData channel.
1143 * @remark FrProcData channels contains post-processed data.
1144 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1145 * @param series Pointer to the series to add to the frame.
1146 * @retval 0 Success.
1147 * @retval -1 Failure.
1148 * @sa Section 4.3.2.11 of
1149 * <em>Specification of a Common Data Frame Format for Interferometric
1150 * Gravitational Wave Detectors (IGWD)</em>
1151 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
1152 */
1154
1155/**
1156 * @brief Adds an \c REAL4FrequencySeries to a frame as a FrProcData channel.
1157 * @remark FrProcData channels contains post-processed data.
1158 *
1159 * The subtypes are as follows:
1160 *
1161 * Value | Subtype
1162 * :----: | :-------------------------
1163 * 0 | Unknown / User-Defined
1164 * 1 | Discrete Fourier Transform
1165 * 2 | Amplitude Spectral Density
1166 * 3 | Power Spectral Density
1167 * 4 | Cross Spectral Density
1168 * 5 | Coherence
1169 * 6 | Transfer Function
1170 *
1171 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1172 * @param series Pointer to the series to add to the frame.
1173 * @param subtype The FrProcData subtype of this frequency series.
1174 * @retval 0 Success.
1175 * @retval -1 Failure.
1176 * @sa Section 4.3.2.11 of
1177 * <em>Specification of a Common Data Frame Format for Interferometric
1178 * Gravitational Wave Detectors (IGWD)</em>
1179 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
1180 */
1182
1183/**
1184 * @brief Adds an \c REAL8FrequencySeries to a frame as a FrProcData channel.
1185 * @remark FrProcData channels contains post-processed data.
1186 *
1187 * The subtypes are as follows:
1188 *
1189 * Value | Subtype
1190 * :----: | :-------------------------
1191 * 0 | Unknown / User-Defined
1192 * 1 | Discrete Fourier Transform
1193 * 2 | Amplitude Spectral Density
1194 * 3 | Power Spectral Density
1195 * 4 | Cross Spectral Density
1196 * 5 | Coherence
1197 * 6 | Transfer Function
1198 *
1199 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1200 * @param series Pointer to the series to add to the frame.
1201 * @param subtype The FrProcData subtype of this frequency series.
1202 * @retval 0 Success.
1203 * @retval -1 Failure.
1204 * @sa Section 4.3.2.11 of
1205 * <em>Specification of a Common Data Frame Format for Interferometric
1206 * Gravitational Wave Detectors (IGWD)</em>
1207 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
1208 */
1210
1211/**
1212 * @brief Adds an \c COMPLEX8FrequencySeries to a frame as a FrProcData channel.
1213 * @remark FrProcData channels contains post-processed data.
1214 *
1215 * The subtypes are as follows:
1216 *
1217 * Value | Subtype
1218 * :----: | :-------------------------
1219 * 0 | Unknown / User-Defined
1220 * 1 | Discrete Fourier Transform
1221 * 2 | Amplitude Spectral Density
1222 * 3 | Power Spectral Density
1223 * 4 | Cross Spectral Density
1224 * 5 | Coherence
1225 * 6 | Transfer Function
1226 *
1227 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1228 * @param series Pointer to the series to add to the frame.
1229 * @param subtype The FrProcData subtype of this frequency series.
1230 * @retval 0 Success.
1231 * @retval -1 Failure.
1232 * @sa Section 4.3.2.11 of
1233 * <em>Specification of a Common Data Frame Format for Interferometric
1234 * Gravitational Wave Detectors (IGWD)</em>
1235 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
1236 */
1238
1239/**
1240 * @brief Adds an \c COMPLEX16FrequencySeries to a frame as a FrProcData channel.
1241 * @remark FrProcData channels contains post-processed data.
1242 *
1243 * The subtypes are as follows:
1244 *
1245 * Value | Subtype
1246 * :----: | :-------------------------
1247 * 0 | Unknown / User-Defined
1248 * 1 | Discrete Fourier Transform
1249 * 2 | Amplitude Spectral Density
1250 * 3 | Power Spectral Density
1251 * 4 | Cross Spectral Density
1252 * 5 | Coherence
1253 * 6 | Transfer Function
1254 *
1255 * @param frame Pointer to a ::LALFrameH frame structure to which the series will be added.
1256 * @param series Pointer to the series to add to the frame.
1257 * @param subtype The FrProcData subtype of this frequency series.
1258 * @retval 0 Success.
1259 * @retval -1 Failure.
1260 * @sa Section 4.3.2.11 of
1261 * <em>Specification of a Common Data Frame Format for Interferometric
1262 * Gravitational Wave Detectors (IGWD)</em>
1263 * LIGO-T970130 [https://dcc.ligo.org/LIGO-T970130-v1/public].
1264 */
1266
1267
1268/**
1269 * @brief Write a ::LALFrameH frame structure to a frame file.
1270 * @param frame Pointer to the ::LALFrameH frame structure to be written.
1271 * @param fname String with the path name of the frame file to create.
1272 * @retval 0 Success.
1273 * @retval -1 Failure.
1274 */
1275int XLALFrameWrite(LALFrameH * frame, const char *fname);
1276
1277/** @} */
1278
1279/** @} */
1280
1281/** @} */
1282
1283#if 0
1284{
1285#endif
1286#ifdef __cplusplus
1287}
1288#endif
1289
1290#endif
LALTYPECODE
int64_t INT8
COMPLEX16TimeSeries * XLALFrFileReadCOMPLEX16TimeSeries(LALFrFile *frfile, const char *chname, size_t pos)
Reads data from a channel in a frame.
INT8TimeSeries * XLALFrFileReadINT8TimeSeries(LALFrFile *frfile, const char *chname, size_t pos)
Reads data from a channel in a frame.
COMPLEX16TimeSeries * XLALFrFileReadCOMPLEX16TimeSeriesMetadata(LALFrFile *frfile, const char *chname, size_t pos)
Acquires metadata about a specified channel in a frame.
REAL8TimeSeries * XLALFrFileReadREAL8TimeSeries(LALFrFile *frfile, const char *chname, size_t pos)
Reads data from a channel in a frame.
COMPLEX8TimeSeries * XLALFrFileReadCOMPLEX8TimeSeriesMetadata(LALFrFile *frfile, const char *chname, size_t pos)
Acquires metadata about a specified channel in a frame.
REAL4FrequencySeries * XLALFrFileReadREAL4FrequencySeries(LALFrFile *frfile, const char *chname, size_t pos)
Reads data from a channel in a frame.
REAL8TimeSeries * XLALFrFileReadREAL8TimeSeriesMetadata(LALFrFile *frfile, const char *chname, size_t pos)
Acquires metadata about a specified channel in a frame.
COMPLEX16FrequencySeries * XLALFrFileReadCOMPLEX16FrequencySeries(LALFrFile *frfile, const char *chname, size_t pos)
Reads data from a channel in a frame.
INT4TimeSeries * XLALFrFileReadINT4TimeSeriesMetadata(LALFrFile *frfile, const char *chname, size_t pos)
Acquires metadata about a specified channel in a frame.
COMPLEX8FrequencySeries * XLALFrFileReadCOMPLEX8FrequencySeriesMetadata(LALFrFile *frfile, const char *chname, size_t pos)
Acquires metadata about a specified channel in a frame.
UINT8TimeSeries * XLALFrFileReadUINT8TimeSeriesMetadata(LALFrFile *frfile, const char *chname, size_t pos)
Acquires metadata about a specified channel in a frame.
INT2TimeSeries * XLALFrFileReadINT2TimeSeries(LALFrFile *frfile, const char *chname, size_t pos)
Reads data from a channel in a frame.
double XLALFrFileQueryDt(const LALFrFile *frfile, size_t pos)
Query a frame file for the duration of a particular frame.
Definition: LALFrameIO.c:143
INT2TimeSeries * XLALFrFileReadINT2TimeSeriesMetadata(LALFrFile *frfile, const char *chname, size_t pos)
Acquires metadata about a specified channel in a frame.
UINT8TimeSeries * XLALFrFileReadUINT8TimeSeries(LALFrFile *frfile, const char *chname, size_t pos)
Reads data from a channel in a frame.
REAL4FrequencySeries * XLALFrFileReadREAL4FrequencySeriesMetadata(LALFrFile *frfile, const char *chname, size_t pos)
Acquires metadata about a specified channel in a frame.
INT4TimeSeries * XLALFrFileReadINT4TimeSeries(LALFrFile *frfile, const char *chname, size_t pos)
Reads data from a channel in a frame.
struct tagLALFrFile LALFrFile
Incomplete type for a frame file structure.
Definition: LALFrameIO.h:64
LALTYPECODE XLALFrFileQueryChanType(const LALFrFile *frfile, const char *chname, size_t pos)
Query a frame file for the data type of a channel in a frame.
Definition: LALFrameIO.c:148
int XLALFrFileCksumValid(LALFrFile *frfile)
Use checksum to determine if a frame file is valid.
Definition: LALFrameIO.c:205
size_t XLALFrFileQueryNFrame(const LALFrFile *frfile)
Query a frame file for the number of frames contained in the file.
Definition: LALFrameIO.c:130
COMPLEX8FrequencySeries * XLALFrFileReadCOMPLEX8FrequencySeries(LALFrFile *frfile, const char *chname, size_t pos)
Reads data from a channel in a frame.
COMPLEX16FrequencySeries * XLALFrFileReadCOMPLEX16FrequencySeriesMetadata(LALFrFile *frfile, const char *chname, size_t pos)
Acquires metadata about a specified channel in a frame.
LIGOTimeGPS * XLALFrFileQueryGTime(LIGOTimeGPS *start, const LALFrFile *frfile, size_t pos)
Query a frame file for the start time of a particular frame.
Definition: LALFrameIO.c:135
UINT4TimeSeries * XLALFrFileReadUINT4TimeSeries(LALFrFile *frfile, const char *chname, size_t pos)
Reads data from a channel in a frame.
REAL8FrequencySeries * XLALFrFileReadREAL8FrequencySeriesMetadata(LALFrFile *frfile, const char *chname, size_t pos)
Acquires metadata about a specified channel in a frame.
REAL8FrequencySeries * XLALFrFileReadREAL8FrequencySeries(LALFrFile *frfile, const char *chname, size_t pos)
Reads data from a channel in a frame.
UINT2TimeSeries * XLALFrFileReadUINT2TimeSeriesMetadata(LALFrFile *frfile, const char *chname, size_t pos)
Acquires metadata about a specified channel in a frame.
UINT4TimeSeries * XLALFrFileReadUINT4TimeSeriesMetadata(LALFrFile *frfile, const char *chname, size_t pos)
Acquires metadata about a specified channel in a frame.
LALFrFile * XLALFrFileOpenURL(const char *url)
Open frame file for reading and return a LALFrFile structure.
Definition: LALFrameIO.c:70
int XLALFrFileClose(LALFrFile *frfile)
Close a frame file described by a LALFrFile structure.
Definition: LALFrameIO.c:54
size_t XLALFrFileQueryChanVectorLength(const LALFrFile *frfile, const char *chname, size_t pos)
Query a frame file for the number of data points in a channel in a frame.
Definition: LALFrameIO.c:192
UINT2TimeSeries * XLALFrFileReadUINT2TimeSeries(LALFrFile *frfile, const char *chname, size_t pos)
Reads data from a channel in a frame.
INT8TimeSeries * XLALFrFileReadINT8TimeSeriesMetadata(LALFrFile *frfile, const char *chname, size_t pos)
Acquires metadata about a specified channel in a frame.
REAL4TimeSeries * XLALFrFileReadREAL4TimeSeriesMetadata(LALFrFile *frfile, const char *chname, size_t pos)
Acquires metadata about a specified channel in a frame.
COMPLEX8TimeSeries * XLALFrFileReadCOMPLEX8TimeSeries(LALFrFile *frfile, const char *chname, size_t pos)
Reads data from a channel in a frame.
REAL4TimeSeries * XLALFrFileReadREAL4TimeSeries(LALFrFile *frfile, const char *chname, size_t pos)
Reads data from a channel in a frame.
int XLALFrameAddREAL8TimeSeriesSimData(LALFrameH *frame, const REAL8TimeSeries *series)
Adds an REAL8TimeSeries to a frame as a FrSimData channel.
int XLALFrameAddFrDetector(LALFrameH *frame, const LALFrDetector *detector)
Adds a detector structure to a frame.
Definition: LALFrameIO.c:384
int XLALFrameAddREAL8TimeSeriesAdcData(LALFrameH *frame, const REAL8TimeSeries *series)
Adds an REAL8TimeSeries to a frame as a FrAdcData channel.
int XLALFrWriteCOMPLEX16FrequencySeries(const COMPLEX16FrequencySeries *series, int fnum, int subtype)
Creates a frame file holding the data in a COMPLEX16FrequencySeries.
int XLALFrWriteINT4TimeSeries(const INT4TimeSeries *series, int fnum)
Creates a frame file holding the data in a INT4TimeSeries.
int XLALFrameAddUINT4TimeSeriesProcData(LALFrameH *frame, const UINT4TimeSeries *series)
Adds an UINT4TimeSeries to a frame as a FrProcData channel.
int XLALFrameAddCOMPLEX8TimeSeriesProcData(LALFrameH *frame, const COMPLEX8TimeSeries *series)
Adds an COMPLEX8TimeSeries to a frame as a FrProcData channel.
int XLALFrameAddINT4TimeSeriesAdcData(LALFrameH *frame, const INT4TimeSeries *series)
Adds an INT4TimeSeries to a frame as a FrAdcData channel.
LALFrameUFrameH LALFrameH
Incomplete type for a frame header structure.
Definition: LALFrameIO.h:522
int XLALFrameAddUINT8TimeSeriesProcData(LALFrameH *frame, const UINT8TimeSeries *series)
Adds an UINT8TimeSeries to a frame as a FrProcData channel.
int XLALFrWriteCOMPLEX8TimeSeries(const COMPLEX8TimeSeries *series, int fnum)
Creates a frame file holding the data in a COMPLEX8TimeSeries.
int XLALFrameAddFrHistory(LALFrameH *frame, const char *name, const char *comment)
Adds a history structure to a frame.
Definition: LALFrameIO.c:311
int XLALFrWriteREAL4TimeSeries(const REAL4TimeSeries *series, int fnum)
Creates a frame file holding the data in a REAL4TimeSeries.
int XLALFrameAddINT4TimeSeriesSimData(LALFrameH *frame, const INT4TimeSeries *series)
Adds an INT4TimeSeries to a frame as a FrSimData channel.
int XLALFrameAddREAL4FrequencySeriesProcData(LALFrameH *frame, const REAL4FrequencySeries *series, int subtype)
Adds an REAL4FrequencySeries to a frame as a FrProcData channel.
int XLALFrameAddCOMPLEX16FrequencySeriesProcData(LALFrameH *frame, const COMPLEX16FrequencySeries *series, int subtype)
Adds an COMPLEX16FrequencySeries to a frame as a FrProcData channel.
int XLALFrWriteINT8TimeSeries(const INT8TimeSeries *series, int fnum)
Creates a frame file holding the data in a INT8TimeSeries.
int XLALFrameWrite(LALFrameH *frame, const char *fname)
Write a LALFrameH frame structure to a frame file.
Definition: LALFrameIO.c:603
int XLALFrWriteINT2TimeSeries(const INT2TimeSeries *series, int fnum)
Creates a frame file holding the data in a INT2TimeSeries.
int XLALFrameAddINT2TimeSeriesSimData(LALFrameH *frame, const INT2TimeSeries *series)
Adds an INT2TimeSeries to a frame as a FrSimData channel.
int XLALFrameAddREAL8FrequencySeriesProcData(LALFrameH *frame, const REAL8FrequencySeries *series, int subtype)
Adds an REAL8FrequencySeries to a frame as a FrProcData channel.
int XLALFrameAddINT4TimeSeriesProcData(LALFrameH *frame, const INT4TimeSeries *series)
Adds an INT4TimeSeries to a frame as a FrProcData channel.
int XLALFrameAddREAL4TimeSeriesAdcData(LALFrameH *frame, const REAL4TimeSeries *series)
Adds an REAL4TimeSeries to a frame as a FrAdcData channel.
int XLALFrWriteREAL8FrequencySeries(const REAL8FrequencySeries *series, int fnum, int subtype)
Creates a frame file holding the data in a REAL8FrequencySeries.
int XLALFrameAddREAL4TimeSeriesSimData(LALFrameH *frame, const REAL4TimeSeries *series)
Adds an REAL4TimeSeries to a frame as a FrSimData channel.
int XLALFrameAddINT8TimeSeriesProcData(LALFrameH *frame, const INT8TimeSeries *series)
Adds an INT8TimeSeries to a frame as a FrProcData channel.
int XLALFrWriteCOMPLEX16TimeSeries(const COMPLEX16TimeSeries *series, int fnum)
Creates a frame file holding the data in a COMPLEX16TimeSeries.
LALFrameH * XLALFrameNew(const LIGOTimeGPS *epoch, double duration, const char *project, int run, int frnum, INT8 detectorFlags)
Creates a new frame structure.
Definition: LALFrameIO.c:411
int XLALFrameAddCOMPLEX16TimeSeriesProcData(LALFrameH *frame, const COMPLEX16TimeSeries *series)
Adds an COMPLEX16TimeSeries to a frame as a FrProcData channel.
int XLALFrameAddCOMPLEX8FrequencySeriesProcData(LALFrameH *frame, const COMPLEX8FrequencySeries *series, int subtype)
Adds an COMPLEX8FrequencySeries to a frame as a FrProcData channel.
int XLALFrameAddREAL4TimeSeriesProcData(LALFrameH *frame, const REAL4TimeSeries *series)
Adds an REAL4TimeSeries to a frame as a FrProcData channel.
int XLALFrWriteCOMPLEX8FrequencySeries(const COMPLEX8FrequencySeries *series, int fnum, int subtype)
Creates a frame file holding the data in a COMPLEX8FrequencySeries.
int XLALFrameAddINT2TimeSeriesProcData(LALFrameH *frame, const INT2TimeSeries *series)
Adds an INT2TimeSeries to a frame as a FrProcData channel.
int XLALFrameAddINT2TimeSeriesAdcData(LALFrameH *frame, const INT2TimeSeries *series)
Adds an INT2TimeSeries to a frame as a FrAdcData channel.
int XLALFrameAddUINT2TimeSeriesProcData(LALFrameH *frame, const UINT2TimeSeries *series)
Adds an UINT2TimeSeries to a frame as a FrProcData channel.
int XLALFrWriteREAL4FrequencySeries(const REAL4FrequencySeries *series, int fnum, int subtype)
Creates a frame file holding the data in a REAL4FrequencySeries.
int XLALFrWriteREAL8TimeSeries(const REAL8TimeSeries *series, int fnum)
Creates a frame file holding the data in a REAL8TimeSeries.
void XLALFrameFree(LALFrameH *frame)
Frees a frame structure.
Definition: LALFrameIO.c:405
int XLALFrameAddREAL8TimeSeriesProcData(LALFrameH *frame, const REAL8TimeSeries *series)
Adds an REAL8TimeSeries to a frame as a FrProcData channel.
struct tagLALFrameUFrameH LALFrameUFrameH
Incomplete type for a frame header FrameH structure.
Definition: LALFrameU.h:64