CFEL - ASG Software Suite
2.5.0
CASS
|
pixel detector hot pixel detection More...
#include <pixel_detector_calibration.h>
Public Member Functions | |
pp332 (const name_t &) | |
constructor. More... | |
virtual void | process (const CASSEvent &, result_t &) |
overwrite default behaviour don't do anything More... | |
virtual void | loadSettings (size_t) |
load the settings of this pp More... | |
virtual void | aboutToQuit () |
write the calibrations before quitting More... | |
![]() | |
AccumulatingProcessor (const name_t &name) | |
constructor More... | |
virtual | ~AccumulatingProcessor () |
virtual destructor More... | |
virtual void | processEvent (const CASSEvent &evt) |
process the event More... | |
virtual const result_t & | result (const CASSEvent::id_t) |
retrieve a result. More... | |
virtual void | releaseEvent (const CASSEvent &) |
overwrite default behaviour to do nothing More... | |
virtual void | createHistList (result_t::shared_pointer result) |
create the list of results More... | |
![]() | |
Processor (const name_t &name) | |
constructor More... | |
virtual | ~Processor () |
virtual destructor More... | |
result_t::shared_pointer | resultCopy (const uint64_t eventid) |
retrieve histogram for id More... | |
virtual void | load () |
load the general settings More... | |
const names_t & | dependencies () |
Define all processors keys a processor depends on. More... | |
void | clearDependencies () |
clear the dependenies More... | |
void | clearHistograms () |
clear the histograms More... | |
virtual void | processCommand (std::string command) |
process command in pp More... | |
const name_t | name () const |
retrieve the name of this processor More... | |
bool | hide () const |
retrieve the hide flag of this processor More... | |
const std::string & | comment () const |
retrieve the comment of this processor More... | |
Protected Member Functions | |
void | loadHotPixelMap () |
write the calibration data to file More... | |
void | writeHotPixelMap () |
write the calibration data to file More... | |
![]() | |
virtual void | createHistList (result_t::shared_pointer result) |
create result list. More... | |
void | setupGeneral () |
general setup of the processor More... | |
bool | setupCondition (bool defaultConditionType=true) |
setup the condition. More... | |
shared_pointer | setupDependency (const std::string &depVarName, const name_t &name="") |
setup the dependecy. More... | |
Private Types | |
typedef char | mask_t |
define the output mask type More... | |
typedef std::pair< float, float > | range_t |
define the range type More... | |
Private Attributes | |
shared_pointer | _image |
the image to create the hotpixel map from More... | |
size_t | _maxConsecutiveCount |
the number of times a pixel is high before masking it as hot pixel More... | |
range_t | _aduRange |
the range of adu that indicates whether a pixel is hot More... | |
float | _maxADUVal |
the maximum allowed adu value More... | |
bool | _write |
flag to tell whether the calibration should be written More... | |
std::string | _filename |
the filename that is used to save the calibration More... | |
int | _nFrames |
the number of frames after which the gain map is calculted More... | |
int | _counter |
counter to count how many times this has been called More... | |
Additional Inherited Members | |
![]() | |
typedef std::tr1::shared_ptr< Processor > | shared_pointer |
a shared pointer of this More... | |
typedef std::string | name_t |
define the name type More... | |
typedef std::list< name_t > | names_t |
define the list of names More... | |
typedef CachedList::item_type | result_t |
define the results More... | |
typedef CachedList::item_sp | resultsp_t |
define the shared pointer to the result More... | |
![]() | |
result_t::shared_pointer | _result |
the result that accumulates the events More... | |
size_t | _nbrEventsAccumulated |
the number of events the processor has accumulated More... | |
![]() | |
const name_t | _name |
the processors name More... | |
bool | _hide |
flag to tell whether this pp should be hidden in the dropdown list More... | |
std::string | _comment |
optional comment that one can add to a processor. More... | |
CachedList | _resultList |
the list of results More... | |
names_t | _dependencies |
the list of dependencies More... | |
shared_pointer | _condition |
pointer to the processor that will contain the condition More... | |
pixel detector hot pixel detection
Processor/%name%/{Image}
the image of the pixel detector
Processor/%name%/{Filename}
the name of the file where the calibration will be written to. Default is out.cal
Processor/%name%/{WriteCal}
Flag to tell whether the calibration should be written. Default is true.
Processor/%name%/{ADURangeLow|ADURangeUp}
The adu range that indicates that one photon has hit the pixel. Default is 0|0
Processor/%name%/{MaximumConsecutiveFrames}
The maximum number of frames that a pixel should have an adu value in the range before the pixel is mased as hot. Default is 5
Processor/%name%/{MaxADUValue}
If a pixel ever exceeds this value it will be masked as bad. Default is 1e6
Processor/%name%/{NbrOfFrames}
The number of frames after which the gain map will be calculated. Default is -1, which sais that it will never be calulated during running and only when the program ends.
Definition at line 482 of file pixel_detector_calibration.h.
|
private |
define the output mask type
Definition at line 506 of file pixel_detector_calibration.h.
|
private |
define the range type
Definition at line 515 of file pixel_detector_calibration.h.
pp332::pp332 | ( | const name_t & | name | ) |
constructor.
Definition at line 680 of file pixel_detector_calibration.cpp.
References loadSettings().
|
virtual |
write the calibrations before quitting
Reimplemented from cass::Processor.
Definition at line 760 of file pixel_detector_calibration.cpp.
References _write, and writeHotPixelMap().
|
protected |
write the calibration data to file
Definition at line 715 of file pixel_detector_calibration.cpp.
References _filename, cass::AccumulatingProcessor::_result, cass::Log::add(), cass::Result< T >::begin(), cass::AccumulatingProcessor::result(), cass::Result< T >::shape(), size, cass::toString(), and cass::Log::WARNING.
Referenced by loadSettings().
|
virtual |
load the settings of this pp
Reimplemented from cass::Processor.
Definition at line 686 of file pixel_detector_calibration.cpp.
References _aduRange, cass::Processor::_condition, _counter, _filename, _image, _maxADUVal, _maxConsecutiveCount, _nFrames, _write, cass::Log::add(), QSettings::beginGroup(), cass::AccumulatingProcessor::createHistList(), QString::fromStdString(), cass::Log::INFO, loadHotPixelMap(), cass::Processor::name(), cass::Processor::setupCondition(), cass::Processor::setupDependency(), cass::Processor::setupGeneral(), and QSettings::value().
Referenced by pp332().
overwrite default behaviour don't do anything
go though all pixels of image
check if pix is not masked as hot
check if pixel is within the hot pixel adu range
check if pixel exceeds maximum allowed adu value
if we have reached the requested nbr of frames calculate the gain map
Reimplemented from cass::Processor.
Definition at line 766 of file pixel_detector_calibration.cpp.
References _aduRange, _image, _maxADUVal, _maxConsecutiveCount, cass::Result< T >::begin(), cass::Result< T >::end(), cass::fuzzycompare(), cass::CASSEvent::id(), cass::Result< T >::lock, and cass::Result< T >::shape().
|
protected |
write the calibration data to file
Definition at line 745 of file pixel_detector_calibration.cpp.
References _filename, cass::AccumulatingProcessor::_result, cass::Result< T >::begin(), mask, cass::AccumulatingProcessor::result(), and cass::Result< T >::shape().
Referenced by aboutToQuit().
|
private |
the range of adu that indicates whether a pixel is hot
Definition at line 518 of file pixel_detector_calibration.h.
Referenced by loadSettings(), and process().
|
private |
counter to count how many times this has been called
Definition at line 533 of file pixel_detector_calibration.h.
Referenced by loadSettings().
|
private |
the filename that is used to save the calibration
Definition at line 527 of file pixel_detector_calibration.h.
Referenced by loadHotPixelMap(), loadSettings(), and writeHotPixelMap().
|
private |
the image to create the hotpixel map from
Definition at line 509 of file pixel_detector_calibration.h.
Referenced by loadSettings(), and process().
|
private |
the maximum allowed adu value
Definition at line 521 of file pixel_detector_calibration.h.
Referenced by loadSettings(), and process().
|
private |
the number of times a pixel is high before masking it as hot pixel
Definition at line 512 of file pixel_detector_calibration.h.
Referenced by loadSettings(), and process().
|
private |
the number of frames after which the gain map is calculted
Definition at line 530 of file pixel_detector_calibration.h.
Referenced by loadSettings().
|
private |
flag to tell whether the calibration should be written
Definition at line 524 of file pixel_detector_calibration.h.
Referenced by aboutToQuit(), and loadSettings().