Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALApps 10.1.0.1-b246709
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
StringSearch.c File Reference

Prototypes

int ReadCommandLine (int argc, char *argv[], struct CommandLineArgsTag *CLA, const ProcessTable *process, ProcessParamsTable **paramaddpoint)
 
int ReadTemplateFile (struct CommandLineArgsTag CLA, int *NTemplates_fix, REAL8 *fcutoff_fix)
 
REAL8TimeSeriesReadData (struct CommandLineArgsTag CLA)
 
int AddInjections (struct CommandLineArgsTag CLA, REAL8TimeSeries *ht)
 
int DownSample (struct CommandLineArgsTag CLA, REAL8TimeSeries *ht)
 
REAL8FrequencySeriesAvgSpectrum (struct CommandLineArgsTag CLA, REAL8TimeSeries *ht, unsigned seg_length, REAL8FFTPlan *fplan)
 
int CreateTemplateBank (struct CommandLineArgsTag CLA, unsigned seg_length, REAL8FrequencySeries *Spec, StringTemplate *strtemplate, int *NTemplates, REAL8 *fcutoff_fix, int NTemplates_fix, REAL8FFTPlan *rplan)
 
int CreateStringFilters (struct CommandLineArgsTag CLA, REAL8TimeSeries *ht, unsigned seg_length, REAL8FrequencySeries *Spec, StringTemplate *strtemplate, int NTemplates, REAL8FFTPlan *fplan, REAL8FFTPlan *rplan)
 
int FindStringBurst (struct CommandLineArgsTag CLA, REAL8TimeSeries *ht, unsigned seg_length, const StringTemplate *strtemplate, int NTemplates, REAL8FFTPlan *fplan, REAL8FFTPlan *rplan, SnglBurst **head)
 
int FindEvents (struct CommandLineArgsTag CLA, const StringTemplate *strtemplate, const REAL8TimeSeries *vector, SnglBurst **head)
 
int OutputEvents (const struct CommandLineArgsTag *CLA, ProcessTable *proctable, ProcessParamsTable *procparamtable, SnglBurst *events)
 
int FreeMem (StringTemplate *strtemplate, int NTemplates)
 
static int XLALCompareStringBurstByTime (const SnglBurst *const *, const SnglBurst *const *)
 
static void XLALStringBurstCluster (SnglBurst *a, const SnglBurst *b)
 cluster events a and b, storing result in a; takes one with largest snr More...
 
static void XLALClusterSnglBurstTable (SnglBurst **list, int(*bailoutfunc)(const SnglBurst *const *, const SnglBurst *const *), int(*testfunc)(const SnglBurst *const *, const SnglBurst *const *), void(*clusterfunc)(SnglBurst *, const SnglBurst *))
 Recursively cluster a linked list of SnglBurst events until the list stops changing. More...
 
int main (int argc, char *argv[])
 
static ProcessParamsTable ** add_process_param (ProcessParamsTable **proc_param, const ProcessTable *process, const char *type, const char *param, const char *value)
 
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)
 
static double compute_epsilon_minus_desired (double f_cut, void *params)
 
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)
 

Go to the source code of this file.

Data Structures

struct  CommandLineArgsTag
 
struct  StringTemplate
 
struct  compute_epsilon_minus_desired_params
 

Macros

#define TESTSTATUS(pstat)    if ( (pstat)->statusCode ) { REPORTSTATUS(pstat); return 100; } else ((void)0)
 
#define MAXTEMPLATES   50
 
#define PROGRAM_NAME   "StringSearch"
 
#define CVS_REVISION   "$Revision$"
 
#define CVS_SOURCE   "$Source$"
 
#define CVS_DATE   "$Date$"
 
#define ADD_PROCESS_PARAM(process, type)    do { paramaddpoint = add_process_param(paramaddpoint, process, type, long_options[option_index].name, LALoptarg); } while(0)
 

Variables

static double cluster_window
 

Macro Definition Documentation

◆ TESTSTATUS

#define TESTSTATUS (   pstat)     if ( (pstat)->statusCode ) { REPORTSTATUS(pstat); return 100; } else ((void)0)

Definition at line 79 of file StringSearch.c.

◆ MAXTEMPLATES

#define MAXTEMPLATES   50

Definition at line 82 of file StringSearch.c.

◆ PROGRAM_NAME

#define PROGRAM_NAME   "StringSearch"

Definition at line 87 of file StringSearch.c.

◆ CVS_REVISION

#define CVS_REVISION   "$Revision$"

Definition at line 88 of file StringSearch.c.

◆ CVS_SOURCE

#define CVS_SOURCE   "$Source$"

Definition at line 89 of file StringSearch.c.

◆ CVS_DATE

#define CVS_DATE   "$Date$"

Definition at line 90 of file StringSearch.c.

◆ ADD_PROCESS_PARAM

#define ADD_PROCESS_PARAM (   process,
  type 
)     do { paramaddpoint = add_process_param(paramaddpoint, process, type, long_options[option_index].name, LALoptarg); } while(0)

Definition at line 453 of file StringSearch.c.

Function Documentation

◆ ReadCommandLine()

int ReadCommandLine ( int  argc,
char argv[],
struct CommandLineArgsTag CLA,
const ProcessTable process,
ProcessParamsTable **  paramaddpoint 
)

