Class CoordKey

Inheritance Relationships

Base Type

Class Documentation

class CoordKey : public lsst::afw::table::FunctorKey<lsst::geom::SpherePoint>

A FunctorKey used to get or set celestial coordinates from a pair of lsst::geom::Angle keys.

Coords are always stored and returned in the ICRS system. Coords in other systems may be assigned, but this will result in a conversion to ICRS.

Unnamed Group

bool operator==(CoordKey const &other) const

Compare CoordKeys for equality using the constituent ra and dec Keys.

bool operator!=(CoordKey const &other) const

Unnamed Group

Key<lsst::geom::Angle> getRa() const

Return a constituent Key.

Key<lsst::geom::Angle> getDec() const

Public Functions

CoordKey()

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

CoordKey(Key<lsst::geom::Angle> const &ra, Key<lsst::geom::Angle> const &dec)

Construct from a pair of Keys.

CoordKey(SubSchema const &s)

Construct from a subschema, assuming ra and dec subfields.

If a schema has “a_ra” and “a_dec” fields, this constructor allows you to construct a CoordKey via:

CoordKey k(schema["a"]);

CoordKey(CoordKey const&)
CoordKey(CoordKey&&)
CoordKey &operator=(CoordKey const&)
CoordKey &operator=(CoordKey&&)
~CoordKey()
lsst::geom::SpherePoint get(BaseRecord const &record) const

Get an lsst::geom::SpherePoint from the given record.

void set(BaseRecord &record, lsst::geom::SpherePoint const &value) const

Set an lsst::geom::SpherePoint in the given record.

std::size_t hash_value() const

Return a hash of this object.

bool isValid() const

Public Static Functions

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

Add a pair of _ra, _dec fields to a Schema, and return a CoordKey that points to them.

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

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

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