Luiza
v03-01
|
Simple processor to find pixel clusters (stars) on the CCD frame. More...
#include <PixelClusterFinder.h>
Public Member Functions | |
virtual Processor * | newProcessor () |
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 ¶meterName) |
Check if parameter defines collection. More... | |
bool | isOutputCollectionName (const std::string ¶meterName) |
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 ¶meter, 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 ¶meter, 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 ¶meter, 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 ¶meter, 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 ¶meter, 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 | _outputCollectionName |
Name of the output image collection. | |
std::vector< std::string > | _copykey |
Keywords of image fits header to copied to the table header. | |
bool | _permanentCollection |
Flag the output collection to be permanent. | |
double | _seedThreshold |
Threshold for the cluster seed signal (in units of noise level) | |
double | _pixThreshold |
Threshold for the cluster pixel signal (in units of noise level) | |
bool | _moreNeighbours |
When set to true: search neighbours in 5x5 square rather than 3x3. | |
int | _maxPixels |
Maximum number of pixels in the cluster. More... | |
int | _maxClusters |
Maximum number of clusters. More... | |
int | _backgroundSampling |
Background sampling factor. More... | |
int | _frameDivision |
Frame division for background calculation. More... | |
int | _bgPol |
Background level interpolation flag. | |
int | _noisePol |
Noise level interpolation flag. | |
bool | _useTelescopeParameters |
Use network configuration file to update processor parameters. More... | |
bool | _addNoise |
Flag for writing noise information to output table. | |
string | _noiseColumn |
Column name for noise information. | |
bool | _addSpread |
Flag for writing spread information to output table. | |
std::vector< std::string > | _spreadColumns |
Column names for spread information. | |
bool | _addShape |
Flag for writing shape information to output table. | |
std::vector< std::string > | _shapeColumns |
Column names for shape information. | |
Protected Attributes inherited from luiza::Processor | |
std::string | _description |
Describes what the processor does. Set in constructor. | |
Simple processor to find pixel clusters (stars) on the CCD frame.
Processor to find pixel clusters (stars) on CCD images in the input collection. This algorithm searches for groups of pixels with signal above the defined threshold. The seed pixel is searched first (with tighter seed selection cut) and then the neighbouring pixels, with signal above pixel signal threshold (which can be looser) are added to form the cluster. The algroithm assumes that the cluster should have one maximum only, if two maxima (above seed threshold) are found two clusters will be reconstructed. To define thresholds, mean background level and average noise level are calculated first.
InputCollectionName | - Name of the collection containing images to be added |
SeedThreshold | - Threshold for the cluster seed signal, given in units of noise level (above background level) |
PixelThreshold | - Threshold for the cluster pixel signal, given in units of noise level (above background level) |
MoreNeighbours | - When set to true: search neighbours in 5x5 square rather than 3x3 (default) |
MaxPixels | - Maximum number of pixels considered in cluster CoG and signal calculation |
MaxClusters | - Maximum number of clusters to be reconstructed |
BackgroundSampling | - Background level calculation can be sped up by considering only 1/BackgroundSampling of pixels. |
FrameDivision | - Background and Noise is calculated for FrameDivision x FrameDivision subimages and then interpolated between them. |
BackgroundInterpolation | - Flag for interpolation between background levels calculated in different subframes: 0 - no interpolation, 1 -linear linterpolation (default). |
NoiseInterpolation | - Flag for interpolation between noise levels calculated in different subframes: 0 - no interpolation, 1 -linear linterpolation (default). |
Object lists are stored in the output collection
OutputCollectionName | - Name of the collection where object table will be stored |
AddNoise | Flag to add noise information to the output table. |
NoiseColumn | Name for the noise column. Default name is "Noise" |
AddSpread | Flag to add charge spread information to the output table: RMS in X, RMS in Y and X-Y correlation. |
SpreadColumns | Names for columns containing charge spread information. Default names are "RMS_X", "RMS_Y" and "CORR_XY" |
AddShape | Flag to add charge distribution shape information to the output table: object size(FWHM), elongation (ellipticity), spread along primary (longer) and secondary (shorter) axis, and orientation (direction of the primary axis in degrees). |
ShapeColumns | Names for columns containing charge distribution shape information. Default names are "FWHM", "ELONG", "LENGTH", "WIDTH" and "ANGLE" |
HeaderRecords | - Keywords of image fits header, which should be copied to the fits header of the object list. Default list consists of following records: DATE-OBS, JD, HJD, OBJECT, TELESCOP, INSTRUME, OBSERVAT, RA, DEC. |
PermanentCollection | - Flag output collection, as permanent, not deleted after loop is finished (default is false) |
|
virtual |
Called for every loop - right after processData() call.
Can be used to check processing and/or produce check plots.
Reimplemented from luiza::Processor.
|
virtual |
Called after data processing for clean up.
Reimplemented from luiza::Processor.
References printEndMessage().
|
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 _addNoise, _addShape, _addSpread, _inputCollectionName, _noiseColumn, _outputCollectionName, _shapeColumns, _spreadColumns, luiza::Processor::name(), and luiza::Processor::parameters().
|
inlinevirtual |
Return a new instance of the processor.
Has to be implemented by subclasses.
Implements luiza::Processor.
|
protected |
Test method for const.
Referenced by end().
|
virtual |
Called for every data loop
Reimplemented from luiza::Processor.
References _addNoise, _addShape, _addSpread, _backgroundSampling, _bgPol, _copykey, _frameDivision, _inputCollectionName, _maxClusters, _maxPixels, _moreNeighbours, _noiseColumn, _noisePol, _outputCollectionName, _permanentCollection, _pixThreshold, _seedThreshold, _shapeColumns, _spreadColumns, _useTelescopeParameters, gloria::GloriaFitsTable::AddColumn(), gloria::GloriaFitsHeader::AddKeyword(), gloria::GloriaObjectList::AddObject(), gloria::GloriaClusterStatistics::AddPixel(), gloria::GloriaMedianMap::CalculateBgMap(), gloria::GloriaDataContainer::CreateTableCollection(), gloria::GloriaMedianMap::GetBgImage(), gloria::GloriaMedianMap::GetBgMap(), gloria::GloriaMedianMap::GetBgMean(), gloria::GloriaClusterStatistics::GetElongation(), gloria::GloriaFitsImage::GetFloatImageData(), gloria::GloriaClusterStatistics::GetFWHM(), gloria::GloriaDataContainer::GetImageCollection(), gloria::GloriaFitsImage::GetIntImageData(), gloria::GloriaFitsHeader::GetKeywordRecord(), gloria::GloriaClusterStatistics::GetLength(), gloria::GloriaMedianMap::GetNoiseImage(), gloria::GloriaMedianMap::GetNoiseMap(), gloria::GloriaMedianMap::GetNoiseMean(), gloria::GloriaObjectList::GetObjectNumber(), gloria::GloriaClusterStatistics::GetOrientation(), gloria::GloriaClusterStatistics::GetSignal(), gloria::GloriaDataContainer::GetTableCollection(), gloria::GloriaClusterStatistics::GetWidth(), gloria::GloriaClusterStatistics::GetXpos(), gloria::GloriaClusterStatistics::GetXspread(), gloria::GloriaClusterStatistics::GetXYcorr(), gloria::GloriaClusterStatistics::GetYpos(), gloria::GloriaClusterStatistics::GetYspread(), gloria::GloriaDataContainer::ImageCollectionExists(), gloria::GloriaFitsHeader::InputFileName(), gloria::GloriaFitsImage::IsFloatImage(), gloria::GloriaFitsHeader::IsKeywordSet(), gloria::GloriaFitsTable::Print(), gloria::GloriaFitsHeader::PrintHeader(), gloria::GloriaFitsHeader::SetInputFileName(), gloria::GloriaFitsTable::SetLast(), luiza::Processor::setReturnValue(), gloria::GloriaFitsImage::SizeX(), gloria::GloriaFitsImage::SizeY(), gloria::GloriaDataContainer::TableCollectionExists(), and luiza::Processor::updateTelescopeParameters().
|
protected |
Background sampling factor.
Parameter used to speed up background level calculation. Only every BackgroundSampling pixel is used.
Referenced by processData().
|
protected |
Frame division for background calculation.
Background is calculated for FrameDivision x FrameDivision subimages and then interpolated between them
Referenced by processData().
|
protected |
Maximum number of clusters.
Cluster finding is interrupted if this number of clusters is found. As cluster seeds are sorted according to the signal, clusters with higher signal are likely (but not guaranteed) to be found first.
Referenced by processData().
|
protected |
Maximum number of pixels in the cluster.
If more pixels are found in the cluster, they are not used in signal or CoG calculation. Nevertheless, they are not allowed to form separate clusters.
Referenced by processData().
|
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().