Logo coherent WaveBurst  
Library Reference Guide
Logo
wavecor.hh
Go to the documentation of this file.
1 /*
2 # Copyright (C) 2019 Sergey Klimenko
3 #
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17 
18 
19 // Wavelet Analysis Tool
20 // Sergey Klimenko, University of Florida
21 // universal data container for x-correlation analysis
22 // used with DMT and ROOT
23 //
24 
25 #ifndef WAVECOR_HH
26 #define WAVECOR_HH
27 
28 #include <iostream>
29 #include "wavearray.hh"
30 #include <vector>
31 #include <list>
32 
33 typedef std::vector<int> vector_int;
34 
35 
36 class wavecor
37 {
38  public:
39 
40  // constructors
41 
42  //: Default constructor
43  wavecor();
44 
45  //: Copy constructor
46  //!param: value - object to copy from
47  wavecor(const wavecor&);
48 
49  //: destructor
50  virtual ~wavecor();
51 
52  // operators
53 
54  wavecor& operator= (const wavecor&);
55 
56  // accessors
57 
58  //: kendall x-correlation for two wavearrays;
59  //!param: two wavearrays, integration window, interval for time lag analysis
60  //! and skip parameter for running integration window
61  //! if skip=0 window is shifted by one sample
62  //!put x-correlation in this
64  double, double, size_t=0);
65 
66  //: initialize wavecor class from two wavearrays;
67  //!param: two wavearrays, integration window, interval for time lag analysis
68  //! and skip parameter for running integration window
69  //! if skip=0 window is shifted by one sample
70  //!put x-correlation in this
72  double, double, size_t=0);
73 
74  //:function for thresholding of x-correlation samples
75  //:A sample of x-correlation statistics is set to zero if module
76  //:of x-correlation is below a threshold defined by input parameter.
77  //:returns fraction of selected samples
78  virtual double select(double);
79 
80  //:coincidence with x-correlation sample defined by par2
81  //:coincidence window is defined by par1
82  //:sample in this is set to 0. if there are now non-zero samples
83  //:form input x-correlation sample in the window defined by par1
84  //!param: coincidence window, pointer to wavecor object
85  //:returns fraction of selected samples
86  virtual double coincidence(double, wavecor*);
87 
88 // data members
89 
90 //#ifndef __CINT__
91  float shift; // time shift
92  int ifo; // detector index: 1/2/3 - L1H1/H1H2/H2L1
93  int run; // run ID
94  double window; // integration window in seconds
95  double lagint; // lag interval in seconds
96 
97  //: x-correlaton
99  //: time delays
101  //: cluster list
102  std::list<vector_int> cList;
103 //#endif
104 
105  // used by THtml doc
106  ClassDef(wavecor,1)
107 
108 }; // class wavecor
109 
110 
111 #endif // WAVECOR_HH
std::vector< int > vector_int
Definition: wavecor.hh:33
virtual double select(double)
Definition: wavecor.cc:272
double window
Definition: wavecor.hh:94
std::list< vector_int > cList
Definition: wavecor.hh:102
virtual void init(wavearray< double > &, wavearray< double > &, double, double, size_t=0)
param: two wavearrays, integration window, interval for time lag analysis and skip parameter for runn...
Definition: wavecor.cc:184
double lagint
Definition: wavecor.hh:95
int ifo
Definition: wavecor.hh:92
float shift
Definition: wavecor.hh:91
int run
Definition: wavecor.hh:93
virtual void kendall(wavearray< double > &, wavearray< double > &, double, double, size_t=0)
param: two wavearrays, integration window, interval for time lag analysis and skip parameter for runn...
Definition: wavecor.cc:82
virtual ~wavecor()
Definition: wavecor.cc:60
wavearray< float > xcor
Definition: wavecor.hh:98
virtual double coincidence(double, wavecor *)
param: coincidence window, pointer to wavecor object
Definition: wavecor.cc:291
wavecor()
Definition: wavecor.cc:36
wavearray< float > xlag
Definition: wavecor.hh:100
wavecor & operator=(const wavecor &)
Definition: wavecor.cc:64