9#include <lal/LALFrameIO.h>
10#include <lal/LALCache.h>
11#include <lal/LALFrStream.h>
12#include <lal/LALConstants.h>
15#include <lal/TimeSeries.h>
20int main(
int argc,
char *argv[])
29 char cache_name_1[256];
30 char cache_name_2[256];
47 printf(
"%s(): usage: lalapps_StringAddFrame [gps_start] [gps_end] [outdir]\n",__func__);
48 printf(
" There should be the H1 and H2 cache files ready in [outdir] named H1.cache and H2.cache\n");
51 gps_start_i=atoi(argv[1]);
52 gps_end_i=atoi(argv[2]);
53 sprintf(cache_name_1,
"%s/H1.cache", argv[3]);
54 sprintf(cache_name_2,
"%s/H2.cache", argv[3]);
59 printf(
"%s(): no cache named %s\n",__func__,cache_name_1);
65 printf(
"%s(): no stream for H1\n",__func__);
72 printf(
"%s(): no cache named %s\n",__func__,cache_name_2);
78 printf(
"%s(): no stream for H2\n",__func__);
87 for(
i=gps_start_i;
i<gps_end_i;
i+=128){
91 printf(
"Building frame %d-%d...\n",
start,
end);
103 printf(
"%s(): cannot read data for H1:LSC-STRAIN\n",__func__);
108 printf(
"%s(): cannot read data for H2:LSC-STRAIN\n",__func__);
int main(int argc, char *argv[])
void XLALDestroyCache(LALCache *cache)
LALCache * XLALCacheImport(const char *fname)
#define LAL_LHO_4K_DETECTOR_BIT
int XLALFrStreamClose(LALFrStream *stream)
LALFrStream * XLALFrStreamCacheOpen(LALCache *cache)
int XLALFrStreamSetMode(LALFrStream *stream, int mode)
LAL_FR_STREAM_VERBOSE_MODE
REAL8TimeSeries * XLALFrStreamReadREAL8TimeSeries(LALFrStream *stream, const char *chname, const LIGOTimeGPS *start, REAL8 duration, size_t lengthlimit)
LALFrameUFrameH LALFrameH
int XLALFrameWrite(LALFrameH *frame, const char *fname)
LALFrameH * XLALFrameNew(const LIGOTimeGPS *epoch, double duration, const char *project, int run, int frnum, INT8 detectorFlags)
void XLALFrameFree(LALFrameH *frame)
int XLALFrameAddREAL8TimeSeriesProcData(LALFrameH *frame, const REAL8TimeSeries *series)
void XLALDestroyREAL8TimeSeries(REAL8TimeSeries *series)
REAL8TimeSeries * XLALCreateREAL8TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
const LALUnit lalStrainUnit
REAL8 XLALGPSDiff(const LIGOTimeGPS *t1, const LIGOTimeGPS *t0)