LSSTApplications  18.1.0
LSSTDataManagementBasePackage
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
lsst::meas::base::ApertureFluxAlgorithm Class Referenceabstract

Base class for multiple-aperture photometry algorithms. More...

#include <ApertureFlux.h>

Inheritance diagram for lsst::meas::base::ApertureFluxAlgorithm:
lsst::meas::base::SimpleAlgorithm lsst::meas::base::SingleFrameAlgorithm lsst::meas::base::ForcedAlgorithm lsst::meas::base::BaseAlgorithm lsst::meas::base::BaseAlgorithm lsst::meas::base::CircularApertureFluxAlgorithm

Public Types

typedef ApertureFluxControl Control
 
typedef ApertureFluxResult Result
 Result object returned by static methods. More...
 

Public Member Functions

 ApertureFluxAlgorithm (Control const &ctrl, std::string const &name, afw::table::Schema &schema, daf::base::PropertySet &metadata)
 Construct the algorithm and add its fields to the given Schema. More...
 
virtual ~ApertureFluxAlgorithm ()
 
virtual void measure (afw::table::SourceRecord &record, afw::image::Exposure< float > const &exposure) const =0
 Measure the configured apertures on the given image. More...
 
virtual void fail (afw::table::SourceRecord &measRecord, MeasurementError *error=nullptr) const
 Handle an exception thrown by the current algorithm by setting flags in the given record. More...
 
virtual void measureForced (afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure, afw::table::SourceRecord const &refRecord, afw::geom::SkyWcs const &refWcs) const
 Called to measure a single child source in an image. More...
 
virtual void measureNForced (afw::table::SourceCatalog const &measCat, afw::image::Exposure< float > const &exposure, afw::table::SourceCatalog const &refRecord, afw::geom::SkyWcs const &refWcs) const
 Called to simultaneously measure all children in a deblend family, in a single image. More...
 
virtual void measureN (afw::table::SourceCatalog const &measCat, afw::image::Exposure< float > const &exposure) const
 Called to simultaneously measure all children in a deblend family, in a single image. More...
 
std::string getLogName () const
 

Static Public Member Functions

static FlagDefinitionList const & getFlagDefinitions ()
 
static std::string makeFieldPrefix (std::string const &name, double radius)
 Construct an appropriate prefix for table fields. More...
 
