ROOT Version: 6.26/02
Hi everyone,
this is my first time posting on this forum so please tell me if I’m missing something or doing something wrong.
I am trying to get the time evolution of the frequency content of a signal.
I know how to compute the FFT of the signal; more precisly the following function is the one I’m using in my macro to get the FFT of the signal.
void FFT() {
TCanvas *c3 = new TCanvas("c3", "FFT", 800, 600);
TPad *c1_1 = new TPad("c1_1", "c1_1",0.01,0.51,0.49,0.99);
TPad *c1_2 = new TPad("c1_2", "c1_2",0.51,0.51,0.99,0.99);
TPad *c1_3 = new TPad("c1_3", "c1_3",0.01,0.01,0.49,0.50);
TPad *c1_4 = new TPad("c1_4", "c1_4",0.51,0.01,0.99,0.50);
c1_1->SetFillColor(45);
c1_1->SetFrameFillColor(40);
c1_2->SetFillColor(45);
c1_2->SetFrameFillColor(40);
c1_3->SetFillColor(45);
c1_3->SetFrameFillColor(40);
c1_4->SetFillColor(45);
c1_4->SetFrameFillColor(40);
c1_1->Draw();
c1_2->Draw();
c1_3->Draw();
c1_4->Draw();
TH1 *ss_mag=0;
TH1 *cs_mag=0;
TH1 *ss_ph=0;
TH1 *cs_ph=0;
TVirtualFFT::SetTransform(0);
ss_mag = gs_histo->FFT(ss_mag, "MAG");
cs_mag = gc_histo->FFT(cs_mag, "MAG");
ss_ph = gs_histo->FFT(ss_ph, "PH");
cs_ph = gc_histo->FFT(cs_ph, "PH");
c1_1->cd();
ss_mag->Draw();
ss_mag->SetTitle("Magnitude of straight polarization FFT");
c1_2->cd();
cs_mag->Draw();
cs_mag->SetTitle("Magnitude of cross polarization FFT");
c1_3->cd();
ss_ph->Draw();
ss_ph->SetTitle("Phase of streight polarization FFT");
c1_4->cd();
cs_ph->Draw();
cs_ph->SetTitle("Phase of cross polarization FFT");
}
Since all the FFT data is stored in the histograms “gs_histo” and “gc_histo” what shall I do to get the necessary information to make a plot of the signal’s frequency content time evolution?
I have tried to get a grasp of what the TSpectrum class is about or what its use is but I think I’m hitting a dead end.
Thanks in advance for helping me out!