LSSTApplications  8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
lsst::meas::algorithms::MeasureSources Class Reference

#include <Measure.h>

Public Types

typedef MeasureSourcesBuilder Builder
 
typedef std::list
< boost::shared_ptr< Algorithm
const > > 
AlgorithmList
 

Public Member Functions

AlgorithmList const & getAlgorithms () const
 Return the list of algorithms. More...
 
template<typename PixelT >
void apply (afw::table::SourceRecord &source, afw::image::Exposure< PixelT > const &exposure, afw::geom::Point2D const &center, bool refineCenter=true) const
 Apply the registered algorithms to the given source. More...
 
template<typename PixelT >
void apply (afw::table::SourceRecord &source, afw::image::Exposure< PixelT > const &exposure) const
 Apply the registered algorithms to the given source. More...
 
template<typename PixelT >
void applyWithCoord (afw::table::SourceRecord &source, afw::image::Exposure< PixelT > const &exposure) const
 Apply the registered algorithms to the given source. More...
 
template<typename PixelT >
void applyWithPixel (afw::table::SourceRecord &source, afw::image::Exposure< PixelT > const &exposure) const
 Apply the registered algorithms to the given source. More...
 
template<typename PixelT >
void apply (afw::table::SourceRecord &source, afw::image::Exposure< PixelT > const &exposure, afw::table::SourceRecord const &reference, boost::shared_ptr< afw::image::Wcs const > referenceWcs=boost::shared_ptr< afw::image::Wcs const >()) const
 Apply the registered algorithms to the given source. More...
 

Private Member Functions

 MeasureSources ()
 

Private Attributes

afw::table::Key< afw::table::Flag > _badCentroidKey
 
boost::shared_ptr
< pex::logging::Log
_log
 
AlgorithmList _algorithms
 
boost::shared_ptr
< CentroidAlgorithm
_centroider
 

Friends

class MeasureSourcesBuilder
 

Detailed Description

Definition at line 51 of file Measure.h.

Member Typedef Documentation

typedef std::list<boost::shared_ptr< Algorithm const> > lsst::meas::algorithms::MeasureSources::AlgorithmList

Definition at line 54 of file Measure.h.

Definition at line 53 of file Measure.h.

Constructor & Destructor Documentation

lsst::meas::algorithms::MeasureSources::MeasureSources ( )
inlineprivate

Definition at line 141 of file Measure.h.

141 {}

Member Function Documentation

template<typename PixelT >
void lsst::meas::algorithms::MeasureSources::apply ( afw::table::SourceRecord source,
afw::image::Exposure< PixelT > const &  exposure,
afw::geom::Point2D const &  center,
bool  refineCenter = true 
) const

Apply the registered algorithms to the given source.

This overload passes a user-defined center to the algorithms. If refineCenter is true and setCentroider has been called, that algorithm will be used to refine the centroid.

If the centroider fails (by setting its flag or returning NaNs), the original center will be used for subsequent measurements and 'flags.badcentroid' will be set.

template<typename PixelT >
void lsst::meas::algorithms::MeasureSources::apply ( afw::table::SourceRecord source,
afw::image::Exposure< PixelT > const &  exposure 
) const

Apply the registered algorithms to the given source.

This overload uses the peak position as the center for the algorithms; if setCentroider has been called, that algorithm will refine the centroid.

If the centroider fails (by setting its flag or returning NaNs), the peak will be used for subsequent measurements and 'flags.badcentroid' will be set.

template<typename PixelT >
void lsst::meas::algorithms::MeasureSources::apply ( afw::table::SourceRecord source,
afw::image::Exposure< PixelT > const &  exposure,
afw::table::SourceRecord const &  reference,
boost::shared_ptr< afw::image::Wcs const >  referenceWcs = boost::shared_ptr< afw::image::Wcs const  >() 
) const

Apply the registered algorithms to the given source.

This overload uses a reference Source to provide the center and footprint. This is intended for forced photometry (measuring a Source on one image based on its detection in another).

template<typename PixelT >
void lsst::meas::algorithms::MeasureSources::applyWithCoord ( afw::table::SourceRecord source,
afw::image::Exposure< PixelT > const &  exposure 
) const
inline

Apply the registered algorithms to the given source.

This version of apply() uses the sky coordinates as the center for the algorithms; no refinement of the centroid is made.

Definition at line 103 of file Measure.h.

106  {
107  apply(source, exposure, exposure.getWcs()->skyToPixel(source.getCoord()), false);
108  }
void apply(afw::table::SourceRecord &source, afw::image::Exposure< PixelT > const &exposure, afw::geom::Point2D const &center, bool refineCenter=true) const
Apply the registered algorithms to the given source.
template<typename PixelT >
void lsst::meas::algorithms::MeasureSources::applyWithPixel ( afw::table::SourceRecord source,
afw::image::Exposure< PixelT > const &  exposure 
) const
inline

Apply the registered algorithms to the given source.

This version of apply() uses a previous centroid as the center for the algorithms; no refinement of the centroid is made.

Definition at line 117 of file Measure.h.

120  {
121  apply(source, exposure, afw::geom::Point2D(source.getX(), source.getY()), false);
122  }
Point< double, 2 > Point2D
Definition: Point.h:277
void apply(afw::table::SourceRecord &source, afw::image::Exposure< PixelT > const &exposure, afw::geom::Point2D const &center, bool refineCenter=true) const
Apply the registered algorithms to the given source.
AlgorithmList const& lsst::meas::algorithms::MeasureSources::getAlgorithms ( ) const
inline

Return the list of algorithms.

The order is the same as the order the algorithms will be executed. The special centroider, if present, will always be the first item in this list.

Definition at line 62 of file Measure.h.

62 { return _algorithms; }

Friends And Related Function Documentation

friend class MeasureSourcesBuilder
friend

Definition at line 143 of file Measure.h.

Member Data Documentation

AlgorithmList lsst::meas::algorithms::MeasureSources::_algorithms
private

Definition at line 147 of file Measure.h.

afw::table::Key<afw::table::Flag> lsst::meas::algorithms::MeasureSources::_badCentroidKey
private

Definition at line 145 of file Measure.h.

boost::shared_ptr< CentroidAlgorithm > lsst::meas::algorithms::MeasureSources::_centroider
private

Definition at line 148 of file Measure.h.

boost::shared_ptr< pex::logging::Log > lsst::meas::algorithms::MeasureSources::_log
private

Definition at line 146 of file Measure.h.


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