I/O library for LIGO Light Weight XML Array document fragments. More...
Prototypes | |
static int | WriteLIGOLwXMLArrayMeta (LALFILE *stream, const char *indent, const LIGOTimeGPS *epoch, REAL8 f0) |
static int | WriteLIGOLwXMLArrayHeader (LALFILE *stream, const char *indent, const char *name, const char *type, const LALUnit *units, int length, double delta, int is_tseries, int is_complex) |
static int | WriteLIGOLwXMLArrayFooter (LALFILE *stream, const char *indent) |
static int | WriteLIGOLwXMLArrayREAL4Stream (LALFILE *stream, const char *indent, int length, double delta, const REAL4 *data) |
static int | WriteLIGOLwXMLArrayREAL8Stream (LALFILE *stream, const char *indent, int length, double delta, const REAL8 *data) |
static int | WriteLIGOLwXMLArrayCOMPLEX8Stream (LALFILE *stream, const char *indent, int length, double delta, const COMPLEX8 *data) |
static int | WriteLIGOLwXMLArrayCOMPLEX16Stream (LALFILE *stream, const char *indent, int length, double delta, const COMPLEX16 *data) |
static int | WriteLIGOLwXMLArray (LALFILE *stream, const char *comment, const char *name, const LIGOTimeGPS *epoch, const LALUnit *units, double f0, double delta, int is_tseries, int is_complex, int is_real4, int length, const void *data) |
int | XLALWriteLIGOLwXMLArrayREAL4TimeSeries (LIGOLwXMLStream *xml, const char *comment, const REAL4TimeSeries *series) |
Write a REAL4TimeSeries to a LIGOLwXMLStream . More... | |
int | XLALWriteLIGOLwXMLArrayREAL8TimeSeries (LIGOLwXMLStream *xml, const char *comment, const REAL8TimeSeries *series) |
Write a REAL8TimeSeries to a LIGOLwXMLStream . More... | |
int | XLALWriteLIGOLwXMLArrayREAL4FrequencySeries (LIGOLwXMLStream *xml, const char *comment, const REAL4FrequencySeries *series) |
Write a REAL4FrequencySeries to a LIGOLwXMLStream . More... | |
int | XLALWriteLIGOLwXMLArrayREAL8FrequencySeries (LIGOLwXMLStream *xml, const char *comment, const REAL8FrequencySeries *series) |
Write a REAL8FrequencySeries to a LIGOLwXMLStream . More... | |
int | XLALWriteLIGOLwXMLArrayCOMPLEX8FrequencySeries (LIGOLwXMLStream *xml, const char *comment, const COMPLEX8FrequencySeries *series) |
Write a COMPLEX8FrequencySeries to a LIGOLwXMLStream . More... | |
int | XLALWriteLIGOLwXMLArrayCOMPLEX16FrequencySeries (LIGOLwXMLStream *xml, const char *comment, const COMPLEX16FrequencySeries *series) |
Write a COMPLEX16FrequencySeries to a LIGOLwXMLStream . More... | |
I/O library for LIGO Light Weight XML Array document fragments.
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() { LIGOLwXMLStream *xml; REAL8FrequencySeries *series; LIGOTimeGPS epoch = {772847291, 500000000}; int i;
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);
xml = XLALOpenLIGOLwXMLFile("fseries.xml"); XLALWriteLIGOLwXMLArrayREAL8FrequencySeries(xml, "a sin(x)/x function", series); XLALCloseLIGOLwXMLFile(xml);
return 0; }
Definition in file LIGOLwXMLArray.c.
Go to the source code of this file.
|
static |
Definition at line 95 of file LIGOLwXMLArray.c.
|
static |
Definition at line 122 of file LIGOLwXMLArray.c.
|
static |
Definition at line 151 of file LIGOLwXMLArray.c.
|
static |
Definition at line 166 of file LIGOLwXMLArray.c.
|
static |
Definition at line 189 of file LIGOLwXMLArray.c.
|
static |
Definition at line 212 of file LIGOLwXMLArray.c.
|
static |
Definition at line 235 of file LIGOLwXMLArray.c.
|
static |
Definition at line 264 of file LIGOLwXMLArray.c.
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 322 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 341 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 360 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 379 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 398 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 417 of file LIGOLwXMLArray.c.