musrfit
1.9.2
|
#include <PFourier.h>
Public Member Functions | |
PFourier (TH1F *data, Int_t unitTag, Double_t startTime=0.0, Double_t endTime=0.0, Bool_t dcCorrected=false, UInt_t zeroPaddingPower=0) | |
virtual | ~PFourier () |
virtual void | Transform (UInt_t apodizationTag=0) |
virtual const char * | GetDataTitle () |
virtual const Int_t | GetUnitTag () |
virtual Double_t | GetResolution () |
virtual Double_t | GetMaxFreq () |
virtual TH1F * | GetRealFourier (const Double_t scale=1.0) |
virtual TH1F * | GetImaginaryFourier (const Double_t scale=1.0) |
virtual TH1F * | GetPowerFourier (const Double_t scale=1.0) |
virtual TH1F * | GetPhaseFourier (const Double_t scale=1.0) |
virtual Bool_t | IsValid () |
Static Public Member Functions | |
static TH1F * | GetPhaseOptRealFourier (const TH1F *re, const TH1F *im, std::vector< Double_t > &phase, const Double_t scale=1.0, const Double_t min=-1.0, const Double_t max=-1.0) |
Private Member Functions | |
virtual void | PrepareFFTwInputData (UInt_t apodizationTag) |
virtual void | ApodizeData (Int_t apodizationTag) |
Private Attributes | |
TH1F * | fData |
data histogram to be Fourier transformed. More... | |
Bool_t | fValid |
true = all boundary conditions fullfilled and hence a Fourier transform can be performed. More... | |
Int_t | fUnitTag |
1=Field Units (G), 2=Field Units (T), 3=Frequency Units (MHz), 4=Angular Frequency Units (Mc/s) More... | |
Int_t | fApodization |
0=none, 1=weak, 2=medium, 3=strong More... | |
Double_t | fTimeResolution |
time resolution of the data histogram in (us) More... | |
Double_t | fStartTime |
start time of the data histogram More... | |
Double_t | fEndTime |
end time of the data histogram More... | |
Bool_t | fDCCorrected |
if true, removed DC offset from signal before Fourier transformation, otherwise not More... | |
UInt_t | fZeroPaddingPower |
power for zero padding, if set < 0 no zero padding will be done More... | |
Double_t | fResolution |
Fourier resolution (field, frequency, or angular frequency) More... | |
UInt_t | fNoOfData |
number of bins in the time interval between fStartTime and fStopTime More... | |
UInt_t | fNoOfBins |
number of bins to be Fourier transformed. Might be different to fNoOfData due to zero padding More... | |
fftw_plan | fFFTwPlan |
fftw plan (see FFTW3 User Manual) More... | |
fftw_complex * | fIn |
real part of the Fourier transform More... | |
fftw_complex * | fOut |
imaginary part of the Fourier transform More... | |
muSR Fourier class.
Definition at line 97 of file PFourier.h.
PFourier::PFourier | ( | TH1F * | data, |
Int_t | unitTag, | ||
Double_t | startTime = 0.0 , |
||
Double_t | endTime = 0.0 , |
||
Bool_t | dcCorrected = false , |
||
UInt_t | zeroPaddingPower = 0 |
||
) |
Constructor.
data | data histogram |
unitTag | tag telling in which units the Fourier transform shall be represented. Possible tags are: FOURIER_UNIT_GAUSS, FOURIER_UNIT_TESLA, FOURIER_UNIT_FREQ, FOURIER_UNIT_CYCLES |
startTime | start time of the data time window |
endTime | end time of the data time window |
dcCorrected | if true, removed DC offset from signal before Fourier transformation, otherwise not |
zeroPaddingPower | if set to values > 0, there will be zero padding up to 2^zeroPaddingPower |
Definition at line 284 of file PFourier.cpp.
References F_APODIZATION_NONE, fApodization, fData, fEndTime, fFFTwPlan, fIn, fNoOfBins, fNoOfData, FOURIER_UNIT_CYCLES, FOURIER_UNIT_FREQ, FOURIER_UNIT_GAUSS, FOURIER_UNIT_TESLA, fOut, fResolution, fStartTime, fTimeResolution, fUnitTag, fValid, fZeroPaddingPower, GAMMA_BAR_MUON, and PI.
|
virtual |
|
privatevirtual |
Carries out the appodization of the data.
apodizationTag | apodization tag. Possible are currently: F_APODIZATION_NONE = no apodization, F_APODIZATION_WEAK = weak apodization, F_APODIZATION_MEDIUM = intermediate apodization, F_APODIZATION_STRONG = strong apodization |
Definition at line 788 of file PFourier.cpp.
References F_APODIZATION_MEDIUM, F_APODIZATION_NONE, F_APODIZATION_STRONG, F_APODIZATION_WEAK, fIn, and fNoOfData.
Referenced by PrepareFFTwInputData().
|
inlinevirtual |
Definition at line 107 of file PFourier.h.
References fData.
|
virtual |
returns the imaginary part Fourier as a histogram.
scale | normalisation factor |
Definition at line 594 of file PFourier.cpp.
References fData, fNoOfBins, fOut, fResolution, and fValid.
Referenced by PMusrCanvas::HandleDifferenceFourier(), and PMusrCanvas::HandleFourier().
|
virtual |
returns the maximal frequency in units choosen, i.e. Gauss, Tesla, MHz, Mc/s
Definition at line 433 of file PFourier.cpp.
References fNoOfBins, and fResolution.
|
virtual |
returns the Fourier phase spectrum as a histogram.
scale | normalisation factor |
Definition at line 678 of file PFourier.cpp.
References fData, fNoOfBins, fOut, fResolution, fValid, PI, and PI_HALF.
Referenced by PMusrCanvas::HandleDifferenceFourier(), and PMusrCanvas::HandleFourier().
|
static |
returns the phase corrected real Fourier transform.
re | real part Fourier histogram |
im | imaginary part Fourier histogram |
phase | return value of the optimal phase dispersion phase[0]+phase[1]*i/N |
scale | normalisation factor |
min | minimal freq / field from which to optimise. Given in the choosen unit. |
max | maximal freq / field up to which to optimise. Given in the choosen unit. |
Definition at line 500 of file PFourier.cpp.
References PFTPhaseCorrection::GetPhaseCorrectionParam(), PFTPhaseCorrection::IsValid(), and PFTPhaseCorrection::Minimize().
Referenced by PMusrCanvas::CalcPhaseOptReFT().
|
virtual |
returns the Fourier power spectrum as a histogram.
scale | normalisation factor |
Definition at line 636 of file PFourier.cpp.
References fData, fNoOfBins, fOut, fResolution, and fValid.
Referenced by PMusrCanvas::HandleDifferenceFourier(), and PMusrCanvas::HandleFourier().
|
virtual |
returns the real part Fourier as a histogram.
scale | normalisation factor |
Definition at line 452 of file PFourier.cpp.
References fData, fNoOfBins, fOut, fResolution, and fValid.
Referenced by PMusrCanvas::HandleDifferenceFourier(), and PMusrCanvas::HandleFourier().
|
inlinevirtual |
Definition at line 109 of file PFourier.h.
References fResolution.
|
inlinevirtual |
Definition at line 108 of file PFourier.h.
References fUnitTag.
|
inlinevirtual |
Definition at line 120 of file PFourier.h.
References fValid.
Referenced by PMusrCanvas::HandleDifferenceFourier(), and PMusrCanvas::HandleFourier().
|
privatevirtual |
Feeds the Fourier data and apply the apodization.
apodizationTag | apodization tag. Possible are currently: F_APODIZATION_NONE = no apodization, F_APODIZATION_WEAK = weak apodization, F_APODIZATION_MEDIUM = intermediate apodization, F_APODIZATION_STRONG = strong apodization |
Definition at line 739 of file PFourier.cpp.
References ApodizeData(), fData, fDCCorrected, fIn, fNoOfBins, fNoOfData, fStartTime, and fTimeResolution.
Referenced by Transform().
|
virtual |
Carries out the Fourier transform. It is assumed that fStartTime is the time zero for the Fourier frame. Hence if fStartTime != 0.0 the phase shift will be corrected.
apodizationTag | 0=no apod., 1=weak apod., 2=medium apod., 3=strong apod. |
Definition at line 398 of file PFourier.cpp.
References fData, fFFTwPlan, fNoOfBins, fOut, fStartTime, fTimeResolution, fValid, PI, and PrepareFFTwInputData().
Referenced by PMusrCanvas::HandleDifferenceFourier(), and PMusrCanvas::HandleFourier().
|
private |
0=none, 1=weak, 2=medium, 3=strong
Definition at line 128 of file PFourier.h.
Referenced by PFourier().
|
private |
data histogram to be Fourier transformed.
Definition at line 123 of file PFourier.h.
Referenced by GetDataTitle(), GetImaginaryFourier(), GetPhaseFourier(), GetPowerFourier(), GetRealFourier(), PFourier(), PrepareFFTwInputData(), and Transform().
|
private |
if true, removed DC offset from signal before Fourier transformation, otherwise not
Definition at line 133 of file PFourier.h.
Referenced by PrepareFFTwInputData().
|
private |
|
private |
fftw plan (see FFTW3 User Manual)
Definition at line 139 of file PFourier.h.
Referenced by PFourier(), Transform(), and ~PFourier().
|
private |
real part of the Fourier transform
Definition at line 140 of file PFourier.h.
Referenced by ApodizeData(), PFourier(), PrepareFFTwInputData(), and ~PFourier().
|
private |
number of bins to be Fourier transformed. Might be different to fNoOfData due to zero padding
Definition at line 138 of file PFourier.h.
Referenced by GetImaginaryFourier(), GetMaxFreq(), GetPhaseFourier(), GetPowerFourier(), GetRealFourier(), PFourier(), PrepareFFTwInputData(), and Transform().
|
private |
number of bins in the time interval between fStartTime and fStopTime
Definition at line 137 of file PFourier.h.
Referenced by ApodizeData(), PFourier(), and PrepareFFTwInputData().
|
private |
imaginary part of the Fourier transform
Definition at line 141 of file PFourier.h.
Referenced by GetImaginaryFourier(), GetPhaseFourier(), GetPowerFourier(), GetRealFourier(), PFourier(), Transform(), and ~PFourier().
|
private |
Fourier resolution (field, frequency, or angular frequency)
Definition at line 135 of file PFourier.h.
Referenced by GetImaginaryFourier(), GetMaxFreq(), GetPhaseFourier(), GetPowerFourier(), GetRealFourier(), GetResolution(), and PFourier().
|
private |
start time of the data histogram
Definition at line 131 of file PFourier.h.
Referenced by PFourier(), PrepareFFTwInputData(), and Transform().
|
private |
time resolution of the data histogram in (us)
Definition at line 130 of file PFourier.h.
Referenced by PFourier(), PrepareFFTwInputData(), and Transform().
|
private |
1=Field Units (G), 2=Field Units (T), 3=Frequency Units (MHz), 4=Angular Frequency Units (Mc/s)
Definition at line 126 of file PFourier.h.
Referenced by GetUnitTag(), and PFourier().
|
private |
true = all boundary conditions fullfilled and hence a Fourier transform can be performed.
Definition at line 125 of file PFourier.h.
Referenced by GetImaginaryFourier(), GetPhaseFourier(), GetPowerFourier(), GetRealFourier(), IsValid(), PFourier(), and Transform().
|
private |
power for zero padding, if set < 0 no zero padding will be done
Definition at line 134 of file PFourier.h.
Referenced by PFourier().