CFEL - ASG Software Suite  2.5.0
CASS
Functions
cass::ACQIRIS::ConstantFraction Namespace Reference

Functions

template<typename T >
void getcfd (const Channel &c, const CFDParameters &param, SignalProducer::signals_t &sig)
 Implematation of Constant Fraction Method. More...
 
void loadSettings (CASSSettings &s, CFDParameters &p, uint32_t &instrument, size_t &channelNbr)
 implementation of loading settings for both CFD classes More...
 

Function Documentation

template<typename T >
void cass::ACQIRIS::ConstantFraction::getcfd ( const Channel c,
const CFDParameters param,
SignalProducer::signals_t sig 
)

Implematation of Constant Fraction Method.

The CFD calculates a second trace from the original trace, where two points of the original create one point of the cfd trace

\[new_x = -orig_x*fraction + orig_x-delay \]

It will then find where the new trace will cross the walk value where this point defines the time.

Template Parameters
Ttype of a wavform point
Parameters
[in]cthe channel that contains the waveform to analyze
[in]paramthe user defined parameters for extracting signal in the waveform
[out]sigthe container with all the found signals
Author
Lutz Foucar
Todo:
make sure that is works right, since we get back a double

Definition at line 45 of file cfd.cpp.

References cass::ACQIRIS::CFDParameters::_delay, cass::ACQIRIS::CFDParameters::_fraction, cass::ACQIRIS::CFDParameters::_polarity, cass::ACQIRIS::CFDParameters::_threshold, cass::ACQIRIS::CFDParameters::_timeranges, cass::ACQIRIS::CFDParameters::_walk, cass::ACQIRIS::Bad, cass::ACQIRIS::cfd, cass::ACQIRIS::Channel::gain(), cass::ACQIRIS::Channel::horpos(), cass::ACQIRIS::isUsed, cass::ACQIRIS::NbrSignalDefinitions, cass::ACQIRIS::Negative, cass::ACQIRIS::Channel::offset(), cass::ACQIRIS::polarity, cass::ACQIRIS::Positive, cass::ACQIRIS::Channel::sampleInterval(), cass::ACQIRIS::time, cass::ACQIRIS::Channel::waveform(), cass::ACQIRIS::x, and cass::ACQIRIS::y.

void cass::ACQIRIS::ConstantFraction::loadSettings ( CASSSettings s,
CFDParameters p,
uint32_t &  instrument,
size_t &  channelNbr 
)

implementation of loading settings for both CFD classes

this function implements the retrieval of the settings for the CFD signal extractors. For a description on the settings see decription of CFD8Bit class.
It opens the group "ContantFraction" and retrieves the settings for the CFD algorithm from the CASSSettings object.

Parameters
[in]sthe CASSSettings object we retrieve the information from
[out]pthe container for the Constant Fraction Parameters
[out]instrumentthe instrument that contains the channel the constant fraction signal extractor should anlyze.
[out]channelNbrthe channel number of the channel that conatins the singals that this extractor should extract.
Author
Lutz Foucar

Definition at line 210 of file cfd.cpp.

References cass::ACQIRIS::CFDParameters::_delay, cass::ACQIRIS::CFDParameters::_fraction, cass::ACQIRIS::CFDParameters::_polarity, cass::ACQIRIS::CFDParameters::_threshold, cass::ACQIRIS::CFDParameters::_timeranges, cass::ACQIRIS::CFDParameters::_walk, QSettings::beginGroup(), QSettings::beginReadArray(), QSettings::endArray(), QSettings::endGroup(), cass::ACQIRIS::Negative, QSettings::setArrayIndex(), size, and QSettings::value().

Referenced by cass::loadAllDets(), cass::ACQIRIS::CFD8Bit::loadSettings(), and cass::ACQIRIS::CFD16Bit::loadSettings().