CFEL - ASG Software Suite  2.5.0
CASS
Public Member Functions | Private Attributes | List of all members
cass::pixeldetector::commonmode::MedianCalculator Class Reference

Calculate the common mode by taking the median of pixel values. More...

#include <commonmode_calculators.h>

+ Inheritance diagram for cass::pixeldetector::commonmode::MedianCalculator:
+ Collaboration diagram for cass::pixeldetector::commonmode::MedianCalculator:

Public Member Functions

 MedianCalculator ()
 constructor More...
 
Detector::pixel_t operator() (Detector::frame_t::const_iterator pixel, size_t idx) const
 the operation More...
 
void loadSettings (CASSSettings &s)
 load the settings of this calculator More...
 
- Public Member Functions inherited from cass::pixeldetector::commonmode::CalculatorBase
virtual ~CalculatorBase ()
 virtual destructor More...
 
void load (CASSSettings &s)
 load all common settings More...
 
size_t width () const
 retrieve the number of pixels (or the width of calculation More...
 

Private Attributes

size_t _nbrDisregardedMaximumElements
 number of maximum elements to remove More...
 
size_t _nbrDisregardedMinimumElements
 number of minimum elements to remove More...
 
int _minNbrPixels
 mininmal number of pixels that should be present when calculating the mean More...
 

Additional Inherited Members

- Public Types inherited from cass::pixeldetector::commonmode::CalculatorBase
typedef std::tr1::shared_ptr< CalculatorBaseshared_pointer
 typedef the shared pointer of this More...
 
- Static Public Member Functions inherited from cass::pixeldetector::commonmode::CalculatorBase
static shared_pointer instance (const std::string &type)
 create an instance of the requested functor More...
 
- Protected Attributes inherited from cass::pixeldetector::commonmode::CalculatorBase
std::tr1::shared_ptr< CommonData_commondata
 the commonly used data container More...
 
size_t _nbrPixels
 how many pixels should be used for calculating the common mode More...
 
float _multiplier
 the multiplier to identify pixels that contain information More...
 

Detailed Description

Calculate the common mode by taking the median of pixel values.

This functor retrieves the median value of the pixels. To create the list of pixels it will check whether the pixel might contain an event such as an photon. If so it will not be included in the mean. There must be a minimum number of pixels without an event before the common mode is calculated.

The user has the option to not include a number of highest and lowest pixel values when getting the median of the distribution. This helps to get rid of possible extremes.

User definable Parameters:

PixelDetectors/%name%/HLLProcessing/MedianCommonMode/{NbrMinDisregardedValues}
The number of lowest values that should be disreagarded when getting the median value. Default is 5.

PixelDetectors/%name%/HLLProcessing/MedianCommonMode/{NbrMinDisregardedValues}
The number of highest values that should be disreagarded when getting the median value. Default is 0.

PixelDetectors/%name%/HLLProcessing/MedianCommonMode/{MinNbrPixels}
The minimal number of Pixels that should be found in the range before the common mode value will be calculated. Default is 8.

Author
Lutz Foucar

Definition at line 150 of file commonmode_calculators.h.

Constructor & Destructor Documentation

cass::pixeldetector::commonmode::MedianCalculator::MedianCalculator ( )
inline

constructor

Definition at line 154 of file commonmode_calculators.h.

Member Function Documentation

void MedianCalculator::loadSettings ( CASSSettings s)
virtual

load the settings of this calculator

Parameters
sthe CASSSettings object to read the information from

Implements cass::pixeldetector::commonmode::CalculatorBase.

Definition at line 177 of file commonmode_calculators.cpp.

References QSettings::beginGroup(), QSettings::endGroup(), and QSettings::value().

Detector::pixel_t MedianCalculator::operator() ( Detector::frame_t::const_iterator  pixel,
size_t  idx 
) const
virtual

the operation

determine the common mode level and return it.

Returns
the common mode level
Parameters
pixelthe start pixel within the frame to start the common mode calculation
idxindex of the first pixel.

Implements cass::pixeldetector::commonmode::CalculatorBase.

Definition at line 152 of file commonmode_calculators.cpp.

References cass::pixeldetector::commonmode::createPixelList().

Member Data Documentation

int cass::pixeldetector::commonmode::MedianCalculator::_minNbrPixels
private

mininmal number of pixels that should be present when calculating the mean

Definition at line 181 of file commonmode_calculators.h.

size_t cass::pixeldetector::commonmode::MedianCalculator::_nbrDisregardedMaximumElements
private

number of maximum elements to remove

Definition at line 175 of file commonmode_calculators.h.

size_t cass::pixeldetector::commonmode::MedianCalculator::_nbrDisregardedMinimumElements
private

number of minimum elements to remove

Definition at line 178 of file commonmode_calculators.h.


The documentation for this class was generated from the following files: