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

Processor to calculate Gaus Kernel and apply it to the image frame. More...

#include <ApplyGausKernel.h>

Inheritance diagram for luiza::ApplyGausKernel:
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 startAnalysis (GloriaDataContainer *data)
 Called before first data processing loop. More...
 
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 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 _imageCollectionName
 Name of the image collection containing images.
 
string _inputTableOfParameters
 Name of the table collection containing tables.
 
string _outputListCollectionName
 Name of the output object list collection.
 
string _outputFrameCollectionName
 Name of the output collection for convoluted frames.
 
bool _permanentList
 Flag the output object list collection to be permanent.
 
bool _permanentFrame
 Flag the output collection of convoluted frames to be permanent.
 
int _backgroundSampling
 Background sampling factor. More...
 
int _backgroundFrameDivision
 Frame division for background calculation. More...
 
bool _variableKernelFlag
 Flag to decide, whether kernel size is constant or variable. If it's is true, size is variable, else constant.
 
int _fixedKernelSize
 If kernel have got constant size, user set the value of size of kernel.
 
int _interpolationOrder
 Polinomial order used to interpolate background map.
 
double _pixThresholdKernel
 Threshold for the cluster pixel signal (in units of noise level)
 
double _pixCut
 Decide wchich pixel is included to star (in units of the brightest pixel in the star)
 
double _minDistBetweenStars
 Minimum distance between two stars.
 
double _starCogRadius
 Radius for calculating star position with CoG method.
 
std::vector< std::string > _copykey
 Keywords of image fits header to copied to the table header.
 
- Protected Attributes inherited from luiza::Processor
std::string _description
 Describes what the processor does. Set in constructor.
 

Detailed Description

Processor to calculate Gaus Kernel and apply it to the image frame.

This processor can be used to convolut sky image with Gaus Kernel based on the input PSF shape parameters. Shape parameters can be loaded from the table collection prepared in CalculateGausPSF. Kernel size can be set by user or calculated automatically from the shape parameters. After convoluting the sky frame with the kernel, the processor searches for the objects in an image and calculates their position (from signal weighted pixel positions).

Input
Processor loads images from image collection and uses shape parameter tables loaded from table collection
Parameters
ImageCollectionName- Name of the collection containing input images
InputTableOfParameters- Name of the table collection with shape parameters (calculated in CalculateGausPSF)
Algorithm parameters
User can modify processor performance by specify number of sectors on the analysed frame. Moreover user can choose, whether want only brigher stars or also darker by defining parameter to distinguish the stars from the sky (in units of noise level)
Parameters
VariableKernelFlag- flag to decide whether kernel size should be fixed by user (when set to false) or variable (calculated from PSF size; default)
FixedKernelSize- size of kernel, to be used when VariableKernelSize is set to false
PixelThresholdKernel- Threshold for the pixel convoluted frame (in units of noise level), to be considered star seed.
PixelCut- parameter to decide which pixels from convoluted image are included in the star position calculation. Only pixels with signal above pixCut x seed signal on the original image (!) are included.
MinDistBetweenStars- if two maximal pixels are closer than "MinDistBetweenStars", only the higher one is used to reconstruct the star
StarCogRadius- radius (around seed pixel) for star position calculation with Center-Of-Gravity method (CoG). The algorithm is run twice: first using the seed pixel and then using the position from first iteration.
BackgroundSampling- Background level calculation for the inlut image can be sped up by considering only 1/BackgroundSampling of pixels.
BackgroundFrameDivision- Background for the image is calculated for BackgroundFrameDivision x BackgroundFrameDivision subimages and then interpolated between them.
InterpolationOrder- polinomial order used to interpolate between centers of subframes when calculating background values on the image
Output
Object lists are stored in the output collection
Parameters
OutputListCollectionName- Name of the collection where object list table will be stored
OutputFrameCollectionNam- Name of the collection where convoluted frames will be stored
HeaderRecords- Keywords of image fits header, which should be copied to the fits header of the object list table. Default list consists of following observation describing keywords (as suggested in FITS standard): DATE-OBS, TELESCOP, INSTRUME, OBSERVER, OBJECT.
PermanentList- Flag output object list collection, as permanent, not deleted after loop is finished (default is false)
PermanentFrame- Flag output image collection, as permanent, not deleted after loop is finished (default is false)

Member Function Documentation

void luiza::ApplyGausKernel::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::ApplyGausKernel::end ( )
virtual

Called after data processing for clean up.

Reimplemented from luiza::Processor.

References printEndMessage().

void luiza::ApplyGausKernel::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 _imageCollectionName, _inputTableOfParameters, _outputFrameCollectionName, _outputListCollectionName, luiza::Processor::name(), and luiza::Processor::parameters().

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

Return a new instance of the processor.

Has to be implemented by subclasses.

Implements luiza::Processor.

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

Test method for const.

Referenced by end().

void luiza::ApplyGausKernel::processData ( GloriaDataContainer data)
virtual
void luiza::ApplyGausKernel::startAnalysis ( GloriaDataContainer )
virtual

Called before first data processing loop.

Can be used to initialize data collections required for analysis, eg. define permanent collections, or fill them with external data (from file, database or net). It is possible as GloriaDataContainer is already defined, contrary to init().

Reimplemented from luiza::Processor.

Member Data Documentation

int luiza::ApplyGausKernel::_backgroundFrameDivision
protected

Frame division for background calculation.

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

Referenced by processData().

int luiza::ApplyGausKernel::_backgroundSampling
protected

Background sampling factor.

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

Referenced by processData().


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