LALFrame 3.0.7.1-eeff03c
LALFrStreamRead.c File Reference

Prototypes

int XLALFrStreamGetVectorLength (const char *chname, LALFrStream *stream)
 Returns the number of data points in channel chname in the current frame in frame stream stream. More...
 
LALTYPECODE XLALFrStreamGetTimeSeriesType (const char *chname, LALFrStream *stream)
 Returns the type code for the data type of channel chname in the current frame in frame stream stream. More...
 
Random-Access Time Series Reading Routines

These routines allow the user to read channel data for a specified period of time.

The following is an example of how to read 16 seconds of REAL8 data from channel STRAIN beginning at GPS time 123456789 from frame files in the current directory.

#include <lal/LALFrStream.h>
...
const char *dirname = ".";
const char *pattern = "*.gwf";
const char *chname = "STRAIN";
LALFrStream *stream;
LIGOTimeGPS start = { 123456789 };
REAL8 duration = 16.0;
...
stream = XLALFrStreamOpen(dirname, pattern);
series = XLALFrStreamInputREAL8TimeSeries(stream, chname, &start, duration, 0);
double REAL8
LALFrStream * XLALFrStreamOpen(const char *dirname, const char *pattern)
Opens a LALFrStream for specified frame files.
Definition: LALFrStream.c:253
REAL8TimeSeries * XLALFrStreamInputREAL8TimeSeries(LALFrStream *stream, const char *channel, const LIGOTimeGPS *start, REAL8 duration, size_t lengthlimit)
Reads a time series channel from a LALFrStream stream with a specified start time and duration,...
This structure details the state of the frame stream.
Definition: LALFrStream.h:95

Note that the XLALFrStreamInputREAL8TimeSeries() will convert channel data of a different datatype to REAL8 data (so, for example, if the data stored in the frame file is REAL4 data, then it is cast as REAL8 data). If this behaviour is not wanted, use XLALFrStreamReadREAL8TimeSeries() instead.

REAL8TimeSeriesXLALFrStreamInputREAL8TimeSeries (LALFrStream *stream, const char *chname, const LIGOTimeGPS *start, double duration, size_t lengthlimit)
 Reads a time series channel from a LALFrStream stream with a specified start time and duration, and performs any needed type conversion. More...
 
COMPLEX16TimeSeriesXLALFrStreamInputCOMPLEX16TimeSeries (LALFrStream *stream, const char *chname, const LIGOTimeGPS *start, double duration, size_t lengthlimit)
 Reads a time series channel from a LALFrStream stream with a specified start time and duration, and performs any needed type conversion. More...
 
Random-Access Frequency Series Reading Routines

These routines allow the user to read channel data for a specified period of time.

The following is an example of how to read a frequency series REAL8 data from channel STRAIN_PSD beginning at GPS time 123456789 from frame files in the current directory.

#include <lal/LALFrStream.h>
...
const char *dirname = ".";
const char *pattern = "*.gwf";
const char *chname = "STRAIN_PSD";
LALFrStream *stream;
LIGOTimeGPS start = { 123456789 };
...
stream = XLALFrStreamOpen(dirname, pattern);
series = XLALFrStreamInputREAL8FrequencySeries(stream, chname, &start);
...
REAL8FrequencySeries * XLALFrStreamInputREAL8FrequencySeries(LALFrStream *stream, const char *chname, const LIGOTimeGPS *epoch)
Reads a time series channel from a LALFrStream stream with a specified epoch, and performs any needed...

Note that the XLALFrStreamInputREAL8FrequencySeries() will convert channel data of a different datatype to REAL8 data (so, for example, if the data stored in the frame file is REAL4 data, then it is cast as REAL8 data). If this behaviour is not wanted, use XLALFrStreamReadREAL8Frequencyeries() instead.

REAL8FrequencySeriesXLALFrStreamInputREAL8FrequencySeries (LALFrStream *stream, const char *chname, const LIGOTimeGPS *epoch)
 Reads a time series channel from a LALFrStream stream with a specified epoch, and performs any needed type conversion. More...
 
COMPLEX16FrequencySeriesXLALFrStreamInputCOMPLEX16FrequencySeries (LALFrStream *stream, const char *chname, const LIGOTimeGPS *epoch)
 Reads a time series channel from a LALFrStream stream with a specified epoch, and performs any needed type conversion. More...
 

Go to the source code of this file.