Class MagResultKey

Inheritance Relationships

Base Type

Class Documentation

class MagResultKey : public lsst::afw::table::FunctorKey<MagResult>

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.