1 #ifndef _Q_OPTIMUMFILTER_HH_
2 #define _Q_OPTIMUMFILTER_HH_
34 QOptimumFilter(
const Diana::QVector& ap1,
const Diana::QVector&
an,
int maxJitter,
bool useDiff =
false,
bool debugOn =
false);
84 QError Get(
double& jitter,
double& chi2,
double& amplitude,
double& integral,
double& left,
double& right)
const;
88 QError GetInterpolated(
double& jitter,
double& chi2,
double& amplitude,
double& integral,
double& left,
double& right)
const;
90 std::vector<double>
Get()
const;
92 Diana::QVector
GetFitFunction(
const double jitter,
const double a1)
const;
116 QError Parabola(
double xa,
double xb,
double xc,
double ya,
double yb,
double yc,
double &
min,
double& minpos)
const;
double min(const Diana::QVector &v)
error class with error type and description
Optimum filter implemented with windowing and zeros.
Diana::QVector fAverageNoiseForChi2
QError GetInterpolated(double &jitter, double &chi2, double &litude, double &integral, double &left, double &right) const
get values at interpolated chi^2 minimum. Three points around the minimum are used for a parabolic in...
QError fCheckForFilteredSamples
Diana::QVector NormalizeVector(const Diana::QVector &vec) const
std::vector< Diana::QVector > fDebugSpectra
std::vector< Diana::QVector > fDebugVectors
QError Parabola(double xa, double xb, double xc, double ya, double yb, double yc, double &min, double &minpos) const
Diana::QVector GetFilteredNoise() const
expected filtered noise average power spectrum
QError GetHighSNRChi2(const double &threshold, double &chi2) const
get chi^2 (mean 0, variance 1) restricting the DoF to frequencies with SNR > threshold
virtual ~QOptimumFilter()
Diana::QVector fAveragePulseEnergySpectrum
Diana::QRealComplexFFT * fTransformer
Diana::QVector GetFilteredShifted() const
get filtered and shifted samples by fMaxPos
int fFilteredAveragePulseHalfWidth
int fAvgPulseHalfTimeToMax
Diana::QVector GetFitFunction(const double jitter, const double a1) const
Diana::QVector fFiltered1
double fFilteredAveragePulseHalfWidthValueLeft
size_t fEffectiveFilterLength
Diana::QVector GetAveragePulseEnergySpectrum() const
energy spectrum of the average pulse
int GetShift() const
get shift of filter (max pos of avg pulse)
Diana::QVectorC fTransformedWaveform
QError fCheckForBuiltFilter
double fAvgPulseIntegral1
virtual QError ManipulateInputs()
QError SetJitter(JitterMode mode, int start=0)
Diana::QVector fAveragePulse1
double GetFilteredNoiseRMS() const
expected noise rms after the filter
QOptimumFilter(const Diana::QVector &ap1, const Diana::QVector &an, int maxJitter, bool useDiff=false, bool debugOn=false)
constructor
std::vector< Diana::QVectorC > fAveragePulse1Shifted
std::vector< bool > fValidSample
Diana::QVector GetFilterTD() const
kernel of the filter in the time domain
Diana::QVector fAverageNoise
std::vector< double > Get() const
Diana::QVector GetNoisePowerSpectrum() const
power spectrum of the original noise
const Diana::QVector & GetFiltered() const
get filtered samples
Diana::QVectorC GetFilterFD() const
filter in the frequency domain
double fFilteredAveragePulseHalfWidthValueRight
Diana::QVector GetSNRFD() const
Get SNR as a function of frequency
double GetCutOffFrequency() const
QError Filter(const Diana::QVector &p)
filter. In case of failure an error is returned.
Diana::QVector GetAveragePulse() const
get normalized average pulse
Diana::QVector fFilteredAverageNoise
double fFilteredAutoCorrelation
Wrapper for a specific QRealComplexFFT algorithm class.
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...