17 double omega = TMath::TwoPi()*100;
36 for(
int i=0;
i<
N;
i++) h[
i] += sin(omega*
i*T);
52 for(
int i=0;
i<
N;
i++) x[
i] = 0.1*
rnd.Gaus();
56 for(
int i=0;
i<
N;
i++) x[
i] += 0.25*sin(omega*
i*T);
60 r.
add(tfmap,const_cast<char*>(
"hchannel"));
67 r.
add(x,const_cast<char*>(
"witness"));
78 plot.
plot(h,const_cast<char*>(
"alp"), 1, totalscratch, totalscratch+
LENGHT,
true,
F1,
F2,
true, 50);
80 plot.
plot(clean,const_cast<char*>(
"same"), 2, totalscratch, totalscratch+
LENGHT,
true,
F1,
F2,
true, 50);
81 plot.
graph[0]->SetTitle(
"Black : noisy data | Red : cleaned data");
82 plot >>
const_cast<char*
>(
"Regression_Sine.png");
87 cout <<
"Ranking:" << endl;
88 for (
int i=0;
i<freq.size();
i++) cout << freq.
data[
i] <<
" " << rank.
data[
i] << endl;
92 cout <<
"Eigen-values" << endl;
95 for (
int j=0;
j<eigen[0].size();
j++)
97 for (
int i=0;
i<freq.size();
i++)
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
std::vector< TGraph * > graph
size_t add(WSeries< double > &target, char *name, double fL=0., double fH=0.)
virtual void start(double s)
void plot(wavearray< double > &, char *=NULL, int=1, double=0., double=0., bool=false, float=0., float=0., bool=false, float=0., bool=false)
void apply(double threshold=0., char c='a')
wavearray< double > getRank(int n)
printf("total live time: non-zero lags = %10.1f \, liveTot)
void solve(double th, int nE=0, char c='s')
wavearray< double > vfreq
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)