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

Processor to reconstruct light curve of given object. More...

#include <ObjectLightCurve.h>

Inheritance diagram for luiza::ObjectLightCurve:
luiza::Processor

Public Member Functions

virtual ProcessornewProcessor ()
 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 &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 collection containing object lists.
 
string _outputCollectionName
 Name of the output light curve collection.
 
std::vector< float > _objectPosition
 Object position.
 
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.
 
std::string _polarAngleColumn
 Name of DEC column (for proper distance calculation)
 
std::vector< float > _referenceStars
 Reference star positions and brightnesses.
 
string _referenceStarCatalog
 Name of the collection containing reference stars.
 
string _referenceMagColumn
 Names of table columns containing reference star positions and magintudo.
 
double _referenceMaxDist
 Maximum distance to reference star from file.
 
int _maxReferenceCount
 Maximum number of reference stars to be used.
 
int _correctionFitOrder
 Order of the polynomial fit of correction dependence on position.
 
bool _referenceUseMedian
 Flag for using median instead of mean for calibration to reference stars.
 
bool _estimateError
 Flag to do photometry error estimate, based on reference star spread.
 
std::vector< std::string > _copyColumns
 Names of table columns to be copied in the light curve.
 
std::vector< std::string > _headerRecords
 Names of table header records to be added in the light curve.
 
- Protected Attributes inherited from luiza::Processor
std::string _description
 Describes what the processor does. Set in constructor.
 

Detailed Description

Processor to reconstruct light curve of given object.

This processor analyses the object list of the input collection and finds measurements of the selected object based on its coordinates (on the sky or on the CCD). The measurement is then added to the new, permanent output collection. It is also possible to normalize the brightness measurement to the reference stars, by giving their positions and brightness. User can either select reference star(s) by himself (using ReferenceStars parameter) or specify the name of a table collection, where reference stars are stored. In the latter case, reference stars are selected based on ReferenceMaxDist and MaxReferenceCount parameters. When multiple reference stars are selected, photometric calibration can be based on average magnitudo correction, correction median or polinomial fit of correction dependence on reference star position. With multiple reference stars it is also possible to estimate photometry uncertainty.

Input
Processor reads object lists from input collection
Parameters
InputCollectionName- Name of the collection containing GloriaObjectList
Algorithm parameters
User has to specify object position on the CCD or on the sky (if the astrometry is available) and the matching tolerance.
Parameters
ObjectPositionExpected object position. If (Ra,Dec) is used, it should be given in degrees.
MatchingToleranceTolerance for object position matching, given in same units as object position.
PositionColumnsNames of the 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.
BrightnessColumnName of the table column from which object brightness should be taken ('Signal' by default).
MagnitudoGivenFlag to indicate that the brightness stored in the input table is already in magnitudo scale (logarythmic). Default is 'false'.
PolarAngleColumnWhen object position on the sky is given, distance has to be calculated differently than in case of CCD position. Namely, distance in RA has to be scaled by cosine of polar angle. Default value is 'DEC'.
ReferenceStarsWhen given, object brightness is normalized to this star. Multiple reference stars can also be given. Position in same units as for object of interest and magnitudo should be given for each reference star (eg. RA,DEC,Mag).
ReferenceStarCatalogIt is also possible to user reference star catalog stored in internal GloriaSkyCatalog table (it can be read from file using eg. TableTextReader processors). GloriaSkyCatalog should include RA and DEC positions of the reference stars in the first two columns (by definition), one of the other columns need to specify object magnitudo (column name to be specified by ReferenceMagColumn parameter). Collection name should be specified in this parameter.
ReferenceMagColumnNames of the column in ReferenceStarCatalog table which contains reference star magnitudo. Default is "Mag".
ReferenceStarFileNo longer supported! If the list of reference stars is available as a text file, it should be first read into the data table using TableTextReader processors.
ReferenceMaxDistMaximum allowed distance to reference star. When reference stars are read from file, value of this parameter is used to select a subset of reference stars for analysis. This allows user to have one reference file defined for given field, and then select proper stars for each object of interest automatically. If zero value given, all stars are used.
MaxReferenceCountMaximum number of reference stars. Stars closest to the object position are selected, within ReferenceMaxDist.
CorrectionFitOrderOrder 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). Polynomial fit is only performed if the sufficient number of reference stars is selected (at least twice the number of parameters).
ReferenceUseMedianFlag for using median correction value instead of mean value for calibration with multiple reference stars. May help to avoid large correction fluctuations due to single reference stars.
EstimateErrorWhen multiple reference stars are used for photometry calibration and this flag is set to true, correction spread is used to get photometry error estimate.
Output
Object ligth curve is stored in the permanent output table
Parameters
OutputCollectionNameName of the collection where light curve table will be stored
CopyColumnsNames of the columns from the input object list which should be copied to the light curve
HeaderRecordsList of FITS header fields from the input table to be copied to the light curve table

Member Function Documentation

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

Called after data processing for clean up.

Reimplemented from luiza::Processor.

References printEndMessage().

void luiza::ObjectLightCurve::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 _inputCollectionName, _outputCollectionName, luiza::Processor::name(), and luiza::Processor::parameters().

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

Return a new instance of the processor.

Has to be implemented by subclasses.

Implements luiza::Processor.

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

Test method for const.

Referenced by end().

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

Called before first data loop.

Can be used to create permanent data structures, if needed.

Reimplemented from luiza::Processor.


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