mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
some doxy comments added
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorCalibration@13 113b152e-814d-439b-b186-022a431db7b5
This commit is contained in:
@ -4,21 +4,45 @@
|
||||
#include "MovingStat.h"
|
||||
|
||||
class pedestalSubtraction {
|
||||
|
||||
/** @short class defining the pedestal subtraction based on an approximated moving average */
|
||||
public:
|
||||
/** constructor
|
||||
\param nn number of samples to calculate the moving average (defaults to 1000)
|
||||
*/
|
||||
pedestalSubtraction (int nn=1000) : stat(nn) {};
|
||||
|
||||
/** virtual destructorr
|
||||
*/
|
||||
virtual ~pedestalSubtraction() {};
|
||||
|
||||
/** clears the moving average */
|
||||
virtual void Clear() {stat.Clear();}
|
||||
|
||||
/** adds the element to the moving average
|
||||
\param val value to be added
|
||||
*/
|
||||
virtual void addToPedestal(double val){ stat.Calc(val);};
|
||||
|
||||
/** returns the average value of the pedestal
|
||||
\returns mean of the moving average
|
||||
*/
|
||||
virtual double getPedestal(){return stat.Mean();};
|
||||
|
||||
/** returns the standard deviation of the moving average
|
||||
\returns standard deviation of the moving average
|
||||
*/
|
||||
virtual double getPedestalRMS(){return stat.StandardDeviation();};
|
||||
|
||||
/**sets/gets the number of samples for the moving average
|
||||
\param i number of elements for the moving average. If -1 (default) or negative, gets.
|
||||
\returns actual number of samples for the moving average
|
||||
*/
|
||||
virtual int SetNPedestals(int i=-1) {if (i>0) stat.SetN(i); return stat.GetN();};
|
||||
|
||||
|
||||
|
||||
private:
|
||||
MovingStat stat;
|
||||
MovingStat stat; /**< approximated moving average struct */
|
||||
|
||||
};
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user