Luiza  v03-01
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
luiza::BackgroundImage Class Reference

Processor to generate background/noise map from CCD frame. More...

#include <BackgroundImage.h>

Inheritance diagram for luiza::BackgroundImage:
luiza::Processor

Public Member Functions

virtual ProcessornewProcessor ()
 Return a new instance of the processor. More...
 
virtual void init ()
 
virtual void processData (GloriaDataContainer *data)
 
virtual void check (GloriaDataContainer *data)
 Called for every loop - right after processData() call. More...
 
virtual void end ()
 
- Public Member Functions inherited from luiza::Processor
 Processor (const std::string &typeName)
 Default constructor. More...
 
virtual ~Processor ()
 Destructor.
 
virtual void startAnalysis (GloriaDataContainer *)
 Called before first data processing loop. More...
 
virtual void concludeAnalysis (GloriaDataContainer *)
 Called after all data processing loops. More...
 
virtual const std::string & type () const
 Return type name for the processor (as set in constructor).
 
virtual const std::string & name () const
 Return name of this processor.
 
virtual const std::string & logLevelName () const
 Return name of the local verbosity level of this processor - "" if not set.
 
virtual StringParameters * parameters ()
 Return parameters defined for this Processor.
 
virtual void printDescription ()
 Print information about this processor in ASCII steering file format.
 
virtual void printDescriptionXML (std::ostream &stream=std::cout)
 Print information about this processor in XML steering file format.
 
template<class T >
void printParameters ()
 Print the parameters and their values depending on the given verbosity level.
 
void printParameters ()
 Print the parameters and their values with verbosity level MESSAGE.
 
const std::string & description ()
 Description of processor.
 
bool isFirstEvent ()
 True if first event in processEvent(evt) - use this e.g. to initialize histograms etc.
 
GloriaCollectionType getGloriaInType (const std::string &colName)
 Return the input type for the collection colName. More...
 
GloriaCollectionType getGloriaOutType (const std::string &colName)
 Return the output type for the collection colName. More...
 
bool isInputCollectionName (const std::string &parameterName)
 Check if parameter defines collection. More...
 
bool isOutputCollectionName (const std::string &parameterName)
 True if the given parameter defines an LCIO output collection */.
 

Protected Member Functions

void printEndMessage () const
 
- Protected Member Functions inherited from luiza::Processor
void setReturnValue (bool val)
 Set the return value for this processor - typically at end of processEvent(). More...
 
void setReturnValue (const std::string &name, bool val)
 Set a named return value for this processor - typically at end of processEvent() More...
 
template<class T >
void registerProcessorParameter (const std::string &name, const std::string &description, T &parameter, const T &defaultVal, int setSize=0)
 Register a steering variable for this processor - call in constructor of processor. More...
 
void registerInputCollection (const GloriaCollectionType &type, const std::string &name, const std::string &description, std::string &parameter, const std::string &defaultVal, int setSize=0)
 Register parameter describing input collection. More...
 
void registerOutputCollection (const GloriaCollectionType &type, const std::string &name, const std::string &description, std::string &parameter, const std::string &defaultVal, int setSize=0)
 Register parameter describing output collection. More...
 
void registerInputCollections (const GloriaCollectionType &type, const std::string &name, const std::string &description, StringVec &parameter, const StringVec &defaultVal, int setSize=0)
 Register parameter describing input collections. More...
 
template<class T >
void registerOptionalParameter (const std::string &name, const std::string &description, T &parameter, const T &defaultVal, int setSize=0)
 Same as registerProcessorParameter except that the parameter is optional. More...
 
bool parameterSet (const std::string &name)
 Tests whether the parameter has been set in the steering file.
 
template<class T >
void message (const std::string &message) const
 Print message according to verbosity level. More...
 
template<class T >
void message (const std::basic_ostream< char, std::char_traits< char > > &m) const
 Similar to message(const std::string& message) More...
 
std::stringstream & log () const
 Returns an empty stringstream that is used by the message method.
 
