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

Creates the maps fast and simple with commond mode correction. More...

#include <mapcreators_online.h>

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

Public Member Functions

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

Private Member Functions

void doNothing (const Frame &)
 a function that just returns and does nothing More...
 
void buildAndCalc (const Frame &frame)
 build up storage and then calculate the maps More...
 

Private Attributes

std::tr1::shared_ptr< CommonData_commondata
 the container with all the maps More...
 
std::tr1::function< void(const Frame &)> _createMap
 the function object that will be called by the operator More...
 
storage_t _storage
 storage where the pixels are already ordered More...
 
size_t _nbrFrames
 how many frames should be collected before the maps are calculated More...
 
Detector::pixel_t _multiplier
 the multiplier to define the max noise before the pixel is considered to contain a photon More...
 
bool _writeMaps
 flag wether the create maps should be saved to file or just used More...
 
size_t _framecounter
 counter to keep track how many frames are collected More...
 
commonmode::CalculatorBase::shared_pointer _commonModeCalculator
 functor for calculating the common mode level 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 the maps fast and simple with commond mode correction.

Uses collects the user chosen nbr of frames and uses them to calculate the correction and noise maps. In addition it will correct the frames from the common mode noise.

User definable Map Creator List:
"onlinecommonmode": same as online, but corrects the common mode from the frames when calculating the maps
User definable Parameters:

PixelDetectors/%name%/CorrectionMaps/FixedOnlineCreatorCommonMode/{Multiplier}
How much bigger does the pixel value have to be than the noise before The pixel is not taken into account when calculating the offset and noise of that pixel. Default is 4.

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

PixelDetectors/%name%/CorrectionMaps/FixedOnlineCreatorCommonMode/{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/FixedOnlineCreatorCommonMode/{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.

PixelDetectors/%name%/CorrectionMaps/FixedOnlineCreatorCommonMode/{CommonModeCalculationType}
The type of commonmode calculation thats used to correct the common mode when trying to get rid of it. Default is "simpleMean". Possible values are:

Author
Lutz

Definition at line 161 of file mapcreators_online.h.

Member Function Documentation

void OnlineFixedCreatorCommonMode::buildAndCalc ( const Frame frame)
private

build up storage and then calculate the maps

Parameters
framethe frame to build up the storage and to calc the maps from

as long as there are not enough frames collected build up the specail storage

calc noise and offset from pixels that do not contain photon hits

save the values to the map

now do it again, but this time correct for the common mode level

write the maps to file if requested and recreate the correction map. then reset everything.

Definition at line 161 of file mapcreators_online.cpp.

References cass::Log::add(), cass::pixeldetector::Frame::data, doNothing(), QTime::elapsed(), cass::Log::INFO, noise, offset, QTime::start(), cass::ACQIRIS::t, cass::toString(), cass::Log::WARNING, cass::ACQIRIS::width, and cass::pixeldetector::commonmode::CalculatorBase::width().

Referenced by controlCalibration(), and loadSettings().

void OnlineFixedCreatorCommonMode::controlCalibration ( const std::string &  unused)
virtual

start accumulating the maps

Parameters
unusednot used

Reimplemented from cass::pixeldetector::MapCreatorBase.

Definition at line 154 of file mapcreators_online.cpp.

References cass::Log::add(), buildAndCalc(), cass::Log::INFO, and cass::toString().

void cass::pixeldetector::OnlineFixedCreatorCommonMode::doNothing ( const Frame )
inlineprivate

a function that just returns and does nothing

Parameters
unusednot used

Definition at line 191 of file mapcreators_online.h.

Referenced by buildAndCalc(), and loadSettings().

void OnlineFixedCreatorCommonMode::loadSettings ( CASSSettings s)
virtual
void cass::pixeldetector::OnlineFixedCreatorCommonMode::operator() ( const Frame frame)
inlinevirtual

the operator

just calls the function that creates the map. This function is exchanged depending on whether the frames should be calculated or not.

Parameters
framethe frame to check for

Reimplemented from cass::pixeldetector::MapCreatorBase.

Definition at line 171 of file mapcreators_online.h.

References _createMap.

Member Data Documentation

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

the container with all the maps

Definition at line 200 of file mapcreators_online.h.

commonmode::CalculatorBase::shared_pointer cass::pixeldetector::OnlineFixedCreatorCommonMode::_commonModeCalculator
private

functor for calculating the common mode level

Definition at line 221 of file mapcreators_online.h.

std::tr1::function<void(const Frame&)> cass::pixeldetector::OnlineFixedCreatorCommonMode::_createMap
private

the function object that will be called by the operator

Definition at line 203 of file mapcreators_online.h.

Referenced by operator()().

size_t cass::pixeldetector::OnlineFixedCreatorCommonMode::_framecounter
private

counter to keep track how many frames are collected

Definition at line 218 of file mapcreators_online.h.

Detector::pixel_t cass::pixeldetector::OnlineFixedCreatorCommonMode::_multiplier
private

the multiplier to define the max noise before the pixel is considered to contain a photon

Definition at line 212 of file mapcreators_online.h.

size_t cass::pixeldetector::OnlineFixedCreatorCommonMode::_nbrFrames
private

how many frames should be collected before the maps are calculated

Definition at line 209 of file mapcreators_online.h.

storage_t cass::pixeldetector::OnlineFixedCreatorCommonMode::_storage
private

storage where the pixels are already ordered

Definition at line 206 of file mapcreators_online.h.

bool cass::pixeldetector::OnlineFixedCreatorCommonMode::_writeMaps
private

flag wether the create maps should be saved to file or just used

Definition at line 215 of file mapcreators_online.h.


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