34 for(
int i=0;
i<
N;
i++) h[
i] =
rnd.Gaus();
38 double omega = TMath::TwoPi()*100;
39 for(
int i=0;
i<
N;
i++) h[
i] += sin(omega*
i*T);
54 for(
int i=0;
i<
N;
i++) x[
i] = 0.1*
rnd.Gaus();
57 omega = TMath::TwoPi()*100;
58 for(
int i=0;
i<
N;
i++) x[
i] += 0.25*sin(omega*
i*T);
62 r.
add(tfmap,const_cast<char*>(
"hchannel"));
65 r.
add(x,const_cast<char*>(
"witness"));
97 TCanvas *
c1 =
new TCanvas(
"comp",
"comp",0,0,800,600);
104 plot.plot(h,const_cast<char*>(
"alp"), 1, totalscratch, totalscratch+
LENGHT,
true,
F1,
F2,
true, 50);
106 plot.plot(clean,const_cast<char*>(
"same"), 2, totalscratch, totalscratch+
LENGHT,
true,
F1,
F2,
true, 50);
107 plot.graph[0]->SetTitle(
"Black : noisy data | Red : cleaned data");
111 plot.plot(h,const_cast<char*>(
"alp"), 1, totalscratch, totalscratch+
LENGHT,
true,
F1,
F2,
true, 50);
113 plot.plot(clean,const_cast<char*>(
"same"), 2, totalscratch, totalscratch+
LENGHT,
true,
F1,
F2,
true, 50);
114 plot.graph[2]->SetTitle(
"Black : noisy data | Red : cleaned data");
118 plot.plot(h,const_cast<char*>(
"alp"), 1, totalscratch, totalscratch+
LENGHT,
true,
F1,
F2,
true, 50);
120 plot.plot(clean,const_cast<char*>(
"same"), 2, totalscratch, totalscratch+
LENGHT,
true,
F1,
F2,
true, 50);
121 plot.graph[4]->SetTitle(
"Black : noisy data | Red : cleaned data");
125 plot.plot(h,const_cast<char*>(
"alp"), 1, totalscratch, totalscratch+
LENGHT,
true,
F1,
F2,
true, 50);
127 plot.plot(clean,const_cast<char*>(
"same"), 2, totalscratch, totalscratch+
LENGHT,
true,
F1,
F2,
true, 50);
128 plot.graph[6]->SetTitle(
"Black : noisy data | Red : cleaned data");
130 c1->SaveAs(
"Regression_Sine_parameters.png");
void setMatrix(double edge=0., double f=1.)
virtual void rate(double r)
cout<< endl;cout<< "ts size = "<< ts.size()<< " ts rate = "<< ts.rate()<< endl;tf.Forward(ts, wdm);int levels=tf.getLevel();cout<< "tf size = "<< tf.size()<< endl;double dF=tf.resolution();double dT=1./(2 *dF);cout<< "rate(hz) : "<< RATE<< "\ layers : "<< nLAYERS<< "\ dF(hz) : "<< dF<< "\ dT(ms) : "<< dT *1000.<< endl;int itime=TIME_PIXEL_INDEX;int ifreq=FREQ_PIXEL_INDEX;int index=(levels+1) *itime+ifreq;double time=itime *dT;double freq=(ifreq >0) ? ifreq *dF :dF/4;cout<< endl;cout<< "PIXEL TIME = "<< time<< " sec "<< endl;cout<< "PIXEL FREQ = "<< freq<< " Hz "<< endl;cout<< endl;wavearray< double > x
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')
void solve(double th, int nE=0, char c='s')
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)