Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CWB_Plugin_Linear_Bilinear_Regression_Config.C
Go to the documentation of this file.
1 {
2  //!REGRESSION
3  // Config Plugin for linear/bilinear regression analysis for one detector
4 
5  //---------------------------------------------------------------------
6  // REGRESSION MAIN
7  //---------------------------------------------------------------------
8 
9  bool EXIT_AFTER_REGRESSION = true; // if true cwb terminate after the regression analysis
10  bool APPLY_LINEAR_REGRESSION = true; // if true then linear regression is applied
11  bool APPLY_BILINEAR_REGRESSION = false; // if true then blinear regression is applied;
12  bool SAVE_INFRAME = false; // if true the input data are saved to frame files
13  bool SAVE_OUTFRAME = false; // if true the cleaned data are saved to frame files
14  bool SAVE_PSD_PLOT = true; // if true psd cleaned vs noisy data are saved to png
15  bool SAVE_EIGEN_PLOT = true; // if true the regression filter eigenvaules are saved to png
16  int CUT_LOW_FREQ = 32; // if > 0 the data in [0:CUT_LOW_FREQ] are set to 0
17 
18  TString OFRDIR = "oframes";
19  TString FRNAME = "LHO_4k";
20  TString FRLABEL = "H-H1_LDAS_C02_L2";
21 
22  bool DISABLE_MDC_FROM_FRAMES = true; // if true then disable read mdc from frames
23  bool DISABLE_MDC_FROM_PLUGIN = true; // if true then disable read mdc from plugin
24 
25  //---------------------------------------------------------------------
26  // REGRESSION PARAMETERS FOR H1
27  //---------------------------------------------------------------------
28 
29  TString FRLIST_WITNESS = "input/H1_RDS_R_L1_937473000_947017000.frl";
30  TString CHLIST_LINEAR = "input/S6B_H1_Linear_Regression_Channel_List.txt";
31  TString CHLIST_BILINEAR = "input/S6B_H1_Bilinear_Regression_Channel_List.txt";
32 
33  TString CHNAME_LINEAR = "H0:PEM-COIL_MAGX";
34 
35  int RESAMPLING_INDEX = 11; // resample target/witness channels to pow(2,RESAMPLING_INDEX)
36 
37  double WFLOW = 0; // lower frequency used to made the bilinear channels
38  double WFHIGH = 10; // high frequency used to made the bilinear channels
39 
40  //---------------------------------------------------------------------
41  // REGRESSION PARAMETERS
42  //---------------------------------------------------------------------
43 
44  double LAYER_WIDTH = 1.0; // frequency layer resolution used in the regression analysis
45  double fPOWERLINE = 60.0; // powerline frequency (Hz)
46  int lPOWERLINE = 1; // low power line harmonic (lPOWERLINE*fPOWERLINE)
47  int hPOWERLINE = 5; // high power line harmonic (hPOWERLINE*fPOWERLINE)
48  double FWIDTH = 5; // frequency width used by regression
49 
50  // PARAMETERS FOR LINEAR REGRESSION
51 
52  int L_NFILTER = 5; // half-size length of a unit filter (setFilter)
53  double L_APPLY_THRESHOLD = 0.2; // threshold used in apply
54  double L_SOLVE_THRESHOLD = 0.0; // eigenvalue threshold (solve)
55  double L_SOLVE_NEIGEN_PER_LAYER = 0; // number of selected eigenvalues (solve)
56  char L_SOLVE_REGULATOR = 'h'; // regulator (solve)
57 
58  // PARAMETERS FOR BILINEAR REGRESSION
59 
60  int B_NFILTER = 5; // half-size length of a unit filter (setFilter)
61  double B_APPLY_THRESHOLD = 0.2; // threshold used in apply
62  double B_SOLVE_THRESHOLD = 0.0; // eigenvalue threshold (solve)
63  double B_SOLVE_NEIGEN_PER_LAYER = 0; // number of selected eigenvalues (solve)
64  char B_SOLVE_REGULATOR = 'h'; // regulator (solve)
65 
66  //---------------------------------------------------------------------
67  // MDC
68  //---------------------------------------------------------------------
69 
70  if(type==CWB_PLUGIN_MDC && !DISABLE_MDC_FROM_PLUGIN) {
71 
72  network** net;
74 
75  int seed = (*net)->nRun; // WARNING : seed must be the same for each detector within the same job
76 
77  CWB::mdc* MDC;
79 
80  char wf_name[256];
81  waveform wf;
82  vector<mdcpar> par;
83 
84  for(int n=1;n<=5;n++) {
85 
86  par.resize(2);
87  par[0].name="frequency"; par[0].value=n*60.-2;
88  par[1].name="Q"; par[1].value=100.;
89  MDC->AddWaveform(MDC_SGC, par);
90 
91  par.resize(2);
92  par[0].name="frequency"; par[0].value=n*60.;
93  par[1].name="Q"; par[1].value=100.;
94  MDC->AddWaveform(MDC_SGC, par);
95 
96  par.resize(2);
97  par[0].name="frequency"; par[0].value=n*60.+2;
98  par[1].name="Q"; par[1].value=100.;
99  MDC->AddWaveform(MDC_SGC, par);
100 
101  }
102 
103  //MDC->Print();
104 
105  // --------------------------------------------------------
106  // define injection parameters
107  // --------------------------------------------------------
108  MDC->SetInjHrss(2.5e-21);
109  MDC->SetInjRate(0.0333333);
110  MDC->SetInjJitter(1.0);
111 
112  // --------------------------------------------------------
113  // define sky distribution
114  // --------------------------------------------------------
115  par.resize(3);
116  par[0].name="entries";par[0].value=100000; // pool of events
117  par[1].name="rho_min";par[1].value=1; // min rho // Mpc
118  par[2].name="rho_max";par[2].value=1; // max rho // Mpc
119  MDC->SetSkyDistribution(MDC_RANDOM,par,seed);
120  }
121 }
Definition: mdc.hh:189
void SetInjRate(double inj_rate=MDC_INJ_RATE)
Definition: mdc.hh:279
int n
Definition: cwb_net.C:10
TString("c")
CWB::mdc * MDC
waveform wf
mdcid AddWaveform(MDC_TYPE mdc_type, vector< mdcpar > par, TString uname="")
Definition: mdc.cc:445
network ** net
NOISE_MDC_SIMULATION.
void SetSkyDistribution(MDC_DISTRIBUTION sky_distribution, vector< mdcpar > par, int seed=0, bool add=false)
Definition: mdc.cc:3415
Definition: mdc.hh:216
Definition: mdc.hh:121
void SetInjJitter(double inj_jitter=MDC_INJ_JITTER)
Definition: mdc.hh:285
vector< mdcpar > par
double e
#define CWB_PLUGIN_IMPORT(TYPE, VAR)
Definition: CWB_Plugin.h:6
char wf_name[256]
void SetInjHrss(double inj_hrss=MDC_INJ_HRSS)
Definition: mdc.hh:275
TString name
Definition: mdc.hh:178