template<typename T >
static Result computeSincFlux (afw::image::Image< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
 Compute the instFlux (and optionally, uncertanties) within an aperture using Sinc photometry. More...
 
template<typename T >
static Result computeSincFlux (afw::image::MaskedImage< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
 Compute the instFlux (and optionally, uncertanties) within an aperture using Sinc photometry. More...
 
template<typename T >
static Result computeNaiveFlux (afw::image::Image< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
 Compute the instFlux (and optionally, uncertanties) within an aperture using naive photometry. More...
 
template<typename T >
static Result computeNaiveFlux (afw::image::MaskedImage< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
 Compute the instFlux (and optionally, uncertanties) within an aperture using naive photometry. More...
 
template<typename T >
static Result computeFlux (afw::image::Image< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
 Compute the instFlux (and optionally, uncertanties) within an aperture using the algorithm determined by its size and the maxSincRadius control parameter. More...
 
template<typename T >
static Result computeFlux (afw::image::MaskedImage< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
 Compute the instFlux (and optionally, uncertanties) within an aperture using the algorithm determined by its size and the maxSincRadius control parameter. More...
 

Static Public Attributes

static unsigned int const N_FLAGS = 3
 
static FlagDefinition const FAILURE = flagDefinitions.addFailureFlag()
 
static FlagDefinition const APERTURE_TRUNCATED
 
static FlagDefinition const SINC_COEFFS_TRUNCATED
 

Protected Member Functions

void copyResultToRecord (Result const &result, afw::table::SourceRecord &record, int index) const
 
FlagHandler const & getFlagHandler (int index) const
 

Protected Attributes

Control const _ctrl
 
SafeCentroidExtractor _centroidExtractor
 
std::string _logName
 

Detailed Description

Base class for multiple-aperture photometry algorithms.

ApertureFluxAlgorithm serves as an intermediate base class for all aperture fluxes, which it assumes have that capability of measuring multiple apertures (even if they are not always configured to do so).

Concrete implementations for single-aperture flux measurements are provided as static methods, as well as a consistent interface and control object for its derived classes. Currently, we only have one derived class, CircularApertureFluxAlgorithm, but in the future we anticipate adding more derived classes for e.g. elliptical apertures, or apertures that are circular in sky coordinates rather than pixel coordinates.

Definition at line 80 of file ApertureFlux.h.

Member Typedef Documentation

◆ Control

Definition at line 89 of file ApertureFlux.h.

◆ Result

Result object returned by static methods.

Definition at line 92 of file ApertureFlux.h.

Constructor & Destructor Documentation

◆ ApertureFluxAlgorithm()

lsst::meas::base::ApertureFluxAlgorithm::ApertureFluxAlgorithm ( Control const &  ctrl,
std::string const &  name,
afw::table::Schema schema,
daf::base::PropertySet metadata 
)
explicit

Construct the algorithm and add its fields to the given Schema.

Definition at line 71 of file ApertureFlux.cc.

75  : _ctrl(ctrl), _centroidExtractor(schema, name) {
76  _keys.reserve(ctrl.radii.size());
77  for (std::size_t i = 0; i < ctrl.radii.size(); ++i) {
78  metadata.add(name + "_radii", ctrl.radii[i]);
80  std::string doc = (boost::format("instFlux within %f-pixel aperture") % ctrl.radii[i]).str();
81  _keys.push_back(Keys(schema, prefix, doc, ctrl.radii[i] <= ctrl.maxSincRadius));
82  }
83 }
std::string prefix
Definition: SchemaMapper.cc:79
STL class.
T push_back(T... args)
static std::string makeFieldPrefix(std::string const &name, double radius)
Construct an appropriate prefix for table fields.
Definition: ApertureFlux.cc:57
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
Definition: history.py:168
table::Schema schema
Definition: Camera.cc:161
T reserve(T... args)
SafeCentroidExtractor _centroidExtractor
Definition: ApertureFlux.h:199

◆ ~ApertureFluxAlgorithm()

virtual lsst::meas::base::ApertureFluxAlgorithm::~ApertureFluxAlgorithm ( )
inlinevirtual

Definition at line 163 of file ApertureFlux.h.

163 {}

Member Function Documentation

◆ computeFlux() [1/2]

template<typename T >
ApertureFluxAlgorithm::Result lsst::meas::base::ApertureFluxAlgorithm::computeFlux ( afw::image::Image< T > const &  image,
afw::geom::ellipses::Ellipse const &  ellipse,
Control const &  ctrl = Control() 
)
static

Compute the instFlux (and optionally, uncertanties) within an aperture using the algorithm determined by its size and the maxSincRadius control parameter.

This method delegates to computeSincFlux is the minor axis of the aperture is smaller than ctrl.maxSincRadius, and delegates to computeNaiveFlux otherwise.

Parameters
[in]imageImage or MaskedImage to be measured. If a MaskedImage is provided, uncertainties will be returned as well as instFluxes.
[in]ellipseEllipse that defines the outer boundary of the aperture.
[in]ctrlControl object.

Definition at line 221 of file ApertureFlux.cc.

223  {
224  return (afw::geom::ellipses::Axes(ellipse.getCore()).getB() <= ctrl.maxSincRadius)
225  ? computeSincFlux(image, ellipse, ctrl)
226  : computeNaiveFlux(image, ellipse, ctrl);
227 }
static Result computeNaiveFlux(afw::image::Image< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
Compute the instFlux (and optionally, uncertanties) within an aperture using naive photometry...
static Result computeSincFlux(afw::image::Image< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
Compute the instFlux (and optionally, uncertanties) within an aperture using Sinc photometry...
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...

◆ computeFlux() [2/2]

template<typename T >
ApertureFluxAlgorithm::Result lsst::meas::base::ApertureFluxAlgorithm::computeFlux ( afw::image::MaskedImage< T > const &  image,
afw::geom::ellipses::Ellipse const &  ellipse,
Control const &  ctrl = Control() 
)
static

Compute the instFlux (and optionally, uncertanties) within an aperture using the algorithm determined by its size and the maxSincRadius control parameter.

This method delegates to computeSincFlux is the minor axis of the aperture is smaller than ctrl.maxSincRadius, and delegates to computeNaiveFlux otherwise.

Parameters
[in]imageImage or MaskedImage to be measured. If a MaskedImage is provided, uncertainties will be returned as well as instFluxes.
[in]ellipseEllipse that defines the outer boundary of the aperture.
[in]ctrlControl object.

Definition at line 230 of file ApertureFlux.cc.

232  {
233  return (afw::geom::ellipses::Axes(ellipse.getCore()).getB() <= ctrl.maxSincRadius)
234  ? computeSincFlux(image, ellipse, ctrl)
235  : computeNaiveFlux(image, ellipse, ctrl);
236 }
static Result computeNaiveFlux(afw::image::Image< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
Compute the instFlux (and optionally, uncertanties) within an aperture using naive photometry...
static Result computeSincFlux(afw::image::Image< T > const &image, afw::geom::ellipses::Ellipse const &ellipse, Control const &ctrl=Control())
Compute the instFlux (and optionally, uncertanties) within an aperture using Sinc photometry...
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...

◆ computeNaiveFlux() [1/2]

template<typename T >
ApertureFluxAlgorithm::Result lsst::meas::base::ApertureFluxAlgorithm::computeNaiveFlux ( afw::image::Image< T > const &  image,
afw::geom::ellipses::Ellipse const &  ellipse,
Control const &  ctrl = Control() 
)
static

Compute the instFlux (and optionally, uncertanties) within an aperture using naive photometry.

The naive algorithm just counts the instFlux in pixels whose centers lie within the aperture, ignoring the effects of sub-pixel aperture boundaries.

Parameters
[in]imageImage or MaskedImage to be measured. If a MaskedImage is provided, uncertainties will be returned as well as instFluxes.
[in]ellipseEllipse that defines the outer boundary of the aperture.

Definition at line 174 of file ApertureFlux.cc.

175  {
176  Result result;
177  afw::geom::ellipses::PixelRegion region(ellipse); // behaves mostly like a Footprint
178  if (!image.getBBox().contains(region.getBBox())) {
179  result.setFlag(APERTURE_TRUNCATED.number);
180  result.setFlag(FAILURE.number);
181  return result;
182  }
183  result.instFlux = 0;
184  for (afw::geom::ellipses::PixelRegion::Iterator spanIter = region.begin(), spanEnd = region.end();
185  spanIter != spanEnd; ++spanIter) {
186  typename afw::image::Image<T>::x_iterator pixIter =
187  image.x_at(spanIter->getBeginX() - image.getX0(), spanIter->getY() - image.getY0());
188  result.instFlux += std::accumulate(pixIter, pixIter + spanIter->getWidth(), 0.0);
189  }
190  return result;
191 }
py::object result
Definition: schema.cc:418
_view_t::x_iterator x_iterator
An iterator for traversing the pixels in a row.
Definition: ImageBase.h:134
FastFinder::Iterator Iterator
Definition: FastFinder.cc:179
static FlagDefinition const FAILURE
Definition: ApertureFlux.h:85
static FlagDefinition const APERTURE_TRUNCATED
Definition: ApertureFlux.h:86
T accumulate(T... args)
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
ApertureFluxResult Result
Result object returned by static methods.
Definition: ApertureFlux.h:92

◆ computeNaiveFlux() [2/2]

template<typename T >
ApertureFluxAlgorithm::Result lsst::meas::base::ApertureFluxAlgorithm::computeNaiveFlux ( afw::image::MaskedImage< T > const &  image,
afw::geom::ellipses::Ellipse const &  ellipse,
Control const &  ctrl = Control() 
)
static

Compute the instFlux (and optionally, uncertanties) within an aperture using naive photometry.

The naive algorithm just counts the instFlux in pixels whose centers lie within the aperture, ignoring the effects of sub-pixel aperture boundaries.

Parameters
[in]imageImage or MaskedImage to be measured. If a MaskedImage is provided, uncertainties will be returned as well as instFluxes.
[in]ellipseEllipse that defines the outer boundary of the aperture.

Definition at line 194 of file ApertureFlux.cc.

196  {
197  Result result;
198  afw::geom::ellipses::PixelRegion region(ellipse); // behaves mostly like a Footprint
199  if (!image.getBBox().contains(region.getBBox())) {
200  result.setFlag(APERTURE_TRUNCATED.number);
201  result.setFlag(FAILURE.number);
202  return result;
203  }
204  result.instFlux = 0.0;
205  result.instFluxErr = 0.0;
206  for (afw::geom::ellipses::PixelRegion::Iterator spanIter = region.begin(), spanEnd = region.end();
207  spanIter != spanEnd; ++spanIter) {
208  typename afw::image::MaskedImage<T>::Image::x_iterator pixIter = image.getImage()->x_at(
209  spanIter->getBeginX() - image.getX0(), spanIter->getY() - image.getY0());
210  typename afw::image::MaskedImage<T>::Variance::x_iterator varIter = image.getVariance()->x_at(
211  spanIter->getBeginX() - image.getX0(), spanIter->getY() - image.getY0());
212  result.instFlux += std::accumulate(pixIter, pixIter + spanIter->getWidth(), 0.0);
213  // we use this to hold variance as we accumulate...
214  result.instFluxErr += std::accumulate(varIter, varIter + spanIter->getWidth(), 0.0);
215  }
216  result.instFluxErr = std::sqrt(result.instFluxErr); // ...and switch back to sigma here.
217  return result;
218 }
py::object result
Definition: schema.cc:418
_view_t::x_iterator x_iterator
An iterator for traversing the pixels in a row.
Definition: ImageBase.h:134
FastFinder::Iterator Iterator
Definition: FastFinder.cc:179
static FlagDefinition const FAILURE
Definition: ApertureFlux.h:85
static FlagDefinition const APERTURE_TRUNCATED
Definition: ApertureFlux.h:86
T sqrt(T... args)
T accumulate(T... args)
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
ApertureFluxResult Result
Result object returned by static methods.
Definition: ApertureFlux.h:92

◆ computeSincFlux() [1/2]

template<typename T >
ApertureFluxAlgorithm::Result lsst::meas::base::ApertureFluxAlgorithm::computeSincFlux ( afw::image::Image< T > const &  image,
afw::geom::ellipses::Ellipse const &  ellipse,
Control const &  ctrl = Control() 
)
static

Compute the instFlux (and optionally, uncertanties) within an aperture using Sinc photometry.

The Sinc algorithm is slower than a naive aperture, but more accurate, in that it correctly handles sub-pixel aperture boundaries on well-sampled data. This improved accuracy is most important for smaller apertures.

Parameters
[in]imageImage or MaskedImage to be measured. If a MaskedImage is provided, uncertainties will be returned as well as instFluxes.
[in]ellipseEllipse that defines the outer boundary of the aperture.
[in]ctrlControl object.

Definition at line 144 of file ApertureFlux.cc.

145  {
146  Result result;
147  CONST_PTR(afw::image::Image<T>) cImage = getSincCoeffs<T>(image.getBBox(), ellipse, result, ctrl);
148  if (result.getFlag(APERTURE_TRUNCATED.number)) return result;
149  afw::image::Image<T> subImage(image, cImage->getBBox());
150  result.instFlux =
151  (ndarray::asEigenArray(subImage.getArray()) * ndarray::asEigenArray(cImage->getArray())).sum();
152  return result;
153 }
py::object result
Definition: schema.cc:418
#define CONST_PTR(...)
A shared pointer to a const object.
Definition: base.h:47
static FlagDefinition const APERTURE_TRUNCATED
Definition: ApertureFlux.h:86
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
ApertureFluxResult Result
Result object returned by static methods.
Definition: ApertureFlux.h:92

◆ computeSincFlux() [2/2]

template<typename T >
ApertureFluxAlgorithm::Result lsst::meas::base::ApertureFluxAlgorithm::computeSincFlux ( afw::image::MaskedImage< T > const &  image,
afw::geom::ellipses::Ellipse const &  ellipse,
Control const &  ctrl = Control() 
)
static

Compute the instFlux (and optionally, uncertanties) within an aperture using Sinc photometry.

The Sinc algorithm is slower than a naive aperture, but more accurate, in that it correctly handles sub-pixel aperture boundaries on well-sampled data. This improved accuracy is most important for smaller apertures.

Parameters
[in]imageImage or MaskedImage to be measured. If a MaskedImage is provided, uncertainties will be returned as well as instFluxes.
[in]ellipseEllipse that defines the outer boundary of the aperture.
[in]ctrlControl object.

Definition at line 156 of file ApertureFlux.cc.

158  {
159  Result result;
160  CONST_PTR(afw::image::Image<T>) cImage = getSincCoeffs<T>(image.getBBox(), ellipse, result, ctrl);
161  if (result.getFlag(APERTURE_TRUNCATED.number)) return result;
162  afw::image::MaskedImage<T> subImage(image, cImage->getBBox(afw::image::PARENT), afw::image::PARENT);
163  result.instFlux = (ndarray::asEigenArray(subImage.getImage()->getArray()) *
164  ndarray::asEigenArray(cImage->getArray()))
165  .sum();
166  result.instFluxErr =
167  std::sqrt((ndarray::asEigenArray(subImage.getVariance()->getArray()).template cast<T>() *
168  ndarray::asEigenArray(cImage->getArray()).square())
169  .sum());
170  return result;
171 }
py::object result
Definition: schema.cc:418
#define CONST_PTR(...)
A shared pointer to a const object.
Definition: base.h:47
static FlagDefinition const APERTURE_TRUNCATED
Definition: ApertureFlux.h:86
T sqrt(T... args)
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
ApertureFluxResult Result
Result object returned by static methods.
Definition: ApertureFlux.h:92

◆ copyResultToRecord()

void lsst::meas::base::ApertureFluxAlgorithm::copyResultToRecord ( Result const &  result,
afw::table::SourceRecord record,
int  index 
) const
protected

Definition at line 94 of file ApertureFlux.cc.

95  {
96  record.set(_keys[index].instFluxKey, result);
97  if (result.getFlag(FAILURE.number)) {
98  _keys[index].flags.setValue(record, FAILURE.number, true);
99  }
100  if (result.getFlag(APERTURE_TRUNCATED.number)) {
101  _keys[index].flags.setValue(record, APERTURE_TRUNCATED.number, true);
102  }
103  if (result.getFlag(SINC_COEFFS_TRUNCATED.number)) {
104  _keys[index].flags.setValue(record, SINC_COEFFS_TRUNCATED.number, true);
105  }
106 }
py::object result
Definition: schema.cc:418
static FlagDefinition const FAILURE
Definition: ApertureFlux.h:85
static FlagDefinition const APERTURE_TRUNCATED
Definition: ApertureFlux.h:86
static FlagDefinition const SINC_COEFFS_TRUNCATED
Definition: ApertureFlux.h:87

◆ fail()

void lsst::meas::base::ApertureFluxAlgorithm::fail ( afw::table::SourceRecord measRecord,
MeasurementError error = nullptr 
) const
virtual

Handle an exception thrown by the current algorithm by setting flags in the given record.

fail() is called by the measurement framework when an exception is allowed to propagate out of one the algorithm's measure() methods. It should generally set both a general failure flag for the algorithm as well as a specific flag indicating the error condition, if possible. To aid in this, if the exception was an instance of MeasurementError, it will be passed in, carrying information about what flag to set.

An algorithm can also to chose to set flags within its own measure() methods, and then just return, rather than throw an exception. However, fail() should be implemented even when all known failure modes do not throw exceptions, to ensure that unexpected exceptions thrown in lower-level code are properly handled.

Implements lsst::meas::base::BaseAlgorithm.

Definition at line 85 of file ApertureFlux.cc.

85  {
86  // This should only get called in the case of completely unexpected failures, so it's not terrible
87  // that we just set the general failure flags for all radii here instead of trying to figure out
88  // which ones we've already done. Any known failure modes are handled inside measure().
89  for (std::size_t i = 0; i < _ctrl.radii.size(); ++i) {
90  _keys[i].flags.handleFailure(measRecord, error);
91  }
92 }
T size(T... args)
std::vector< double > radii
"Radius (in pixels) of apertures." ;
Definition: ApertureFlux.h:53

◆ getFlagDefinitions()

FlagDefinitionList const & lsst::meas::base::ApertureFluxAlgorithm::getFlagDefinitions ( )
static

Definition at line 49 of file ApertureFlux.cc.

49 { return flagDefinitions; }

◆ getFlagHandler()

FlagHandler const& lsst::meas::base::ApertureFluxAlgorithm::getFlagHandler ( int  index) const
inlineprotected

Definition at line 196 of file ApertureFlux.h.

196 { return _keys[index].flags; }

◆ getLogName()

std::string lsst::meas::base::BaseAlgorithm::getLogName ( ) const
inlineinherited

Definition at line 66 of file Algorithm.h.

66 { return _logName; }

◆ makeFieldPrefix()

std::string lsst::meas::base::ApertureFluxAlgorithm::makeFieldPrefix ( std::string const &  name,
double  radius 
)
static

Construct an appropriate prefix for table fields.

Given a plugin name (e.g. base_CircularApertureFlux) and an aperture radius (e.g. 12 pixels) return an appropriate prefix for table fields to contain the measurement results (e.g. base_CircularApertureFlux_12_0). Table fields can then be created named <prefix>_instFlux, <prefix>_instFluxErr, etc.

Parameters
[in]pluginNameName of measurement plugin.
[in]radiusAperture radius (pixels).
Returns
Table field name prefix.

Definition at line 57 of file ApertureFlux.cc.

57  {
58  std::string prefix = (boost::format("%s_%.1f") % name % radius).str();
59  return boost::replace_all_copy(prefix, ".", "_");
60 }
std::string prefix
Definition: SchemaMapper.cc:79
STL class.
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
Definition: history.py:168

◆ measure()

virtual void lsst::meas::base::ApertureFluxAlgorithm::measure ( afw::table::SourceRecord record,
afw::image::Exposure< float > const &  exposure 
) const
pure virtual

Measure the configured apertures on the given image.

Python plugins will delegate to this method.

Parameters
[in,out]recordRecord used to save outputs and retrieve positions.
[in]exposureImage to be measured.

Implements lsst::meas::base::SingleFrameAlgorithm.

Implemented in lsst::meas::base::CircularApertureFluxAlgorithm.

◆ measureForced()

virtual void lsst::meas::base::SimpleAlgorithm::measureForced ( afw::table::SourceRecord measRecord,
afw::image::Exposure< float > const &  exposure,
afw::table::SourceRecord const &  refRecord,
afw::geom::SkyWcs const &  refWcs 
) const
inlinevirtualinherited

Called to measure a single child source in an image.

Before this method is called, all neighbors will be replaced with noise, using the outputs of the deblender. Outputs should be saved in the given SourceRecord, which can also be used to obtain centroid (see SafeCentroidExtractor) and shape (see SafeShapeExtractor) information.

Implements lsst::meas::base::ForcedAlgorithm.

Reimplemented in lsst::meas::extensions::photometryKron::KronFluxAlgorithm.

Definition at line 172 of file Algorithm.h.

175  {
176  measure(measRecord, exposure);
177  }
virtual void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const =0
Called to measure a single child source in an image.

◆ measureN()

void lsst::meas::base::SingleFrameAlgorithm::measureN ( afw::table::SourceCatalog const &  measCat,
afw::image::Exposure< float > const &  exposure 
) const
virtualinherited

Called to simultaneously measure all children in a deblend family, in a single image.

Outputs should be saved in the given SourceCatalog, which can also be used to obtain centroid (see SafeCentroidExtractor) and shape (see SafeShapeExtractor) information.

The default implementation simply throws an exception, indicating that simultaneous measurement is not supported.

Definition at line 31 of file Algorithm.cc.

32  {
33  throw LSST_EXCEPT(pex::exceptions::LogicError, "measureN not implemented for this algorithm");
34 }
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48

◆ measureNForced()

virtual void lsst::meas::base::SimpleAlgorithm::measureNForced ( afw::table::SourceCatalog const &  measCat,
afw::image::Exposure< float > const &  exposure,
afw::table::SourceCatalog const &  refRecord,
afw::geom::SkyWcs const &  refWcs 
) const
inlinevirtualinherited

Called to simultaneously measure all children in a deblend family, in a single image.

Outputs should be saved in the given SourceCatalog, which can also be used to obtain centroid (see SafeCentroidExtractor) and shape (see SafeShapeExtractor) information.

The default implementation simply throws an exception, indicating that simultaneous measurement is not supported.

Reimplemented from lsst::meas::base::ForcedAlgorithm.

Definition at line 179 of file Algorithm.h.

182  {
183  measureN(measCat, exposure);
184  }
virtual void measureN(afw::table::SourceCatalog const &measCat, afw::image::Exposure< float > const &exposure) const
Called to simultaneously measure all children in a deblend family, in a single image.
Definition: Algorithm.cc:31

Member Data Documentation

◆ _centroidExtractor

SafeCentroidExtractor lsst::meas::base::ApertureFluxAlgorithm::_centroidExtractor
protected

Definition at line 199 of file ApertureFlux.h.

◆ _ctrl

Control const lsst::meas::base::ApertureFluxAlgorithm::_ctrl
protected

Definition at line 198 of file ApertureFlux.h.

◆ _logName

std::string lsst::meas::base::BaseAlgorithm::_logName
protectedinherited

Definition at line 69 of file Algorithm.h.

◆ APERTURE_TRUNCATED

FlagDefinition const lsst::meas::base::ApertureFluxAlgorithm::APERTURE_TRUNCATED
static
Initial value:
=
flagDefinitions.add("flag_apertureTruncated", "aperture did not fit within measurement image")

Definition at line 86 of file ApertureFlux.h.

◆ FAILURE

FlagDefinition const lsst::meas::base::ApertureFluxAlgorithm::FAILURE = flagDefinitions.addFailureFlag()
static

Definition at line 85 of file ApertureFlux.h.

◆ N_FLAGS

unsigned int const lsst::meas::base::ApertureFluxAlgorithm::N_FLAGS = 3
static

Definition at line 84 of file ApertureFlux.h.

◆ SINC_COEFFS_TRUNCATED

FlagDefinition const lsst::meas::base::ApertureFluxAlgorithm::SINC_COEFFS_TRUNCATED
static
Initial value:
= flagDefinitions.add(
"flag_sincCoeffsTruncated", "full sinc coefficient image did not fit within measurement image")

Definition at line 87 of file ApertureFlux.h.


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