21 double omega = TMath::TwoPi()*100;
43 for(
int i=0;
i<
N;
i++) witness[
i] =
rnd.Gaus();
45 for(
int i=0;
i<
N;
i++) {
46 double f = double(
i)*
df;
47 witness[
i]*=1000.*exp(-pow(2*(f-2.)/1.,2));
51 for(
int i=0;
i<
N;
i++) witness[
i] += 0.01*
rnd.Gaus();
60 for(
int i=0;
i<
N;
i++) line_100hz[
i] = sin((omega)*
i*dt);
64 for(
int i=0;
i<
N;
i++) line_102hz[
i] = 0.2*sin((omega+omega_lf)*
i*dt);
69 for(
int i=0;
i<
N;
i++) {
70 double f = double(
i)*
df;
71 if(f<=1) witness_tf[
i]*=0.35*(pow(1-1,4)+1);
72 if(f>1&&f<3) witness_tf[
i]*=0.35*(pow(f-1,4)+1);
73 if(f>=3) witness_tf[
i]*=0.35*(pow(3-1,4)+1);
77 plot.graph[0]->SetTitle(
"Black : Witness Channel - Red : After Transfer Function");;
80 for(
int i=0;
i<
N;
i++) target[
i] += line_100hz[
i] + line_102hz[
i] + 50.*line_100hz[
i]*witness_tf[
i];
85 plot.graph[2]->SetTitle(
"Gauss + 100Hz Line + bicoherence 100Hz line & 2Hz line + 102Hz line");;
114 r.
solve(0., 20,
's');
123 plot.graph[3]->SetTitle(
"Black : noisy data | Red : cleaned data");;
129 for(
int i=0;
i<
N;
i++) clean[
i] -= line_100hz[
i];
130 for(
int i=0;
i<
N;
i++) clean[
i] -= line_102hz[
i];
132 plot.graph[5]->GetHistogram()->GetYaxis()->SetRangeUser(0.015,2.8);;
133 plot.graph[5]->SetTitle(
"cleaned data, black: original, red: after subtraction of injected 100Hz & 102Hz lines");;
136 c1->SaveAs(
"Regression_Sine_Gaus_Bic.png");
141 cout <<
"Ranking:" << endl;
142 for (
int i=0;
i<freq.
size();
i++) cout << freq.
data[
i] <<
" " << rank.
data[
i] << endl;
146 cout <<
"Eigen-values" << endl;
149 for (
int j=0;
j<eigen[0].size();
j++) {
virtual size_t size() const
void setMatrix(double edge=0., double f=1.)
printf("total live time: non-zero lags = %10.1f \n", liveTot)
virtual void rate(double r)
wavearray< double > target
cout<< "skymap size : "<< L<< endl;for(int l=0;l< L;l++) sm.set(l, l);sm > const_cast< char * >("skymap.dat")
size_t add(WSeries< double > &target, char *name, double fL=0., double fH=0.)
virtual void start(double s)
void apply(double threshold=0., char c='a')
wavearray< double > getRank(int n)
void solve(double th, int nE=0, char c='s')
wavearray< double > vfreq
plot plot(witness_tf, const_cast< char * >("same"), 2, totalscratch, totalscratch+LENGHT, true, 0, 5, true, 50)
wavearray< double > getVEIGEN(int n=-1)
wavearray< double > getClean()
WDM< double > wdtf(lev, 2 *lev, 6, 10)
virtual void stop(double s)
void Forward(int n=-1)
param: wavelet - n is number of steps (-1 means full decomposition)
void unmask(int n, double flow=0., double fhigh=0.)
void mask(int n, double flow=0., double fhigh=0.)
virtual void resize(unsigned int)