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

Creates maps from a fixed number of Frames. More...

#include <mapcreators.h>

+ Inheritance diagram for cass::pixeldetector::FixedMaps:
+ Collaboration diagram for cass::pixeldetector::FixedMaps:

Public Member Functions

void operator() (const Frame &frame)
 build map from frame More...
 
void loadSettings (CASSSettings &s)
 load the settings of this creator More...
 
void controlCalibration (const std::string &)
 start accumulating the maps More...
 
- Public Member Functions inherited from cass::pixeldetector::MapCreatorBase
virtual ~MapCreatorBase ()
 virtual destructor More...
 

Private Attributes

std::tr1::shared_ptr< CommonData_commondata
 the container with all the maps More...
 
std::tr1::function< Detector::frame_t::value_type(Detector::frame_t &, size_t, size_t)> _calcOffset
 the function that will calculate the offset More...
 
storage_t _storage
 the storage with all the frames from which the maps are calculated More...
 
bool _createMaps
 flag to tell whether the maps should be created More...
 
size_t _nbrFrames
 how many frames should be included to create the statistics More...
 
size_t _maxDisregarded
 how many highest values should be disregarded More...
 
size_t _minDisregarded
 how many lowest values should be disregarded More...
 
bool _writeMaps
 write maps flag More...
 

Additional Inherited Members

- Public Types inherited from cass::pixeldetector::MapCreatorBase
typedef std::tr1::shared_ptr< MapCreatorBaseshared_pointer
 typedef the shared pointer of this More...
 
typedef std::vector< Detector::frame_tstorage_t
 the type of storage used More...
 
- Static Public Member Functions inherited from cass::pixeldetector::MapCreatorBase
static shared_pointer instance (const std::string &type)
 create an instance of the requested functor More...
 

Detailed Description

Creates maps from a fixed number of Frames.

Creates the maps after collecting a user given number of frames. The maps will be created using standart statistics. The user has the choice of whehter the mean or the median should be used for the offset value.

User definable Map Creator List:
"fixed": The maps will be created from a fixed number of frames.
User definable Parameters:

PixelDetectors/%name%/CorrectionMaps/FixedCreator/{NbrFrames}
The number of frames that should be collected for calculating the maps. Default is 200.

PixelDetectors/%name%/CorrectionMaps/FixedCreator/{StartInstantly}
Flag to tell whether the calculator should start instantly with collecting the frames and calculating the maps. If false it will wait until told by the program through the available GUI's. Default is false.

PixelDetectors/%name%/CorrectionMaps/FixedCreator/{DisregardedHighValues}
Number of highest values that should be disregarded when calculating the offset value. Default is 5

PixelDetectors/%name%/CorrectionMaps/FixedCreator/{DisregardedLowValues}
Number of lowest values that should be disregarded when calculating the offset value. Default is 0

PixelDetectors/%name%/CorrectionMaps/FixedCreator/{UseMedian}
Tell the creator to use a median to calculate the offset value. If this is false the offset is calculated via the mean value. Default is false

PixelDetectors/%name%/CorrectionMaps/FixedCreator/{WriteMaps}
Tell the creator to write the calulated maps once they have been calculated. For further infomration on how the files are written, see cass::pixeldetector::CommonData. Default is true.

Author
Lutz Foucar

Definition at line 62 of file mapcreators.h.

Member Function Documentation

void cass::pixeldetector::FixedMaps::controlCalibration ( const std::string &  )
inlinevirtual

start accumulating the maps

Reimplemented from cass::pixeldetector::MapCreatorBase.

Definition at line 92 of file mapcreators.h.

References _createMaps.

void FixedMaps::loadSettings ( CASSSettings s)
virtual

load the settings of this creator

See class description for a detailed list.

Parameters
sthe CASSSettings object to read the information from

Reimplemented from cass::pixeldetector::MapCreatorBase.

Definition at line 171 of file mapcreators.cpp.

References QSettings::beginGroup(), cass::pixeldetector::calcMean(), cass::pixeldetector::calcMedian(), QSettings::endGroup(), cass::pixeldetector::DetectorName::fromSettings(), cass::pixeldetector::CommonData::instance(), and QSettings::value().

void FixedMaps::operator() ( const Frame frame)
virtual

build map from frame

take the input frame and use its data to build up the correction maps. But only when the _createMaps flag is set to true.

Once the _storage container is full calculate the maps. First retrieve for each pixel a list of all pixels within the storage that don't contain an event (e.g. photonhit).

The map resources are locked since the function calling this operator will lock the resources.

After calculation reset the _createMaps flag and clear the storage.

Parameters
framethe frame containing the data to build the maps from

Reimplemented from cass::pixeldetector::MapCreatorBase.

Definition at line 134 of file mapcreators.cpp.

References cass::pixeldetector::calcNoise(), cass::pixeldetector::createPixelList(), cass::pixeldetector::Frame::data, noise, and offset.

Member Data Documentation

std::tr1::function<Detector::frame_t::value_type(Detector::frame_t&, size_t, size_t)> cass::pixeldetector::FixedMaps::_calcOffset
private

the function that will calculate the offset

Definition at line 99 of file mapcreators.h.

std::tr1::shared_ptr<CommonData> cass::pixeldetector::FixedMaps::_commondata
private

the container with all the maps

Definition at line 96 of file mapcreators.h.

bool cass::pixeldetector::FixedMaps::_createMaps
private

flag to tell whether the maps should be created

Definition at line 105 of file mapcreators.h.

Referenced by controlCalibration().

size_t cass::pixeldetector::FixedMaps::_maxDisregarded
private

how many highest values should be disregarded

Definition at line 111 of file mapcreators.h.

size_t cass::pixeldetector::FixedMaps::_minDisregarded
private

how many lowest values should be disregarded

Definition at line 114 of file mapcreators.h.

size_t cass::pixeldetector::FixedMaps::_nbrFrames
private

how many frames should be included to create the statistics

Definition at line 108 of file mapcreators.h.

storage_t cass::pixeldetector::FixedMaps::_storage
private

the storage with all the frames from which the maps are calculated

Definition at line 102 of file mapcreators.h.

bool cass::pixeldetector::FixedMaps::_writeMaps
private

write maps flag

Definition at line 117 of file mapcreators.h.


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