virtual void setProcessorParameters (StringParameters *parameters)
 Allow friend class CCProcessor to change/reset processor parameters.
 
virtual void updateParameters ()
 Allow friend class CCProcessor to update processor parameters.
 
virtual void updateTelescopeParameters (std::string name)
 Allow to update processor parameters for given telescope name. More...
 
virtual void updateTelescopeParameters (GloriaFitsHeader *header)
 Update processor parameters based on FITS header. More...
 

Protected Attributes

string _inputCollectionName
 Name of the image collection containing images to be added.
 
string _backgroundCollectionName
 Name of the output background image collection.
 
string _noiseCollectionName
 Name of the output noise image collection.
 
bool _permanentCollection
 Flag the output collections to be permanent.
 
int _backgroundSampling
 Background sampling factor. More...
 
int _frameDivision
 Frame division for background calculation. More...
 
int _interpolationOrder
 Polinomial order used to interpolate background map.
 
bool _useTelescopeParameters
 Use network configuration file to update processor parameters. More...
 
- Protected Attributes inherited from luiza::Processor
std::string _description
 Describes what the processor does. Set in constructor.
 

Detailed Description

Processor to generate background/noise map from CCD frame.

Processor calculates background map from given image. The frame is divided into FrameDivision x FrameDivision subframes, then background level and noise are calculated from median in each subframe. Finally, background and/or noise image are created by interpolating between subframe centers. New images have the same resolution as the input image.

Input
Processor takes images from Gloria data collection
Parameters
InputCollectionName- Name of the collection containing images to be added
Algorithm parameters
User can modify processor performance by setting following parameters:
Parameters
BackgroundSampling- Background level calculation can be sped up by considering only 1/BackgroundSampling of pixels.
FrameDivision- Background is calculated for FrameDivision x FrameDivision subimages and then interpolated between them.
InterpolationOrder- polinomial order used to interpolate between centers of subframes when calculating background image
Output

Background and/or noise images can be stored in data collection

Parameters
BackgroundCollectionName- Name of the collection where background image will be stored
NoiseCollectionName- Name of the collection where noise image will be stored
PermanentCollection- Flag output collection(s), as permanent, not deleted after loop is finished (default is false)

Member Function Documentation

void luiza::BackgroundImage::check ( GloriaDataContainer )
virtual

Called for every loop - right after processData() call.

Can be used to check processing and/or produce check plots.

Reimplemented from luiza::Processor.

void luiza::BackgroundImage::end ( )
virtual

Called after data processing for clean up.

Reimplemented from luiza::Processor.

References printEndMessage().

void luiza::BackgroundImage::init ( )
virtual

Called at the begin of the job before anything is read. Use to initialize the processor, e.g. book histograms.

Reimplemented from luiza::Processor.

References _backgroundCollectionName, _inputCollectionName, _noiseCollectionName, luiza::Processor::name(), and luiza::Processor::parameters().

virtual Processor* luiza::BackgroundImage::newProcessor ( )
inlinevirtual

Return a new instance of the processor.

Has to be implemented by subclasses.

Implements luiza::Processor.

void luiza::BackgroundImage::printEndMessage ( ) const
protected

Test method for const.

Referenced by end().

void luiza::BackgroundImage::processData ( GloriaDataContainer data)
virtual

Member Data Documentation

int luiza::BackgroundImage::_backgroundSampling
protected

Background sampling factor.

Parameter used to speed up background level calculation. Only every BackgroundSampling pixel is used.

Referenced by processData().

int luiza::BackgroundImage::_frameDivision
protected

Frame division for background calculation.

Background is calculated for FrameDivision x FrameDivision subimages and then interpolated between them

Referenced by processData().

bool luiza::BackgroundImage::_useTelescopeParameters
protected

Use network configuration file to update processor parameters.

When true, network configuration file is checked for each analysed image and processor parameters are changed if default parameter values are defined for given instrument/telescope.

Referenced by processData().


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