43#include <gsl/gsl_rng.h>
44#include <gsl/gsl_randist.h>
45#include <gsl/gsl_roots.h>
47#include <lal/LALDatatypes.h>
48#include <lal/LALgetopt.h>
49#include <lal/LALStdlib.h>
50#include <lal/LALStdio.h>
51#include <lal/FileIO.h>
52#include <lal/AVFactories.h>
53#include <lal/LALCache.h>
54#include <lal/LALFrStream.h>
55#include <lal/Window.h>
56#include <lal/LALConstants.h>
57#include <lal/BandPassTimeSeries.h>
58#include <lal/AVFactories.h>
59#include <lal/ResampleTimeSeries.h>
60#include <lal/TimeFreqFFT.h>
61#include <lal/RealFFT.h>
62#include <lal/PrintFTSeries.h>
66#include <lal/LIGOMetadataTables.h>
67#include <lal/LIGOMetadataUtils.h>
68#include <lal/SnglBurstUtils.h>
70#include <lal/LIGOLwXML.h>
71#include <lal/LIGOLwXMLRead.h>
73#include <lal/FrequencySeries.h>
74#include <lal/TimeSeries.h>
75#include <lal/GenerateBurst.h>
79#define TESTSTATUS( pstat ) \
80 if ( (pstat)->statusCode ) { REPORTSTATUS(pstat); return 100; } else ((void)0)
82#define MAXTEMPLATES 50
87#define PROGRAM_NAME "StringSearch"
88#define CVS_REVISION "$Revision$"
89#define CVS_SOURCE "$Source$"
90#define CVS_DATE "$Date$"
99 REAL8 fbankhighfcutofflow;
105 char *outputFileName;
108 INT4 ShortSegDuration;
113 INT4 whitespectrumflag;
118 INT4 printspectrumflag;
119 INT4 printfilterflag;
123 INT4 printinjectionflag;
128struct StringTemplateTag {
266 if(!fplan || !rplan) {
314 if (
FreeMem(strtemplate, NTemplates))
return 14;
388 for(
a = *list;
a;
a =
a->next)
389 for(prev =
a, b =
a->next; b; b = prev->
next) {
400 }
while(did_cluster);
414 if(!time_slide_table_head || !sim_burst_table_head)
443 const char *type,
const char *param,
const char *value){
450 return(&(*proc_param)->next);
453#define ADD_PROCESS_PARAM(process, type) \
454 do { paramaddpoint = add_process_param(paramaddpoint, process, type, long_options[option_index].name, LALoptarg); } while(0)
463 strncpy(
ifo, CLA->ChannelName, 2 );
466 if (!CLA->outputFileName){
467 CHAR outfilename[256];
492 searchsumm->out_start_time = CLA->trigstarttime;
518 INT4 pmax, pend, pstart;
521 if (CLA.printsnrflag)
522 for (
p =
vector->data->length/4 ; p < 3*vector->
data->length/4;
p++ )
526 for (
p =
vector->data->length/4 ; p < 3*vector->
data->length/4;
p++ ){
527 REAL8 maximum_snr = 0.0;
538 while( ((fabs(
vector->data->data[
p]) > CLA.threshold) || ((
p-pend)*
vector->deltaT < (
float)(CLA.cluster)) )
539 && p<3*vector->
data->length/4){
542 if(fabs(
vector->data->data[
p]) > maximum_snr){
543 maximum_snr=fabs(
vector->data->data[
p]);
547 if ( (fabs(
vector->data->data[
p]) > CLA.threshold))
555 for(
pp=-strtemplate->
chi2_index; pp<strtemplate->chi2_index;
pp++){
561 if( CLA.chi2cut[0] > -9999
562 && CLA.chi2cut[1] > -9999
563 && CLA.chi2cut[2] > -9999 )
564 if(log10(
chi2/ndof)>CLA.chi2cut[0]
565 && log10(
chi2/ndof)> CLA.chi2cut[1]*log10(fabs(maximum_snr))+CLA.chi2cut[2])
continue;
575 strncpy( new->ifo, CLA.ChannelName, 2 );
577 strncpy( new->search,
"StringCusp",
sizeof( new->search ) );
578 strncpy( new->channel, CLA.ChannelName,
sizeof( new->channel ) - 1);
582 new->start_time =
new->peak_time =
vector->epoch;
585 new->duration =
vector->deltaT * ( pend - pstart + 2 );
587 new->central_freq = (strtemplate->
f+CLA.fbankstart)/2.0;
588 new->bandwidth = strtemplate->
f-CLA.fbankstart;
589 new->snr = maximum_snr;
590 new->amplitude =
vector->data->data[pmax]/strtemplate->
norm;
592 new->chisq_dof = ndof;
611 for (
m = 0;
m < NTemplates;
m++){
630 for (
p = 0 ;
p <
vector->data->length;
p++ )
664 for (
m = 0;
m < NTemplates;
m++){
680 if(CLA.TruncSecs != 0.0)
681 memset(
vector->data->data + (
int)round(CLA.TruncSecs/2/
vector->deltaT), 0,
682 (
vector->data->length - 2 * (
int)round(CLA.TruncSecs/2/
vector->deltaT))
683 *
sizeof( *
vector->data->data ) );
698 if (CLA.printfilterflag){
699 CHAR filterfilename[256];
700 snprintf(filterfilename,
sizeof(filterfilename)-1,
"Filter-%d.txt",
m);
706 if (CLA.printfirflag){
707 char filterfilename[256];
716 snprintf(filterfilename,
sizeof(filterfilename)-1,
"FIRFilter-%d.txt",
m);
733 unsigned i = round((last_templates_f_cut - Spec->
f0) / Spec->
deltaF);
735 *t2t2 = *t1t2 = integral->
data[
i];
742 *t1t2 += 4 * pow(pow(
f, power), 2) * exp(1 -
f / last_templates_f_cut) / Spec->
data->
data[
i] * Spec->
deltaF;
744 *t2t2 += 4 * pow(pow(
f, power) * exp(1 -
f / f_cut), 2) / Spec->
data->
data[
i] * Spec->
deltaF;
745 *t1t2 += 4 * pow(pow(
f, power), 2) * exp(1 -
f / last_templates_f_cut) * exp(1 -
f / f_cut) / Spec->
data->
data[
i] * Spec->
deltaF;
763 double t1t1 = pow(
p->last_templates_norm, 2);
772 epsilon = 1 - t1t2 / sqrt(t1t1 * t2t2);
779 return epsilon -
p->desired_epsilon;
796 gsl_root_fsolver *solver;
810 solver = gsl_root_fsolver_alloc(gsl_root_fsolver_bisection);
811 gsl_root_fsolver_set(solver, &F, flo, fhi);
813 gsl_root_fsolver_iterate(solver);
814 flo = gsl_root_fsolver_x_lower(solver);
815 fhi = gsl_root_fsolver_x_upper(solver);
817 gsl_root_fsolver_free(solver);
820 return (fhi + flo) / 2;
824 REAL8 f_cut, t1t1, t2t2, t1t2,
norm, slope0, slope1;
825 int m, f_low_cutoff_index, extr_ctr;
836 for(
p = round((CLA.fbankstart -
Spec->
f0) /
Spec->
deltaF) ; p < integral->length;
p++ ) {
843 if(CLA.TemplateFile){
847 strtemplate[0].
f = fcutoff_fix[0];
849 strtemplate[0].
norm = sqrt(t1t1);
852 *NTemplates = NTemplates_fix;
854 for (
m = 1;
m < NTemplates_fix;
m++){
858 strtemplate[
m].
f = fcutoff_fix[
m];
859 strtemplate[
m].
norm = sqrt(t2t2);
860 strtemplate[
m].
mismatch = 1 - t1t2 / sqrt(t1t1 * t2t2);
868 f_cut = CLA.fbankhighfcutofflow;
876 strtemplate[0].
f = f_cut;
878 strtemplate[0].
norm = sqrt(t1t1);
886 while(strtemplate[*NTemplates - 1].findex < (
int)
Spec->
data->
length - 1) {
892 strtemplate[*NTemplates].
f = f_cut;
893 strtemplate[*NTemplates].
norm = sqrt(t2t2);
894 strtemplate[*NTemplates].
mismatch = 1 - t1t2 / sqrt(t1t1 * t2t2);
895 XLALPrintInfo(
"%% %d %1.3e %1.3e %1.3e\n", *NTemplates, strtemplate[*NTemplates].
f, strtemplate[*NTemplates].
norm, strtemplate[*NTemplates].
mismatch);
910 f_low_cutoff_index = round(CLA.fbankstart/
Spec->
deltaF);
911 for (
m = 0;
m < *NTemplates;
m++){
918 memset(strtemplate[
m].waveform_f->data, 0, f_low_cutoff_index*
sizeof(*strtemplate[
m].
waveform_f->
data));
923 if(
f<=strtemplate[
m].
f)
942 for (
p = 0 ;
p <
vector->length / 2;
p++ ){
950 strtemplate[
m].auto_cor->data[
p] /=
norm;
954 for (
p = 0 ;
p <
vector->length/2;
p++ ){
968 if(extr_ctr==2)
break;
987 if (CLA.fakenoiseflag && CLA.whitespectrumflag){
994 unsigned segmentStride = seg_length/2;
1021 if(CLA.fakenoiseflag) {
1023 gsl_rng *rng = gsl_rng_alloc(gsl_rng_mt19937);
1028 if(!(devrandom=fopen(
"/dev/urandom",
"r"))){
1032 errorcode=fread(&
seed,
sizeof(
seed), 1, devrandom);
1038 gsl_rng_set(rng,
seed);
1043 ht->
data->
data[
p] = gsl_ran_gaussian(rng, 1.0);
1064 if((
int) series_type < 0) {
1070 switch(series_type) {
1120 SnglBurst *templates=NULL, *templates_root=NULL;
1129 for(templates = templates_root; templates != NULL; templates = templates->
next){
1131 *NTemplates_fix=*NTemplates_fix+1;
1139 if(*NTemplates_fix<=0){
1145 for(
i=0;
i<*NTemplates_fix-1;
i++){
1146 if(fcutoff_fix[
i]>fcutoff_fix[
i+1]){
1147 XLALPrintError(
"The templates frequencies are not sorted by frequencies\n");
1153 if(fcutoff_fix[*NTemplates_fix-1]>CLA.samplerate/2){
1154 XLALPrintError(
"The templates frequencies go beyond the Nyquist frequency\n");
1164 static char default_comment[] =
"";
1201 char args[] =
"hnckwabrxyzlj:f:L:M:D:H:t:F:C:E:S:i:v:d:T:s:g:o:p:A:B:G:K:";
1206 CLA->fbankstart=0.0;
1207 CLA->fbankhighfcutofflow=0.0;
1208 CLA->fmismatchmax=0.05;
1209 CLA->FrCacheFile=NULL;
1210 CLA->InjectionFile=NULL;
1211 CLA->TemplateFile=NULL;
1212 CLA->ChannelName=NULL;
1213 CLA->outputFileName=NULL;
1216 CLA->ShortSegDuration=0;
1220 CLA->fakenoiseflag=0;
1221 CLA->whitespectrumflag=0;
1222 CLA->samplerate=4096.0;
1226 CLA->printfilterflag=0;
1227 CLA->printspectrumflag=0;
1228 CLA->printsnrflag=0;
1229 CLA->printfirflag=0;
1230 CLA->printdataflag=0;
1231 CLA->printinjectionflag=0;
1232 CLA->comment=default_comment;
1235 memset(CLA->chi2cut, 0,
sizeof(CLA->chi2cut));
1236 CLA->chi2cut[0]=CLA->chi2cut[1]=CLA->chi2cut[2]=-9999.1;
1241 int option_index = 0;
1257 CLA->fbankhighfcutofflow=atof(
LALoptarg);
1356 CLA->power=-4.0/3.0;
1361 CLA->power=-5.0/3.0;
1366 CLA->fakenoiseflag=1;
1371 CLA->whitespectrumflag=1;
1381 CLA->printspectrumflag=1;
1386 CLA->printfilterflag=1;
1396 CLA->printsnrflag=1;
1401 CLA->printfirflag=1;
1406 CLA->printdataflag=1;
1411 CLA->printinjectionflag=1;
1416 fprintf(stdout,
"All arguments are required except -n, -h, -w, -g, -o, -x, -y, -z, -b, -r -a, -l, -p, -T and -i. One of -k or -c must be specified. They are:\n");
1417 fprintf(stdout,
"\t--sample-rate (-s)\t\tFLOAT\t Desired sample rate (Hz).\n");
1418 fprintf(stdout,
"\t--bank-lowest-hifreq-cutoff (-H)\tFLOAT\t Template bank lowest high frequency cut-off.\n");
1419 fprintf(stdout,
"\t--max-mismatch (-M)\tFLOAT\t Maximal mismatch allowed from 1 template to the next.\n");
1420 fprintf(stdout,
"\t--bank-freq-start (-L)\tFLOAT\t Template bank low frequency cut-off.\n");
1421 fprintf(stdout,
"\t--threshold (-t)\t\tFLOAT\t SNR threshold.\n");
1422 fprintf(stdout,
"\t--frame-cache (-F)\t\tSTRING\t Name of frame cache file.\n");
1423 fprintf(stdout,
"\t--channel (-C)\t\tSTRING\t Name of channel.\n");
1424 fprintf(stdout,
"\t--injection-file (-i)\t\tSTRING\t Name of xml injection file.\n");
1425 fprintf(stdout,
"\t--template-bank (-K)\t\tSTRING\t Name of txt template file.\n");
1426 fprintf(stdout,
"\t--output (-o)\t\tSTRING\t Name of xml output file.\n");
1427 fprintf(stdout,
"\t--gps-start-time (-S)\t\tINTEGER\t GPS start time.\n");
1428 fprintf(stdout,
"\t--gps-end-time (-E)\t\tINTEGER\t GPS end time.\n");
1429 fprintf(stdout,
"\t--settling-time (-T)\t\tINTEGER\t Number of seconds to truncate filter.\n");
1430 fprintf(stdout,
"\t--trig-start-time (-g)\t\tINTEGER\t GPS start time of triggers to consider.\n");
1431 fprintf(stdout,
"\t--pad (-p)\t\tINTEGER\t Pad the data with these many seconds at beginning and end.\n");
1432 fprintf(stdout,
"\t--chi2par0 (-A)\t\tFLOAT\t parameter[0] for the chi2 selection.\n");
1433 fprintf(stdout,
"\t--chi2par1 (-B)\t\tFLOAT\t parameter[1] for the chi2 selection.\n");
1434 fprintf(stdout,
"\t--chi2par2 (-G)\t\tFLOAT\t parameter[2] for the chi2 selection.\n");
1435 fprintf(stdout,
"\t--short-segment-duration (-d)\t\tINTEGER\t Duration of short segments. They will overlap by 50%s. \n",
"%");
1436 fprintf(stdout,
"\t--kink-search (-k)\t\tFLAG\t Specifies a search for string kinks.\n");
1437 fprintf(stdout,
"\t--cusp-search (-c)\t\tFLAG\t Specifies a search for string cusps.\n");
1438 fprintf(stdout,
"\t--test-gaussian-data (-n)\tFLAG\t Use unit variance fake gaussian noise.\n");
1439 fprintf(stdout,
"\t--test-white-spectrum (-w)\tFLAG\t Use constant white noise (used only in combination with fake gaussian noise; otherwise ignored).\n");
1440 fprintf(stdout,
"\t--cluster-events (-l)\tREAL4\t Cluster events with input timescale.\n");
1441 fprintf(stdout,
"\t--print-spectrum (-a)\tFLAG\t Prints the spectrum to Spectrum.txt.\n");
1442 fprintf(stdout,
"\t--print-fd-filter (-b)\tFLAG\t Prints the frequency domain filter to Filter-<template no>.txt.\n");
1443 fprintf(stdout,
"\t--print-td-filter (-r)\tFLAG\t Prints the time domain filter to FIRFilter-<template no>.txt.\n");
1444 fprintf(stdout,
"\t--print-snr (-x)\tFLAG\t Prints the snr to stdout.\n");
1445 fprintf(stdout,
"\t--print-data (-y)\tFLAG\t Prints the post-processed (HP filtered, downsampled, padding removed, with injections) data to data.txt.\n");
1446 fprintf(stdout,
"\t--print-injection (-z)\tFLAG\t Prints the injeciton data to injection.txt.\n");
1447 fprintf(stdout,
"\t--help (-h)\t\t\tFLAG\t Print this message.\n");
1448 fprintf(stdout,
"eg %s --sample-rate 4096 --bank-freq-start 30 --bank-lowest-hifreq-cutoff 200 --settling-time 0.1 --short-segment-duration 4 --cusp-search --cluster-events 0.1 --pad 4 --threshold 4 --output ladida.xml --frame-cache cache/H-H1_RDS_C01_LX-795169179-795171015.cache --channel H1:LSC-STRAIN --gps-start-time 795170318 --gps-end-time 795170396\n", argv[0]);
1454 fprintf(stderr,
"Unrecognized option argument %c\n",
c);
1460 if(CLA->fbankstart == 0.0)
1462 fprintf(stderr,
"No low frequency for frequency bank specified.\n");
1463 fprintf(stderr,
"Try %s -h \n",argv[0]);
1466 if(! CLA->TemplateFile && CLA->fbankhighfcutofflow == 0.0)
1468 fprintf(stderr,
"No template bank lowest high frequency cutoff specified.\n");
1469 fprintf(stderr,
"Try %s -h \n",argv[0]);
1472 if(CLA->threshold == 0.0)
1474 fprintf(stderr,
"No SNR threshold specified.\n");
1475 fprintf(stderr,
"Try %s -h \n",argv[0]);
1478 if(CLA->power == 0.0)
1480 fprintf(stderr,
"Cusp or kink search not specified. \n");
1481 fprintf(stderr,
"Try %s -h \n",argv[0]);
1484 if(CLA->FrCacheFile == NULL)
1486 fprintf(stderr,
"No frame cache file specified.\n");
1487 fprintf(stderr,
"Try %s -h \n",argv[0]);
1490 if(CLA->ChannelName == NULL)
1492 fprintf(stderr,
"No channel name specified.\n");
1493 fprintf(stderr,
"Try %s -h \n",argv[0]);
1496 if(!(CLA->ChannelName[0] ==
'V' || CLA->ChannelName[0] ==
'H' || CLA->ChannelName[0] ==
'L'))
1498 fprintf(stderr,
"The channel name is not well specified\n");
1499 fprintf(stderr,
"It should start with H1, H2, L1 or V1\n");
1500 fprintf(stderr,
"Try %s -h \n",argv[0]);
1505 fprintf(stderr,
"No GPS start time specified.\n");
1506 fprintf(stderr,
"Try %s -h \n",argv[0]);
1511 fprintf(stderr,
"Only integer values allowed for --gps-start-time.\n");
1516 fprintf(stderr,
"No GPS end time specified.\n");
1517 fprintf(stderr,
"Try %s -h \n",argv[0]);
1522 fprintf(stderr,
"Only integer values allowed for --gps-end-time.\n");
1525 if(CLA->ShortSegDuration == 0)
1527 fprintf(stderr,
"Short segment duration not specified (they overlap by 50%s).\n",
"%");
1528 fprintf(stderr,
"Try %s -h \n",argv[0]);
1534 int big_seg_length=
XLALGPSDiff(&CLA->GPSEnd, &CLA->GPSStart)-2*CLA->pad;
1536 REAL4 x=((
float)big_seg_length/(
float)CLA->ShortSegDuration)-0.5;
1539 fprintf(stderr,
"The total duration of the segment T and the short segment duration\n");
1540 fprintf(stderr,
"Should obey the following rule: T/t - 0.5 shold be an odd integer.\n");
1543 if(((
int)
x)%2 != 1){
1544 fprintf(stderr,
"The total duration of the segment T and the short segment duration\n");
1545 fprintf(stderr,
"Should obey the following rule: T/t - 0.5 shold be an odd integer.\n");
1549 if( CLA->ShortSegDuration/4.0 < CLA->TruncSecs){
1550 fprintf(stderr,
"Short segment length t=%d is too small to accomodate truncation time requested.\n", CLA->ShortSegDuration);
1551 fprintf(stderr,
"Need short segment t(=%d) to be >= 4 x Truncation length (%f).\n",CLA->ShortSegDuration,CLA->TruncSecs);
1564 for (
m=0;
m < NTemplates;
m++)
int XLALStrToGPS(LIGOTimeGPS *t, const char *nptr, char **endptr)
const LALVCSInfo lalAppsVCSIdentInfo
Identable VCS and build information for LALApps.
void LALCheckMemoryLeaks(void)
int LALgetopt_long_only(int argc, char *const *argv, const char *options, const struct LALoption *long_options, int *opt_index)
#define required_argument
int XLALCloseLIGOLwXMLFile(LIGOLwXMLStream *xml)
LIGOLwXMLStream * XLALOpenLIGOLwXMLFile(const char *path)
int XLALWriteLIGOLwXMLSnglBurstTable(LIGOLwXMLStream *, const SnglBurst *)
int XLALWriteLIGOLwXMLProcessTable(LIGOLwXMLStream *, const ProcessTable *)
int XLALWriteLIGOLwXMLProcessParamsTable(LIGOLwXMLStream *, const ProcessParamsTable *)
int XLALWriteLIGOLwXMLSearchSummaryTable(LIGOLwXMLStream *, const SearchSummaryTable *)
SnglBurst * XLALSnglBurstTableFromLIGOLw(const char *filename)
TimeSlide * XLALTimeSlideTableFromLIGOLw(const char *filename)
SimBurst * XLALSimBurstTableFromLIGOLw(const char *filename)
struct CommandLineArgsTag CommandLineArgs
int XLALSnglBurstTableLength(SnglBurst *head)
int XLALCompareSnglBurstByPeakTimeAndSNR(const SnglBurst *const *a, const SnglBurst *const *b)
SnglBurst ** XLALSortSnglBurst(SnglBurst **head, int(*comparefunc)(const SnglBurst *const *, const SnglBurst *const *))
int DownSample(struct CommandLineArgsTag CLA, REAL8TimeSeries *ht)
int main(int argc, char *argv[])
static void XLALStringBurstCluster(SnglBurst *, const SnglBurst *)
cluster events a and b, storing result in a; takes one with largest snr
#define ADD_PROCESS_PARAM(process, type)
int FindStringBurst(struct CommandLineArgsTag CLA, REAL8TimeSeries *ht, unsigned seg_length, const StringTemplate *strtemplate, int NTemplates, REAL8FFTPlan *fplan, REAL8FFTPlan *rplan, SnglBurst **head)
int CreateTemplateBank(struct CommandLineArgsTag CLA, unsigned seg_length, REAL8FrequencySeries *Spec, StringTemplate *strtemplate, int *NTemplates, REAL8 *fcutoff_fix, int NTemplates_fix, REAL8FFTPlan *rplan)
static ProcessParamsTable ** add_process_param(ProcessParamsTable **proc_param, const ProcessTable *process, const char *type, const char *param, const char *value)
static int XLALCompareStringBurstByTime(const SnglBurst *const *, const SnglBurst *const *)
int FreeMem(StringTemplate *strtemplate, int NTemplates)
REAL8TimeSeries * ReadData(struct CommandLineArgsTag CLA)
static double compute_epsilon_minus_desired(double f_cut, void *params)
int ReadTemplateFile(struct CommandLineArgsTag CLA, int *NTemplates_fix, REAL8 *fcutoff_fix)
REAL8FrequencySeries * AvgSpectrum(struct CommandLineArgsTag CLA, REAL8TimeSeries *ht, unsigned seg_length, REAL8FFTPlan *fplan)
static double cluster_window
int ReadCommandLine(int argc, char *argv[], struct CommandLineArgsTag *CLA, const ProcessTable *process, ProcessParamsTable **paramaddpoint)
static void XLALClusterSnglBurstTable(SnglBurst **, int(*)(const SnglBurst *const *, const SnglBurst *const *), int(*)(const SnglBurst *const *, const SnglBurst *const *), void(*)(SnglBurst *, const SnglBurst *))
Recursively cluster a linked list of SnglBurst events until the list stops changing.
int OutputEvents(const struct CommandLineArgsTag *CLA, ProcessTable *proctable, ProcessParamsTable *procparamtable, SnglBurst *events)
int CreateStringFilters(struct CommandLineArgsTag CLA, REAL8TimeSeries *ht, unsigned seg_length, REAL8FrequencySeries *Spec, StringTemplate *strtemplate, int NTemplates, REAL8FFTPlan *fplan, REAL8FFTPlan *rplan)
static void compute_t2t2_and_t1t2(double power, const REAL8FrequencySeries *Spec, const REAL8Vector *integral, double last_templates_f_cut, double f_cut, double *t2t2, double *t1t2)
int AddInjections(struct CommandLineArgsTag CLA, REAL8TimeSeries *ht)
static double next_f_cut(double desired_epsilon, double string_spectrum_power, const REAL8FrequencySeries *Spec, const REAL8Vector *integral, double last_templates_f_cut, double last_templates_norm)
int FindEvents(struct CommandLineArgsTag CLA, const StringTemplate *strtemplate, const REAL8TimeSeries *vector, SnglBurst **head)
LIGOTimeGPS * XLALGPSTimeNow(LIGOTimeGPS *gpstime)
COMPLEX16FrequencySeries * XLALCreateCOMPLEX16FrequencySeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length)
REAL8FrequencySeries * XLALCreateREAL8FrequencySeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length)
void XLALDestroyREAL8FrequencySeries(REAL8FrequencySeries *series)
void XLALDestroyCOMPLEX16FrequencySeries(COMPLEX16FrequencySeries *series)
void XLALDestroyCache(LALCache *cache)
LALCache * XLALCacheImport(const char *fname)
#define XLAL_LAST_ELEM(x)
int XLALFrStreamClose(LALFrStream *stream)
LALFrStream * XLALFrStreamCacheOpen(LALCache *cache)
int XLALFrStreamSetMode(LALFrStream *stream, int mode)
LAL_FR_STREAM_VERBOSE_MODE
LALTYPECODE XLALFrStreamGetTimeSeriesType(const char *chname, LALFrStream *stream)
REAL8TimeSeries * XLALFrStreamReadREAL8TimeSeries(LALFrStream *stream, const char *chname, const LIGOTimeGPS *start, REAL8 duration, size_t lengthlimit)
REAL4TimeSeries * XLALFrStreamReadREAL4TimeSeries(LALFrStream *stream, const char *chname, const LIGOTimeGPS *start, REAL8 duration, size_t lengthlimit)
void LALDPrintFrequencySeries(REAL8FrequencySeries *series, const CHAR *filename)
void LALDPrintTimeSeries(REAL8TimeSeries *series, const CHAR *filename)
int XLALREAL8ReverseFFT(REAL8Vector *output, const COMPLEX16Vector *input, const REAL8FFTPlan *plan)
void XLALDestroyREAL8FFTPlan(REAL8FFTPlan *plan)
REAL8FFTPlan * XLALCreateReverseREAL8FFTPlan(UINT4 size, int measurelvl)
REAL8FFTPlan * XLALCreateForwardREAL8FFTPlan(UINT4 size, int measurelvl)
int XLALResampleREAL8TimeSeries(REAL8TimeSeries *series, REAL8 dt)
int XLALREAL8TimeFreqFFT(COMPLEX16FrequencySeries *freq, const REAL8TimeSeries *tser, const REAL8FFTPlan *plan)
int XLALREAL8FreqTimeFFT(REAL8TimeSeries *tser, const COMPLEX16FrequencySeries *freq, const REAL8FFTPlan *plan)
int XLALREAL8AverageSpectrumMedianMean(REAL8FrequencySeries *spectrum, const REAL8TimeSeries *tseries, UINT4 seglen, UINT4 stride, const REAL8Window *window, const REAL8FFTPlan *plan)
REAL8TimeSeries * XLALConvertREAL4TimeSeriesToREAL8(const REAL4TimeSeries *series)
void XLALDestroyREAL8TimeSeries(REAL8TimeSeries *series)
REAL8TimeSeries * XLALResizeREAL8TimeSeries(REAL8TimeSeries *series, int first, size_t length)
void XLALDestroyREAL4TimeSeries(REAL4TimeSeries *series)
REAL8TimeSeries * XLALCutREAL8TimeSeries(const REAL8TimeSeries *series, size_t first, size_t length)
REAL8TimeSeries * XLALCreateREAL8TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
const LALUnit lalStrainUnit
const LALUnit lalDimensionlessUnit
REAL8Vector * XLALCreateREAL8Vector(UINT4 length)
COMPLEX16Vector * XLALCreateCOMPLEX16Vector(UINT4 length)
void XLALDestroyREAL8Vector(REAL8Vector *vector)
void XLALDestroyCOMPLEX16Vector(COMPLEX16Vector *vector)
void XLALDestroyREAL8Window(REAL8Window *window)
REAL8Window * XLALCreateHannREAL8Window(UINT4 length)
#define XLAL_ERROR_NULL(...)
int int int XLALPrintInfo(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
LIGOTimeGPS * XLALGPSAdd(LIGOTimeGPS *epoch, REAL8 dt)
REAL8 XLALGPSDiff(const LIGOTimeGPS *t1, const LIGOTimeGPS *t0)
LIGOTimeGPS * XLALINT8NSToGPS(LIGOTimeGPS *epoch, INT8 ns)
INT8 XLALGPSToINT8NS(const LIGOTimeGPS *epoch)
int XLALBurstInjectSignals(REAL8TimeSeries *h, const SimBurst *sim_burst, const TimeSlide *time_slide_table_head, const COMPLEX16FrequencySeries *response)
const char *const vcsDate
const char *const vcsStatus
CHAR ifos[LIGOMETA_IFOS_MAX]
struct tagSnglBurst * next
REAL8FrequencySeries * StringFilter
COMPLEX16Vector * waveform_f
double last_templates_f_cut
const REAL8Vector * integral
double last_templates_norm
const REAL8FrequencySeries * Spec
double string_spectrum_power