Inheritance diagram for MCorrectAmplitudes:

A'(B) = k* A(B)/F(B)
where k = 5000, B is the baseline (or time, depending on the value of CorrectWithBaseline parameter), F(B) is the function fitting F vs B/t. if F(B) is a line (degree 1 polynomial) the correction can also be performed rotating the (A,B) points around the (0,0) point in the A(B) space, namely:
A' = (cos(alpha) * A - sin (alpha) * B) * k/(sin(alpha) * a)
where the fitting line (F(B)) is y = a + bx alpha = arctg b
To enable this correction option the parameter RotationCorrection must be true and the parameters in the ParametersFileName must have been obtained fitting with a 1 degree polynomial. is the module MFitAmplitudeBaseline is used, this can be accomplished setting its parameters: PolynomialDegree = 1 MaxNumberOfIterations = 1
NB: this module is meant to be run on a single run: it will behave badly if run on multiple runs
module CorrectAmplitudes verbosity = info enable = true ParametersFileName = parameters.txt TimesFileName = termometro.txt RotationCorrection = false CorrectWithBaseline = false UseCorrectedAmplitudes = false
endmod
Public Member Functions | |
| MCorrectAmplitudes (QSequence *) | |
| Constructor.  | |
| virtual void | Init () | 
| Init method: reads parameters.  | |
| virtual QEvent * | Do (QEvent *) | 
| Do method: correct pulse amplitudes.  | |
| virtual void | Done () | 
| Done method is called after event loop.  | |
Private Member Functions | |
| void | SetupVectors () | 
| int | FindInterval (std::vector< double > &, double) | 
Private Attributes | |
| FILE * | fParametersFile | 
| FILE * | fTimesFile | 
| std::vector< int > | fProblematicChannels | 
| 
std::vector< std::vector< double > >  | fDiscontinuities | 
| bool | fRotationCorrection | 
| bool | fCorrectWithBaseline | 
| bool | fUseCorrectedAmplitude | 
| std::string | fTimesFileName | 
| bool | fIsFirstEvent | 
| int | fRun | 
 1.5.1