Definition at line 1163 of file StringSearch.c.

◆ ReadTemplateFile()

int ReadTemplateFile ( struct CommandLineArgsTag  CLA,
int NTemplates_fix,
REAL8 fcutoff_fix 
)

Definition at line 1118 of file StringSearch.c.

◆ ReadData()

REAL8TimeSeries * ReadData ( struct CommandLineArgsTag  CLA)

Definition at line 1017 of file StringSearch.c.

◆ AddInjections()

int AddInjections ( struct CommandLineArgsTag  CLA,
REAL8TimeSeries ht 
)

Definition at line 406 of file StringSearch.c.

◆ DownSample()

int DownSample ( struct CommandLineArgsTag  CLA,
REAL8TimeSeries ht 
)

Definition at line 1010 of file StringSearch.c.

◆ AvgSpectrum()

REAL8FrequencySeries * AvgSpectrum ( struct CommandLineArgsTag  CLA,
REAL8TimeSeries ht,
unsigned  seg_length,
REAL8FFTPlan *  fplan 
)

Definition at line 981 of file StringSearch.c.

◆ CreateTemplateBank()

int CreateTemplateBank ( struct CommandLineArgsTag  CLA,
unsigned  seg_length,
REAL8FrequencySeries Spec,
StringTemplate strtemplate,
int NTemplates,
REAL8 fcutoff_fix,
int  NTemplates_fix,
REAL8FFTPlan *  rplan 
)

Definition at line 823 of file StringSearch.c.

◆ CreateStringFilters()

int CreateStringFilters ( struct CommandLineArgsTag  CLA,
REAL8TimeSeries ht,
unsigned  seg_length,
REAL8FrequencySeries Spec,
StringTemplate strtemplate,
int  NTemplates,
REAL8FFTPlan *  fplan,
REAL8FFTPlan *  rplan 
)

Definition at line 655 of file StringSearch.c.

◆ FindStringBurst()

int FindStringBurst ( struct CommandLineArgsTag  CLA,
REAL8TimeSeries ht,
unsigned  seg_length,
const StringTemplate strtemplate,
int  NTemplates,
REAL8FFTPlan *  fplan,
REAL8FFTPlan *  rplan,
SnglBurst **  head 
)

Definition at line 601 of file StringSearch.c.

◆ FindEvents()

int FindEvents ( struct CommandLineArgsTag  CLA,
const StringTemplate strtemplate,
const REAL8TimeSeries vector,
SnglBurst **  head 
)

Definition at line 516 of file StringSearch.c.

◆ OutputEvents()

int OutputEvents ( const struct CommandLineArgsTag CLA,
ProcessTable proctable,
ProcessParamsTable procparamtable,
SnglBurst events 
)

Definition at line 458 of file StringSearch.c.

◆ FreeMem()

int FreeMem ( StringTemplate strtemplate,
int  NTemplates 
)

Definition at line 1561 of file StringSearch.c.

◆ XLALCompareStringBurstByTime()

static int XLALCompareStringBurstByTime ( const SnglBurst *const a,
const SnglBurst *const b 
)
static

Definition at line 332 of file StringSearch.c.

◆ XLALStringBurstCluster()

static void XLALStringBurstCluster ( SnglBurst a,
const SnglBurst b 
)
static

cluster events a and b, storing result in a; takes one with largest snr

Definition at line 351 of file StringSearch.c.

◆ XLALClusterSnglBurstTable()

static void XLALClusterSnglBurstTable ( SnglBurst **  list,
int(*)(const SnglBurst *const *, const SnglBurst *const *)  bailoutfunc,
int(*)(const SnglBurst *const *, const SnglBurst *const *)  testfunc,
void(*)(SnglBurst *, const SnglBurst *)  clusterfunc 
)
static

Recursively cluster a linked list of SnglBurst events until the list stops changing.

testfunc() should return 0 if the two given events are to be clustered. If bailoutfunc() is provided (not NULL), then testfunc() will be used to sort the trigger list before each clustering pass and bailoutfunc() will be called to check for the option of terminating the inner loop early. In the ideal case, use of bailoutfunc() converts this algorithm from O(n^3) to order O(n log n). The clusterfunc() should replace the SnglBurst event pointed to by its first argument with the cluster of that event and the event pointed to by the second argument.

Definition at line 372 of file StringSearch.c.

◆ main()

int main ( int  argc,
char argv[] 
)

Definition at line 197 of file StringSearch.c.

◆ add_process_param()

static ProcessParamsTable ** add_process_param ( ProcessParamsTable **  proc_param,
const ProcessTable process,
const char type,
const char param,
const char value 
)
static

Definition at line 441 of file StringSearch.c.

◆ compute_t2t2_and_t1t2()

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 
)
static

Definition at line 731 of file StringSearch.c.

◆ compute_epsilon_minus_desired()

static double compute_epsilon_minus_desired ( double  f_cut,
void *  params 
)
static

Definition at line 759 of file StringSearch.c.

◆ next_f_cut()

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 
)
static

Definition at line 782 of file StringSearch.c.

Variable Documentation

◆ cluster_window

double cluster_window
static

Definition at line 144 of file StringSearch.c.