30#include <lal/LALStdlib.h>
33#include <lal/TimeSeries.h>
34#include <lal/FrequencySeries.h>
35#include <lal/LALFrameIO.h>
36#include <lal/LALFrStream.h>
79#include "LALFrStreamReadTS_source.c"
83#include "LALFrStreamReadTS_source.c"
87#include "LALFrStreamReadTS_source.c"
91#include "LALFrStreamReadTS_source.c"
95#include "LALFrStreamReadTS_source.c"
99#include "LALFrStreamReadTS_source.c"
103#include "LALFrStreamReadTS_source.c"
104#include "LALFrStreamReadFS_source.c"
108#include "LALFrStreamReadTS_source.c"
109#include "LALFrStreamReadFS_source.c"
113#include "LALFrStreamReadTS_source.c"
114#include "LALFrStreamReadFS_source.c"
117#define TYPE COMPLEX16
118#include "LALFrStreamReadTS_source.c"
119#include "LALFrStreamReadFS_source.c"
123#define COPY_S2S(dest, orig, n) \
126 for (i = 0; i < n; ++i) (dest)[i] = (orig)[i]; \
130#define COPY_S2C(dest, orig, n) \
133 for (i = 0; i < n; ++i) (dest)[i].re = (orig)[i]; \
137#define COPY_C2C(dest, orig, n) \
140 for (i = 0; i < n; ++i) { \
141 (dest)[i].re = (orig)[i].re; \
142 (dest)[i].im = (orig)[i].im; \
146#define INPUTTS(series, desttype, origtype, promotion, stream, chname, start, duration, lengthlimit) \
148 origtype ## TimeSeries *origin; \
149 origin = XLALFrStreamRead##origtype##TimeSeries((stream),(chname),(start),(duration),(lengthlimit)); \
150 series = XLALCreate##desttype##TimeSeries((chname),(start),origin->f0,origin->deltaT,&origin->sampleUnits,origin->data->length); \
151 if (!origin || !series) { \
152 XLALDestroy##origtype##TimeSeries(origin); \
153 XLALDestroy##desttype##TimeSeries(series); \
154 XLAL_ERROR_NULL(XLAL_EFUNC); \
156 COPY_##promotion(series->data->data, origin->data->data, origin->data->length); \
157 XLALDestroy##origtype##TimeSeries(origin); \
160#define INPUTFS(series, desttype, origtype, promotion, stream, chname, epoch) \
162 origtype ## FrequencySeries *origin; \
163 origin = XLALFrStreamRead##origtype##FrequencySeries((stream),(chname),(epoch)); \
164 series = XLALCreate##desttype##FrequencySeries((chname),(epoch),origin->f0,origin->deltaF,&origin->sampleUnits,origin->data->length); \
165 if (!origin || !series) { \
166 XLALDestroy##origtype##FrequencySeries(origin); \
167 XLALDestroy##desttype##FrequencySeries(series); \
168 XLAL_ERROR_NULL(XLAL_EFUNC); \
170 COPY_##promotion(series->data->data, origin->data->data, origin->data->length); \
171 XLALDestroy##origtype##FrequencySeries(origin); \
424 const char *chname,
const LIGOTimeGPS * start,
double duration,
436 INPUTTS(series,
REAL8,
INT2, S2S, stream, chname, start, duration,
440 INPUTTS(series,
REAL8,
INT4, S2S, stream, chname, start, duration,
444 INPUTTS(series,
REAL8,
INT8, S2S, stream, chname, start, duration,
448 INPUTTS(series,
REAL8,
UINT2, S2S, stream, chname, start, duration,
452 INPUTTS(series,
REAL8,
UINT4, S2S, stream, chname, start, duration,
456 INPUTTS(series,
REAL8,
UINT8, S2S, stream, chname, start, duration,
460 INPUTTS(series,
REAL8,
REAL4, S2S, stream, chname, start, duration,
466 duration, lengthlimit);
473#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
500 stream,
const char *chname,
const LIGOTimeGPS * start,
double duration,
513 duration, lengthlimit);
517 duration, lengthlimit);
521 duration, lengthlimit);
525 duration, lengthlimit);
529 duration, lengthlimit);
533 duration, lengthlimit);
537 duration, lengthlimit);
541 duration, lengthlimit);
545 duration, lengthlimit);
549 duration, lengthlimit);
667 stream,
const char *chname,
const LIGOTimeGPS * epoch)
688#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
int XLALFrStreamSeek(LALFrStream *stream, const LIGOTimeGPS *epoch)
Seeks a LALFrStream stream to data at a given time.
REAL8FrequencySeries * XLALFrStreamReadREAL8FrequencySeries(LALFrStream *stream, const char *chname, const LIGOTimeGPS *epoch)
Reads a time series channel from a LALFrStream stream with a specified epoch.
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...
COMPLEX16TimeSeries * XLALFrStreamInputCOMPLEX16TimeSeries(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,...
COMPLEX16FrequencySeries * XLALFrStreamReadCOMPLEX16FrequencySeries(LALFrStream *stream, const char *chname, const LIGOTimeGPS *epoch)
Reads a time series channel from a LALFrStream stream with a specified epoch.
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...
int XLALFrStreamGetVectorLength(const char *chname, LALFrStream *stream)
Returns the number of data points in channel chname in the current frame in frame stream stream.
REAL8TimeSeries * XLALFrStreamInputREAL8TimeSeries(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,...
COMPLEX16TimeSeries * XLALFrStreamReadCOMPLEX16TimeSeries(LALFrStream *stream, const char *chname, const LIGOTimeGPS *start, REAL8 duration, size_t lengthlimit)
Reads a time series channel from a LALFrStream stream with a specified start time and duration.
COMPLEX16FrequencySeries * XLALFrStreamInputCOMPLEX16FrequencySeries(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...
REAL8TimeSeries * XLALFrStreamReadREAL8TimeSeries(LALFrStream *stream, const char *chname, const LIGOTimeGPS *start, REAL8 duration, size_t lengthlimit)
Reads a time series channel from a LALFrStream stream with a specified start time and duration.
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.
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.
#define XLAL_ERROR_NULL(...)
#define XLAL_PRINT_ERROR(...)
This structure details the state of the frame stream.