File PsfFlux.h

namespace lsst

Class for a simple mapping implementing a generic AstrometryTransform.

Remove all non-astronomical counts from the Chunk Exposure’s pixels.

Forward declarations for lsst::utils::Cache

For details on the Cache class, see the Cache.h file.

It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines.

A base class for image defects

Numeric constants used by the Integrate.h integrator routines.

Compute Image Statistics

Note

Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981.

Note

The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions.

namespace meas
namespace base
class PsfFluxAlgorithm : public lsst::meas::base::SimpleAlgorithm
#include <PsfFlux.h>

A measurement algorithm that estimates instFlux using a linear least-squares fit with the Psf model.

The PsfFlux algorithm is extremely simple: we do a least-squares fit of the Psf model (evaluated at a given position) to the data. For point sources, this provides the optimal instFlux measurement in the limit where the Psf model is correct. We do not use per-pixel weights in the fit, as this results in bright stars being fit with a different effective profile than faint stairs.

Public Types

typedef PsfFluxControl Control

A typedef to the Control object for this algorithm, defined above. The control object contains the configuration parameters for this algorithm.

Public Functions

PsfFluxAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema, std::string const &logName = "")
virtual void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure<float> const &exposure) const

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.

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.

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.

Public Static Functions

static FlagDefinitionList const &getFlagDefinitions()

Public Static Attributes

FlagDefinition const FAILURE
FlagDefinition const NO_GOOD_PIXELS
FlagDefinition const EDGE

Private Members

Control _ctrl
FluxResultKey _instFluxResultKey
afw::table::Key<float> _areaKey
FlagHandler _flagHandler
SafeCentroidExtractor _centroidExtractor
class PsfFluxControl
#include <PsfFlux.h>

A C++ control class to handle PsfFluxAlgorithm’s configuration.

In C++, we define Control objects to handle configuration information. Using the LSST_CONTROL_FIELD macro and lsst.pex.config.wrap.makeConfigClass, we can turn these into more full-featured Config classes in Python. While the user will usually interact with the Config class, the plugin wrapper system will turn Config instances into Control instances when passing them to C++.

This should logically be an inner class, but Swig doesn’t know how to parse those.

Public Functions

lsst::meas::base::PsfFluxControl::LSST_CONTROL_FIELD(badMaskPlanes, std::vector< std::string >, "Mask planes that indicate pixels that should be excluded from the fit")
PsfFluxControl()

Default constructor.

All control classes should define a default constructor that sets all fields to their default values.

class PsfFluxTransform : public lsst::meas::base::FluxTransform

Public Types

typedef PsfFluxControl Control

Public Functions

PsfFluxTransform(Control const &ctrl, std::string const &name, afw::table::SchemaMapper &mapper)