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

Functions

template<typename T >
void getcom (const Channel &c, const CoMParameters &param, SignalProducer::signals_t &sig)
 Implementation of Center of Mass. More...
 
void loadSettings (CASSSettings &s, CoMParameters &p, uint32_t &instrument, size_t &channelNbr)
 implementation of loading settings for both Center of Mass classes More...
 

Function Documentation

template<typename T >
void cass::ACQIRIS::CenterOfMass::getcom ( const Channel c,
const CoMParameters param,
SignalProducer::signals_t sig 
)

Implementation of Center of Mass.

go through the puls and find all points above a given threshold. Calculate the center of mass of all the points above the threshold, which is treated as the time of the identified peak.

Todo:
maybe just find the rising slope and let all other things be done by helper functions. (starting with findstartstop)
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

Definition at line 48 of file com.cpp.

References cass::ACQIRIS::CoMParameters::_polarity, cass::ACQIRIS::CoMParameters::_threshold, cass::ACQIRIS::CoMParameters::_timeranges, cass::ACQIRIS::Bad, cass::ACQIRIS::com, cass::ACQIRIS::Channel::gain(), cass::ACQIRIS::isUsed, cass::ACQIRIS::maximum, cass::ACQIRIS::maxpos, cass::ACQIRIS::NbrSignalDefinitions, cass::ACQIRIS::Negative, cass::ACQIRIS::Channel::offset(), cass::ACQIRIS::polarity, cass::ACQIRIS::Positive, cass::ACQIRIS::startpos, cass::ACQIRIS::stoppos, cass::ACQIRIS::time, and cass::ACQIRIS::Channel::waveform().

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

implementation of loading settings for both Center of Mass classes

this function implements the retrieval of the settings for the CoM signal extractors. For a description on the settings see decription of CoM8Bit class.
It opens the group "CenterOfMass" and retrieves the settings for the Center of Mass algorithm from the CASSSettings object.

Parameters
[in]sthe CASSSettings object we retrieve the information from
[out]pthe container for the Center of Mass 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 164 of file com.cpp.

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

Referenced by cass::ACQIRIS::CoM8Bit::loadSettings(), and cass::ACQIRIS::CoM16Bit::loadSettings().