Luiza
v03-01
|
Processor to normalize brightness measurements on the whole frame. More...
#include <CalibrateFrameObjects.h>
Public Member Functions | |
virtual Processor * | newProcessor () |
Return a new instance of the processor. More... | |
virtual void | init () |
virtual void | startAnalysis (GloriaDataContainer *data) |
Called before first data loop. More... | |
virtual void | processData (GloriaDataContainer *data) |
virtual void | check (GloriaDataContainer *data) |
Called for every loop - right after processData() call. More... | |
virtual void | concludeAnalysis (GloriaDataContainer *data) |
Called after all data processing loops to finalize the analysis. | |
virtual void | end () |
Public Member Functions inherited from luiza::Processor | |
Processor (const std::string &typeName) | |
Default constructor. More... | |
virtual | ~Processor () |
Destructor. | |
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 collection containing object lists. | |
string | _skyCatalogName |
Name of the collection containing sky catalog to be matched. | |
string | _outputCollectionName |
Name of the output table collection, with calibration results. | |
bool | _permanentCollection |
Flag the output collection to be permanent. | |
string | _inputImageCollection |
Name of the input image collection - just to get size of images. | |
string | _calibrationImageCollection |
Name of the image collection to store calibration correction image. | |
string | _errorImageCollection |
Name of the image collection to store calibration uncertainty image. | |
string | _calibrationMapCollection |
Name of the table collection to store calibration correction map. | |
double | _matchingTolerance |
Position matching tolerance for object and reference stars. | |
std::vector< std::string > | _positionColumns |
Names of the position columns in the table. | |
std::string | _brightnessColumn |
Name of the object brightness column. | |
bool | _magnitudoGiven |
Flag for brightness given in magintudo. | |
string | _referenceMagColumn |
Name of the column containing reference magnitudo. | |
vector< float > | _referenceMagRange |
Magnitudo range for reference stars used for calibration. | |
int | _frameDivision |
Frame division for calibration map calculation. More... | |
bool | _autoAdjustDivision |
Flag to allow automatic adjustment of map binning for too few entries. | |
int | _correctionFitOrder |
Order of the polynomial fit of correction dependence on position. | |
int | _interpolationOrder |
Polinomial order used to interpolate calibration map. | |
vector< int > | _inputImageSize |
Size of the image corresponding to the analysed object list (for map definition) | |
vector< std::string > | _outputColumnNames |
Names of columns for calibrated magnitudo and estimated uncertainty. | |
Protected Attributes inherited from luiza::Processor | |
std::string | _description |
Describes what the processor does. Set in constructor. | |
Processor to normalize brightness measurements on the whole frame.
This processor analyses the object list of the input collection and normalizes all brightness measurements based on the reference stars found. Reference stars can be searched for in the GloriaSkyCatalog collection or selected from the object table itself (if already matched with the catalog, eg. with MatchSkyCatalog. AverageMap is used to create calibration map for the frame, based on the identified reference stars. The map is then applied to all objects in the table, estimated calibration error is also calculated.
InputCollectionName | Name of the collection containing GloriaObjectList |
SkyCatalogName | Name of the collection containing GloriaSkyCatalog. If missing, reference magnitudo will be searched for in the input object table (assuming it was already matched to the catalog). |
InputImageCollection | Name of the collection containing sky images, which were used to reconstruct analysed object lists. Image size has to be known to define calibration map. |
InputImageSize | Size of the image corresponding to the analysed object list. Image size has to be known to define calibration map. If image collection is not available, size can be specified by hand using this parameter. |
MatchingTolerance | Tolerance for object position matching, given in degrees |
PositionColumns | Names of the object table columns from which object position should be taken. These are 'RA' and 'DEC' by default (default column names for Luiza astrometry processor), but can be changed by user. |
BrightnessColumn | Name of the object list column from which object brightness should be taken ('Signal' by default). |
MagnitudoGiven | Flag to indicate that the brightness stored in the input table is already in magnitudo scale (logarythmic). Default is 'false'. |
ReferenceMagColumn | Names of the column in catalog table (or input object table, if SkyCatalogName is not given) which contains reference star magnitudo. Default is "Mag". |
ReferenceMagRange | Range of the reference star magnitodo, which should be used for frame calibration |
FrameDivision | Calibration map is calculated using AverageMap class, for frame divided into FrameDivision x FrameDivision subframes and then interpolating between them. |
AutoAdjustDivision | When this flag is set true, and there are too few entries to calculate (fit) calibration correction for each map bin, frame division is reduced to get more reliable calibration (number of entries per bin has to be larger than twice the number of parameters in the fit). |
CorrectionFitOrder | Order of the polynomial used to fit calibration correction dependence on the reference star position. The default is 0 i.e. constant correction (averaged over selected reference stars) for each subframe. Polynomial fit is only performed if the sufficient number of reference stars is found (at least twice the number of parameters) in given subframe. Only correction value for the subframe center is stored in the calibration map. For polynomial order set to zero plain average is calculated, when set to negative value median from calibration corrections for reference stars is calculated in each bin. |
InterpolationOrder | polinomial order used to interpolate between centers of subframes when calculating calibration correction. No interpolation is used for calibration uncertainty (!). |
OutputCollectionName | Name of the collection where the output table will be stored. If missing, corrected magnitudo will be added to the input table. |
PermanentCollection | Flag output collection, as permanent, not deleted after loop is finished (default is false) |
OutputColumnNames | Names of columns to which calibrated object magnitudo and estimated calibration uncertainty should be stored. Default is 'Mag' and 'err_Mag'. If only one name is given, error is not stored. If three names are given, average frame uncertainty is also stored. |
CalibrationImageCollection | Name of the image collection where the calibration correction image (created from map stored in AverageMap) will be stored. If missing, no image is stored. |
ErrorImageCollection | Name of the image collection where the calibration uncertainty image (created from map stored in AverageMap) will be stored. If missing, no image is stored. |
CalibrationMapCollection | Name of the table collection where the calibration correction map (created from map stored in AverageMap) will be saved If missing, no table is stored. |
|
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 _inputCollectionName, _inputImageCollection, _inputImageSize, _outputCollectionName, _outputColumnNames, _referenceMagRange, _skyCatalogName, 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 _autoAdjustDivision, _brightnessColumn, _calibrationImageCollection, _calibrationMapCollection, _correctionFitOrder, _errorImageCollection, _frameDivision, _inputCollectionName, _inputImageCollection, _inputImageSize, _interpolationOrder, _magnitudoGiven, _matchingTolerance, _outputCollectionName, _outputColumnNames, _permanentCollection, _positionColumns, _referenceMagColumn, _referenceMagRange, _skyCatalogName, gloria::GloriaFitsTable::AddColumn(), gloria::GloriaFitsTable::AdjustColumns(), gloria::GloriaAverageMap::CalculateFitMap(), gloria::GloriaAverageMap::CalculateMap(), gloria::GloriaMedianMap::CalculateMap(), gloria::GloriaFitsTable::ColumnExists(), gloria::GloriaDataContainer::CreateImageCollection(), gloria::GloriaDataContainer::CreateTableCollection(), gloria::GloriaAverageMap::GetAverage(), gloria::GloriaAverageMap::GetAverageImage(), gloria::GloriaDataContainer::GetImageCollection(), gloria::GloriaFitsTable::GetRowNumber(), gloria::GloriaAverageMap::GetSpread(), gloria::GloriaAverageMap::GetSpreadImage(), gloria::GloriaAverageMap::GetSpreadMean(), gloria::GloriaValueMap::GetTable(), gloria::GloriaDataContainer::GetTableCollection(), gloria::GloriaFitsTable::GetVectorOf(), gloria::GloriaObjectList::GetXposVector(), gloria::GloriaObjectList::GetYposVector(), gloria::GloriaDataContainer::ImageCollectionExists(), gloria::GloriaAverageMap::InitializeMaps(), gloria::GloriaFitsTable::IsSortedBy(), gloria::GloriaSkyCatalog::MatchObjectTable(), gloria::GloriaValueMap::SetImageSize(), luiza::Processor::setReturnValue(), gloria::GloriaFitsImage::SizeX(), gloria::GloriaFitsImage::SizeY(), gloria::GloriaFitsTable::SortTable(), and gloria::GloriaDataContainer::TableCollectionExists().
|
virtual |
Called before first data loop.
Can be used to create permanent data structures, if needed.
Reimplemented from luiza::Processor.
|
protected |
Frame division for calibration map calculation.
Calibration correction is calculated for FrameDivision x FrameDivision subimages and then interpolated between them
Referenced by processData().