improved Fourier transform. For details see the ChangeLog

This commit is contained in:
2012-11-19 13:27:37 +00:00
parent 11d710bce3
commit 17d7ef4b99
22 changed files with 167 additions and 104 deletions

View File

@@ -34,14 +34,13 @@
#include "fftw3.h"
#include "PMusr.h"
#define F_APODIZATION_NONE 1
#define F_APODIZATION_WEAK 2
#define F_APODIZATION_MEDIUM 3
#define F_APODIZATION_STRONG 4
// gamma_muon / (2 pi) = 1.355342e-2 (MHz/G)
#define F_GAMMA_BAR_MUON 1.355342e-2
/**
* muSR Fourier class.
*/
@@ -50,7 +49,7 @@ class PFourier
public:
PFourier(TH1F *data, Int_t unitTag,
Double_t startTime = 0.0, Double_t endTime = 0.0,
UInt_t zeroPaddingPower = 0);
Bool_t dcCorrected = false, UInt_t zeroPaddingPower = 0);
virtual ~PFourier();
virtual void Transform(UInt_t apodizationTag = 0);
@@ -74,6 +73,7 @@ class PFourier
Double_t fTimeResolution; ///< time resolution of the data histogram
Double_t fStartTime; ///< start time of the data histogram
Double_t fEndTime; ///< end time of the data histogram
Bool_t fDCCorrected; ///< if true, removed DC offset from signal before Fourier transformation, otherwise not
UInt_t fZeroPaddingPower; ///< power for zero padding, if set < 0 no zero padding will be done
Double_t fResolution; ///< Fourier resolution (field, frequency, or angular frequency)

View File

@@ -55,6 +55,12 @@ using namespace std;
// muon life time in (us), see PRL99, 032001 (2007)
#define PMUON_LIFETIME 2.197019
// muon gyromagnetic ratio, see gamma_mu = 2.0 mu_mu / hbar
// mu_mu = -4.49044807(15) 1e-26 J/T (see http://physics.nist.gov/cgi-bin/cuu/Results?search_for=muon)
// hbar = 1.054571726(47) 1e-34 Js (see http://physics.nist.gov/cgi-bin/cuu/Value?hbar|search_for=universal_in!)
// gamma_muon / (2 pi) = 1.355342e-2 (MHz/G)
#define GAMMA_BAR_MUON 1.35538817e-2
// accelerator cycles in (us), needed to determine proper background
#define ACCEL_PERIOD_PSI 0.01975
#define ACCEL_PERIOD_TRIUMF 0.04337
@@ -654,6 +660,7 @@ typedef vector<PMsrRunBlock> PMsrRunList;
typedef struct {
Bool_t fFourierBlockPresent; ///< flag indicating if a Fourier block is present in the msr-file
Int_t fUnits; ///< flag used to indicate the units. 0=field units (G); 1=frequency units (MHz); 2=Mc/s
Bool_t fDCCorrected; ///< if set true, the dc offset of the signal/theory will be removed before the FFT is made.
Int_t fFourierPower; ///< i.e. zero padding up to 2^fFourierPower, default = 0 which means NO zero padding
Int_t fApodization; ///< tag indicating the kind of apodization wished, 0=no appodization (default), 1=weak, 2=medium, 3=strong (for details see the docu)
Int_t fPlotTag; ///< tag used for initial plot. 0=real, 1=imaginary, 2=real & imaginary (default), 3=power, 4=phase