CFEL - ASG Software Suite
2.5.0
CASS
|
Creates maps from the last number of maps. More...
#include <mapcreators.h>
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 &unused) |
start the training More... | |
![]() | |
virtual | ~MapCreatorBase () |
virtual destructor More... | |
Private Member Functions | |
void | train (const Frame &frame) |
train the maps More... | |
void | updateMaps (const Frame &frame) |
update the existing map with the incomming frame inforamtion 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 |
the storage with all the frames from which the maps are calculated More... | |
size_t | _framecounter |
counter to keep track how many frames are collected More... | |
size_t | _frameSave |
after wich number of frames should the maps be written to file More... | |
size_t | _trainingsize |
how much frames should the training include More... | |
float | _alpha |
how many frames should the memory go back More... | |
float | _multiplier |
how much noise is allowed before disregarding pixel from list More... | |
Additional Inherited Members | |
![]() | |
typedef std::tr1::shared_ptr< MapCreatorBase > | shared_pointer |
typedef the shared pointer of this More... | |
typedef std::vector< Detector::frame_t > | storage_t |
the type of storage used More... | |
![]() | |
static shared_pointer | instance (const std::string &type) |
create an instance of the requested functor More... | |
Creates maps from the last number of maps.
The algorithm that calculates the running average (offset) and standard deviation is taken from here (last checked 30.01.2012): http://www-uxsup.csx.cam.ac.uk/~fanf2/hermes/doc/antiforgery/stats.pdf
PixelDetectors/%name%/CorrectionMaps/ChangingCreator/{NbrTrainingFrames}
The number of frames that should be collected for calculating the initial maps. Default is 50.
PixelDetectors/%name%/CorrectionMaps/ChangingCreator/{DoTraining}
Before updating collect a set of "training" frames from which the initial maps are created. This is recommended if one does not have or has an outdated noise and offset map. Default is false.
PixelDetectors/%name%/CorrectionMaps/ChangingCreator/{NbrOfAverages}
The number of past frames that should be taken into account when calculating the noise and offset map. Default is 50.
PixelDetectors/%name%/CorrectionMaps/ChangingCreator/{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/ChangingCreator/{AutoSaveSize}
Tells to save the noise and offset map and recalculate the correction map after this many frames. Default is 1e6.
Definition at line 149 of file mapcreators.h.
|
virtual |
start the training
unused | (not used) |
Reimplemented from cass::pixeldetector::MapCreatorBase.
Definition at line 189 of file mapcreators.cpp.
References cass::Log::add(), cass::Log::INFO, cass::toString(), and train().
|
virtual |
load the settings of this creator
s | the CASSSettings object to read the information from |
Reimplemented from cass::pixeldetector::MapCreatorBase.
Definition at line 281 of file mapcreators.cpp.
References cass::Log::add(), average, QSettings::beginGroup(), QSettings::endGroup(), cass::pixeldetector::DetectorName::fromSettings(), cass::Log::INFO, cass::pixeldetector::CommonData::instance(), cass::toString(), train(), updateMaps(), and QSettings::value().
|
inlinevirtual |
build map from frame
The map resources are locked since the function calling this operator will lock the resources.
take the input frame and use its data to build up the correction maps.
frame | the frame containing the data to build the maps from |
Reimplemented from cass::pixeldetector::MapCreatorBase.
Definition at line 161 of file mapcreators.h.
References _createMap.
|
private |
train the maps
collect user settable amount of frames and create intial maps from it these maps will then be updated with each new frame
frame | the frame to build up the storage and to calc the maps from |
Definition at line 197 of file mapcreators.cpp.
References cass::Log::add(), cass::pixeldetector::Frame::data, cass::Log::INFO, noise, offset, cass::toString(), and updateMaps().
Referenced by controlCalibration(), and loadSettings().
|
private |
update the existing map with the incomming frame inforamtion
will update the maps with the information of the frame
frame | the frame to update the maps from |
Definition at line 255 of file mapcreators.cpp.
References cass::pixeldetector::Frame::data, noise, offset, and cass::square().
Referenced by loadSettings(), and train().
|
private |
how many frames should the memory go back
Definition at line 213 of file mapcreators.h.
|
private |
the container with all the maps
Definition at line 195 of file mapcreators.h.
|
private |
the function object that will be called by the operator
Definition at line 198 of file mapcreators.h.
Referenced by operator()().
|
private |
counter to keep track how many frames are collected
Definition at line 204 of file mapcreators.h.
|
private |
after wich number of frames should the maps be written to file
Definition at line 207 of file mapcreators.h.
|
private |
how much noise is allowed before disregarding pixel from list
Definition at line 216 of file mapcreators.h.
|
private |
the storage with all the frames from which the maps are calculated
Definition at line 201 of file mapcreators.h.
|
private |
how much frames should the training include
Definition at line 210 of file mapcreators.h.