22#include <lal/LALError.h>
23#include <lal/LALFrameU.h>
66 for (det = 0; det < ndet; ++det) {
68 LALFrameUFrDetector *detector;
94 LALFrameUFrDetector *detectorcopy;
96 if (!frame || !detector)
114 elevation, azimuthx, azimuthy, altitudex, altitudey, midpointx,
122 size_t pos,
const char *match)
134 for (adc = 0; adc < nadc; ++adc) {
138 if (match && strcmp(
name, match))
146 for (proc = 0; proc < nproc; ++proc) {
150 if (match && strcmp(
name, match))
158 for (sim = 0; sim < nsim; ++sim) {
162 if (match && strcmp(
name, match))
176 const char *channame;
177 const char *vectname;
188 LALFrameUFrChan *chancopy;
221 lalAbortHook(
"%s: unsupported chantype=%i\n", __func__, chantype);
234 memcpy(datacopy, dataorig, nbytes);
void(* lalAbortHook)(const char *,...)
int XLALFrameUFrameHQueryFrame(const LALFrameUFrameH *frame)
Query FrameH structure for the frame number.
const char * XLALFrameUFrTOCQuerySimName(const LALFrameUFrTOC *toc, size_t sim)
Query FrTOC structure for the name of a FrSimData structure.
LALFrameUFrameH * XLALFrameUFrameHAlloc(const char *name, double start1, double start2, double dt, int frnum)
Allocate memory for a new frame header FrameH structure.
LALFrameUFrDetector * XLALFrameUFrDetectorAlloc(const char *name, const char *prefix, double latitude, double longitude, double elevation, double azimuthX, double azimuthY, double altitudeX, double altitudeY, double midpointX, double midpointY, int localTime)
Allocate memory for a new detector FrDetector structure.
double XLALFrameUFrDetectorQueryElevation(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector elevation.
double XLALFrameUFrDetectorQueryLatitude(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector latitude.
void * XLALFrameUFrChanVectorQueryData(const LALFrameUFrChan *channel)
Query FrChan structure for the data pointer in its FrVect structure.
int XLALFrameUFrChanVectorQueryType(const LALFrameUFrChan *channel)
Query FrChan structure for the data type of its FrVect structure.
int XLALFrameUFrameHFrDetectorAdd(LALFrameUFrameH *frame, LALFrameUFrDetector *detector)
Add a FrDetector structure to a FrameH structure.
int XLALFrameUFrChanSetTimeOffset(LALFrameUFrChan *channel, double timeOffset)
Set the time offset in a FrChan structure.
const char * XLALFrameUFrChanVectorQueryName(const LALFrameUFrChan *channel)
Query FrChan structure for the name of its FrVect structure.
void XLALFrameUFrTOCFree(LALFrameUFrTOC *toc)
Free a FrTOC structure.
LALFrameUFrChan * XLALFrameUFrChanRead(LALFrameUFrFile *stream, const char *name, size_t pos)
Read a channel FrChan structure from a FrFile stream.
size_t XLALFrameUFrTOCQuerySimN(const LALFrameUFrTOC *toc)
Query FrTOC structure for number of FrSimData structures.
void XLALFrameUFrameHFree(LALFrameUFrameH *frame)
Free a FrameH structure.
void XLALFrameUFrChanFree(LALFrameUFrChan *channel)
Free a FrChan structure.
int XLALFrameUFrChanVectorSetDx(LALFrameUFrChan *channel, double dx)
Set the sampling interval for the data in the FrVect structure contained in a FrChan structure.
int XLALFrameUFrameHFrChanAdd(LALFrameUFrameH *frame, LALFrameUFrChan *channel)
Add a FrChan structure to a FrameH structure.
const char * XLALFrameUFrDetectorQueryPrefix(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector prefix.
struct tagLALFrameUFrameH LALFrameUFrameH
Incomplete type for a frame header FrameH structure.
int XLALFrameUFrChanVectorExpand(LALFrameUFrChan *channel)
Expands a FrVect structure within a FrChan structure.
LALFrameUFrChan * XLALFrameUFrSimChanAlloc(const char *name, int dtype, size_t ndata)
Allocate memory for a new FrChan structure of FrSimData type.
int XLALFrameUFrChanVectorSetStartX(LALFrameUFrChan *channel, double x0)
Set the starting value for the domain of the data in the FrVect structure contained in a FrChan struc...
double XLALFrameUFrameHQueryDt(const LALFrameUFrameH *frame)
Query FrameH structure for the duration.
int XLALFrameUFrChanVectorSetUnitY(LALFrameUFrChan *channel, const char *unit)
Set the units of the data in the FrVect structure contained in a FrChan structure.
double XLALFrameUFrChanQueryTimeOffset(const LALFrameUFrChan *channel)
Query FrChan structure for time offset for this channel.
LALFrameUFrTOC * XLALFrameUFrTOCRead(LALFrameUFrFile *stream)
Read the table of contents FrTOC structure for a FrFile stream.
LALFrameUFrChan * XLALFrameUFrAdcChanAlloc(const char *name, int dtype, size_t ndata)
Allocate memory for a new FrChan structure of FrAdcData type.
LALFrameUFrameH * XLALFrameUFrameHRead(LALFrameUFrFile *stream, int pos)
Read a frame header FrameH structure from a FrFile stream.
size_t XLALFrameUFrTOCQueryProcN(const LALFrameUFrTOC *toc)
Query FrTOC structure for number of FrProcData structures.
int XLALFrameUFrChanVectorAlloc(LALFrameUFrChan *channel, int dtype, size_t ndata)
Allocate memory for a FrVect structure within a FrChan structure.
double XLALFrameUFrChanVectorQueryDx(const LALFrameUFrChan *channel, size_t dim)
Query FrChan structure for the sampling interval in the dim dimension of the multi-dimensional data i...
const char * XLALFrameUFrTOCQueryProcName(const LALFrameUFrTOC *toc, size_t proc)
Query FrTOC structure for the name of a FrProcData structure.
size_t XLALFrameUFrChanVectorQueryNData(const LALFrameUFrChan *channel)
Query FrChan structure for the number of points of data in its FrVect structure.
const char * XLALFrameUFrameHQueryName(const LALFrameUFrameH *frame)
Query FrameH structure for its name.
double XLALFrameUFrDetectorQueryArmXMidpoint(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector x-arm midpoint.
double XLALFrameUFrDetectorQueryArmXAltitude(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector x-arm altitude.
int XLALFrameUFrameHSetRun(LALFrameUFrameH *frame, int run)
Set the run number in a FrameH structure.
const char * XLALFrameUFrChanVectorQueryUnitY(const LALFrameUFrChan *channel)
Query FrChan structure for sample units of the data in the FrVect structure.
double XLALFrameUFrDetectorQueryArmYAltitude(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector y-arm altitude.
void XLALFrameUFrDetectorFree(LALFrameUFrDetector *detector)
Free a FrDetector structure.
const char * XLALFrameUFrTOCQueryAdcName(const LALFrameUFrTOC *toc, size_t adc)
Query FrTOC structure for the name of a FrAdcData structure.
double XLALFrameUFrDetectorQueryArmYMidpoint(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector y-arm midpoint.
const char * XLALFrameUFrChanVectorQueryUnitX(const LALFrameUFrChan *channel, size_t dim)
Query FrChan structure for the units of the domain of the dim dimension of the multi-dimensional data...
double XLALFrameUFrDetectorQueryLongitude(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector longitude.
double XLALFrameUFrChanVectorQueryStartX(const LALFrameUFrChan *channel, size_t dim)
Query FrChan structure for the starting value of the dim dimension of the multi-dimensional data in t...
double XLALFrameUFrameHQueryGTimeModf(double *iptr, const LALFrameUFrameH *frame)
Query FrameH structure for the start time.
struct tagLALFrameUFrTOC LALFrameUFrTOC
Incomplete type for a table of contents FrTOC structure.
LALFrameUFrChan * XLALFrameUFrProcChanAlloc(const char *name, int type, int subtype, int dtype, size_t ndata)
Allocate memory for a new FrChan structure of FrAdcData type.
int XLALFrameUFrDetectorQueryLocalTime(const LALFrameUFrDetector *detector)
Query FrDetector structure for the local time offset at the detector.
int XLALFrameUFrChanVectorSetName(LALFrameUFrChan *channel, const char *name)
Set the name of the FrVect structure contained in a FrChan structure.
size_t XLALFrameUFrTOCQueryAdcN(const LALFrameUFrTOC *toc)
Query FrTOC structure for number of FrAdcData structures.
int XLALFrameUFrameHQueryRun(const LALFrameUFrameH *frame)
Query FrameH structure for the run number.
size_t XLALFrameUFrTOCQueryDetectorN(const LALFrameUFrTOC *toc)
Query FrTOC structure for number of FrDetector structures.
int XLALFrameUFrChanVectorSetUnitX(LALFrameUFrChan *channel, const char *unit)
Set the units of the domain of the data in the FrVect structure contained in a FrChan structure.
const char * XLALFrameUFrDetectorQueryName(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector name.
double XLALFrameUFrDetectorQueryArmXAzimuth(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector x-arm azimuth.
LALFrameUFrDetector * XLALFrameUFrDetectorRead(LALFrameUFrFile *stream, const char *name)
Read a detector FrDetector structure from a FrFile stream.
size_t XLALFrameUFrChanVectorQueryNBytes(const LALFrameUFrChan *channel)
Query FrChan structure for the number of bytes of data in its FrVect structure.
const char * XLALFrameUFrTOCQueryDetectorName(const LALFrameUFrTOC *toc, size_t det)
Query FrTOC structure for the name of a FrDetector structure.
const char * XLALFrameUFrChanQueryName(const LALFrameUFrChan *channel)
Query FrChan structure for its name.
double XLALFrameUFrDetectorQueryArmYAzimuth(const LALFrameUFrDetector *detector)
Query FrDetector structure for the detector y-arm azimuth.
@ LAL_FRAMEU_FR_PROC_TYPE_TIME_SERIES
Id for time-series data.
@ LAL_FRAMEU_FR_PROC_SUB_TYPE_UNKNOWN
Id for unknown or user-defined data.
void output(int gps_sec, int output_type)
int copydetector(LALFrameUFrameH *frame, LALFrameUFrDetector *detector)
LALFrameUFrameH * framecpy(LALFrameUFrFile *frfile, size_t pos)
int copychannel(LALFrameUFrameH *frame, LALFrameUFrChan *channel, int chantype)
int copydetectors(LALFrameUFrameH *frame, LALFrameUFrFile *frfile)
LALFrameUFrameH * framedup(LALFrameUFrameH *frame)
int copychannels(LALFrameUFrameH *frame, LALFrameUFrFile *frfile, size_t pos, const char *match)