#include <stdarg.h>
#include <stdio.h>
#include <lal/Date.h>
#include <lal/LALStdio.h>
#include <lal/FileIO.h>
#include <lal/LIGOLwXML.h>
#include <lal/LALDatatypes.h>
#include <lal/Units.h>
#include <lal/XLALError.h>
#include <lal/LIGOLwXMLArray.h>
Include dependency graph for LIGOLwXMLArray.c:

Go to the source code of this file.
Defines | |
| #define | FILE LALFILE |
| #define | fprintf XLALFilePrintf |
Functions | |
| NRCSID (LIGOLWXMLARRAYC,"$Id: LIGOLwXMLArray.c,v 1.3 2008/01/27 00:00:41 kipp Exp $") | |
| int | XLALWriteLIGOLwXMLArrayREAL4TimeSeries (LIGOLwXMLStream *xml, const char *comment, const REAL4TimeSeries *series) |
Write a REAL4TimeSeries to a LIGOLwXMLStream. | |
| int | XLALWriteLIGOLwXMLArrayREAL8TimeSeries (LIGOLwXMLStream *xml, const char *comment, const REAL8TimeSeries *series) |
Write a REAL8TimeSeries to a LIGOLwXMLStream. | |
| int | XLALWriteLIGOLwXMLArrayREAL4FrequencySeries (LIGOLwXMLStream *xml, const char *comment, const REAL4FrequencySeries *series) |
Write a REAL4FrequencySeries to a LIGOLwXMLStream. | |
| int | XLALWriteLIGOLwXMLArrayREAL8FrequencySeries (LIGOLwXMLStream *xml, const char *comment, const REAL8FrequencySeries *series) |
Write a REAL8FrequencySeries to a LIGOLwXMLStream. | |
| int | XLALWriteLIGOLwXMLArrayCOMPLEX8FrequencySeries (LIGOLwXMLStream *xml, const char *comment, const COMPLEX8FrequencySeries *series) |
Write a COMPLEX8FrequencySeries to a LIGOLwXMLStream. | |
| int | XLALWriteLIGOLwXMLArrayCOMPLEX16FrequencySeries (LIGOLwXMLStream *xml, const char *comment, const COMPLEX16FrequencySeries *series) |
Write a COMPLEX16FrequencySeries to a LIGOLwXMLStream. | |
The following example code constructs a nonsense frequency series and writes it to a LIGO Light Weight XML file.
include <math.h> include <stdlib.h> include <lal/FrequencySeries.h> include <lal/LIGOLwXML.h> include <lal/LIGOLwXMLArray.h> include <lal/Units.h>
int main() { LALStatus stat; LIGOLwXMLStream xml; REAL8FrequencySeries *series; LIGOTimeGPS epoch = {772847291, 500000000}; int i;
memset(&stat, 0, sizeof(stat));
series = XLALCreateREAL8FrequencySeries("PSD", &epoch, 0.0, 1.0 / 16384, &lalVoltUnit, 16384); series->data->data[0] = 1.0; for(i = 1; i < series->data->length; i++) series->data->data[i] = sin(3.14 * i / 1000) / (3.14 * i / 1000);
LALOpenLIGOLwXMLFile(&stat, &xml, "fseries.xml"); XLALWriteLIGOLwXMLArrayREAL8FrequencySeries(&xml, "a sin(x)/x function", series); LALCloseLIGOLwXMLFile(&stat, &xml);
return 0; }
Definition in file LIGOLwXMLArray.c.
| #define FILE LALFILE |
Definition at line 85 of file LIGOLwXMLArray.c.
| #define fprintf XLALFilePrintf |
Definition at line 86 of file LIGOLwXMLArray.c.
| NRCSID | ( | LIGOLWXMLARRAYC | , | |
| "$Id: LIGOLwXMLArray. | c, | |||
| v 1.3 2008/01/27 00:00:41 kipp Exp $" | ||||
| ) |
| int XLALWriteLIGOLwXMLArrayREAL4TimeSeries | ( | LIGOLwXMLStream * | xml, | |
| const char * | comment, | |||
| const REAL4TimeSeries * | series | |||
| ) |
Write a REAL4TimeSeries to a LIGOLwXMLStream.
Returns 0 on success, less than 0 on failure. If comment is not NULL, it will be added to the output as the string in a Comment element.
Definition at line 332 of file LIGOLwXMLArray.c.
| int XLALWriteLIGOLwXMLArrayREAL8TimeSeries | ( | LIGOLwXMLStream * | xml, | |
| const char * | comment, | |||
| const REAL8TimeSeries * | series | |||
| ) |
Write a REAL8TimeSeries to a LIGOLwXMLStream.
Returns 0 on success, less than 0 on failure. If comment is not NULL, it will be added to the output as the string in a Comment element.
Definition at line 352 of file LIGOLwXMLArray.c.
| int XLALWriteLIGOLwXMLArrayREAL4FrequencySeries | ( | LIGOLwXMLStream * | xml, | |
| const char * | comment, | |||
| const REAL4FrequencySeries * | series | |||
| ) |
Write a REAL4FrequencySeries to a LIGOLwXMLStream.
Returns 0 on success, less than 0 on failure. If comment is not NULL, it will be added to the output as the string in a Comment element.
Definition at line 372 of file LIGOLwXMLArray.c.
| int XLALWriteLIGOLwXMLArrayREAL8FrequencySeries | ( | LIGOLwXMLStream * | xml, | |
| const char * | comment, | |||
| const REAL8FrequencySeries * | series | |||
| ) |
Write a REAL8FrequencySeries to a LIGOLwXMLStream.
Returns 0 on success, less than 0 on failure. If comment is not NULL, it will be added to the output as the string in a Comment element.
Definition at line 392 of file LIGOLwXMLArray.c.
| int XLALWriteLIGOLwXMLArrayCOMPLEX8FrequencySeries | ( | LIGOLwXMLStream * | xml, | |
| const char * | comment, | |||
| const COMPLEX8FrequencySeries * | series | |||
| ) |
Write a COMPLEX8FrequencySeries to a LIGOLwXMLStream.
Returns 0 on success, less than 0 on failure. If comment is not NULL, it will be added to the output as the string in a Comment element.
Definition at line 412 of file LIGOLwXMLArray.c.
| int XLALWriteLIGOLwXMLArrayCOMPLEX16FrequencySeries | ( | LIGOLwXMLStream * | xml, | |
| const char * | comment, | |||
| const COMPLEX16FrequencySeries * | series | |||
| ) |
Write a COMPLEX16FrequencySeries to a LIGOLwXMLStream.
Returns 0 on success, less than 0 on failure. If comment is not NULL, it will be added to the output as the string in a Comment element.
Definition at line 432 of file LIGOLwXMLArray.c.
1.5.2