File FluxUtilities.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
struct FluxResult
#include <FluxUtilities.h>

A reusable result struct for instFlux measurements.

Subclassed by lsst::meas::base::ApertureFluxResult, lsst::meas::base::SdssShapeResult

Public Functions

FluxResult()

Default constructor; initializes everything to NaN.

FluxResult(meas::base::Flux instFlux_, meas::base::FluxErrElement instFluxErr_)

Constructor from instFlux and its uncertainty.

Public Members

meas::base::Flux instFlux

Measured instFlux in DN.

meas::base::FluxErrElement instFluxErr

Standard deviation of instFlux in DN.

class FluxResultKey : public lsst::afw::table::FunctorKey<FluxResult>
#include <FluxUtilities.h>

A FunctorKey for FluxResult.

This class makes it easy to copy instFluxes and their uncertainties to and from records, and provides a method to add the appropriate fields to a Schema.

Unnamed Group

bool operator==(FluxResultKey const &other) const

Compare the FunctorKey for equality with another, using the underlying instFlux and instFluxErr Keys.

bool operator!=(FluxResultKey const &other) const

Public Functions

FluxResultKey()

Default constructor; instance will not be usuable unless subsequently assigned to.

FluxResultKey(afw::table::Key<meas::base::Flux> const &instFlux, afw::table::Key<meas::base::FluxErrElement> const &instFluxErr)

Construct from a pair of Keys.

FluxResultKey(afw::table::SubSchema const &s)

Construct from a subschema, assuming instFlux and instFluxErr subfields.

If a schema has “a_instFlux” and “a_instFluxErr” fields, this constructor allows you to construct a FluxResultKey via:

FluxResultKey k(schema["a"]);

virtual FluxResult get(afw::table::BaseRecord const &record) const

Get a FluxResult from the given record.

virtual void set(afw::table::BaseRecord &record, FluxResult const &other) const

Set a FluxResult in the given record.

bool isValid() const

Return True if both the instFlux and instFluxErr Keys are valid.

afw::table::Key<meas::base::Flux> getInstFlux() const

Return the underlying instFlux Key.

afw::table::Key<FluxErrElement> getInstFluxErr() const

Return the underlying instFluxErr Key.

Public Static Functions

static FluxResultKey addFields(afw::table::Schema &schema, std::string const &name, std::string const &doc)

Add a pair of _instFlux, _instFluxErr fields to a Schema, and return a FluxResultKey that points to them.

The unit for both fields will be “count”.

Parameters
  • [inout] schema: Schema to add fields to.

  • [in] name: Name prefix for all fields; “_instFlux”, “_instFluxErr” will be appended to this to form the full field names.

  • [in] doc: String used as the documentation for the fields.

Private Members

afw::table::Key<meas::base::Flux> _instFlux
afw::table::Key<FluxErrElement> _instFluxErr
class FluxTransform : public lsst::meas::base::BaseTransform
#include <FluxUtilities.h>

Base for instFlux measurement transformations

Provides a basic transform from instFlux plus associated uncertainty to magnitude with uncertainty. The basic “flag” attribute for the measurement algorithm is propagated to the output

Subclasses should define a constructor which take a Control argument corresponding to the measurement algorithm being transformed and ensure that any other necessary flags are propagated.

Subclassed by lsst::meas::base::GaussianFluxTransform, lsst::meas::base::LocalBackgroundTransform, lsst::meas::base::PeakLikelihoodFluxTransform, lsst::meas::base::PsfFluxTransform, lsst::meas::base::ScaledApertureFluxTransform

Public Functions

FluxTransform(std::string const &name, afw::table::SchemaMapper &mapper)
virtual void operator()(afw::table::SourceCatalog const &inputCatalog, afw::table::BaseCatalog &outputCatalog, afw::geom::SkyWcs const &wcs, afw::image::PhotoCalib const &photoCalib) const

Private Members

MagResultKey _magKey
struct MagResult
#include <FluxUtilities.h>

A reusable result struct for magnitudes.

Public Members

Mag mag
MagErrElement magErr
class MagResultKey : public lsst::afw::table::FunctorKey<MagResult>
#include <FluxUtilities.h>

A FunctorKey for MagResult.

This class makes it easy to copy magnitudes and their uncertainties to and from records, and provides a method to add the appropriate fields to a Schema.

Public Functions

MagResultKey()

Default constructor; instance will not be usuable unless subsequently assigned to.

MagResultKey(afw::table::SubSchema const &s)

Construct from a subschema, assuming mag and magErr subfields.

If a schema has “a_mag” and “a_magErr” fields, this enables construction of a MagResultKey via:

MagResultKey k(schema["a"]);

virtual MagResult get(afw::table::BaseRecord const &record) const

Get a MagResult from the given record.

virtual void set(afw::table::BaseRecord &record, MagResult const &magResult) const

Set a MagResult in the given record.

virtual void set(afw::table::BaseRecord &record, afw::image::Measurement const &magnitude) const

Set a MagResult in the record given the result of afw::image::PhotoCalib::instFluxToMagnitude.

Public Static Functions

static MagResultKey addFields(afw::table::Schema &schema, std::string const &name)

Add a pair of _mag, _magErr fields to a Schema, and return a MagResultKey that points to them.

Parameters
  • [inout] schema: Schema to add fields to.

  • [in] name: Name prefix for all fields; “_mag”, “_magErr” will be appended to this to form the full field names.

Private Members

afw::table::Key<Mag> _magKey
afw::table::Key<MagErrElement> _magErrKey