LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
lsst::afw::table::CoordKey Class Reference

A FunctorKey used to get or set celestial coordiantes from a pair of Angle keys. More...

#include <aggregates.h>

Inheritance diagram for lsst::afw::table::CoordKey:
lsst::afw::table::FunctorKey< coord::IcrsCoord > lsst::afw::table::OutputFunctorKey< coord::IcrsCoord > lsst::afw::table::InputFunctorKey< coord::IcrsCoord >

Public Member Functions

 CoordKey ()
 Default constructor; instance will not be usable unless subsequently assigned to. More...
 
 CoordKey (Key< geom::Angle > const &ra, Key< geom::Angle > const &dec)
 Construct from a pair of Keys. More...
 
 CoordKey (SubSchema const &s)
 Construct from a subschema, assuming ra and dec subfields. More...
 
virtual coord::IcrsCoord get (BaseRecord const &record) const
 Get an IcrsCoord from the given record. More...
 
virtual void set (BaseRecord &record, coord::IcrsCoord const &value) const
 Set an IcrsCoord in the given record. More...
 
virtual void set (BaseRecord &record, coord::Coord const &value) const
 Set a Coord of another type in the given record; must be convertable to ICRS. More...
 
bool isValid () const
 
Key< geom::AnglegetRa () const
 Return a constituent Key. More...
 
Key< geom::AnglegetDec () const
 Return a constituent Key. More...
 
- Public Member Functions inherited from lsst::afw::table::OutputFunctorKey< coord::IcrsCoord >
virtual ~OutputFunctorKey ()
 
- Public Member Functions inherited from lsst::afw::table::InputFunctorKey< coord::IcrsCoord >
virtual ~InputFunctorKey ()
 

Static Public Member Functions

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

Private Attributes

Key< geom::Angle_ra
 
Key< geom::Angle_dec
 

Detailed Description

A FunctorKey used to get or set celestial coordiantes from a pair of 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.

Definition at line 119 of file aggregates.h.

Constructor & Destructor Documentation

lsst::afw::table::CoordKey::CoordKey ( )
inline

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

Definition at line 136 of file aggregates.h.

136 : _ra(), _dec() {}
Key< geom::Angle > _dec
Definition: aggregates.h:176
Key< geom::Angle > _ra
Definition: aggregates.h:175
lsst::afw::table::CoordKey::CoordKey ( Key< geom::Angle > const &  ra,
Key< geom::Angle > const &  dec 
)
inline

Construct from a pair of Keys.

Definition at line 139 of file aggregates.h.

142  :
143  _ra(ra), _dec(dec)
144  {}
Key< geom::Angle > _dec
Definition: aggregates.h:176
Key< geom::Angle > _ra
Definition: aggregates.h:175
lsst::afw::table::CoordKey::CoordKey ( SubSchema const &  s)
inline

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"]);
*

Definition at line 155 of file aggregates.h.

155 : _ra(s["ra"]), _dec(s["dec"]) {}
Key< geom::Angle > _dec
Definition: aggregates.h:176
Key< geom::Angle > _ra
Definition: aggregates.h:175

Member Function Documentation

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

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

Parameters
[in,out]schemaSchema to add fields to.
[in]nameName prefix for all fields; "_ra", "_dec", will be appended to this to form the full field names.
[in]docString used as the documentation for the fields.
virtual coord::IcrsCoord lsst::afw::table::CoordKey::get ( BaseRecord const &  record) const
virtual

Get an IcrsCoord from the given record.

Implements lsst::afw::table::OutputFunctorKey< coord::IcrsCoord >.

Key<geom::Angle> lsst::afw::table::CoordKey::getDec ( ) const
inline

Return a constituent Key.

Definition at line 171 of file aggregates.h.

171 { return _dec; }
Key< geom::Angle > _dec
Definition: aggregates.h:176
Key<geom::Angle> lsst::afw::table::CoordKey::getRa ( ) const
inline

Return a constituent Key.

Definition at line 170 of file aggregates.h.

170 { return _ra; }
Key< geom::Angle > _ra
Definition: aggregates.h:175
bool lsst::afw::table::CoordKey::isValid ( ) const
inline

Definition at line 166 of file aggregates.h.

166 { return _ra.isValid() && _dec.isValid(); }
Key< geom::Angle > _dec
Definition: aggregates.h:176
Key< geom::Angle > _ra
Definition: aggregates.h:175
virtual void lsst::afw::table::CoordKey::set ( BaseRecord record,
coord::IcrsCoord const &  value 
) const
virtual

Set an IcrsCoord in the given record.

Implements lsst::afw::table::InputFunctorKey< coord::IcrsCoord >.

virtual void lsst::afw::table::CoordKey::set ( BaseRecord record,
coord::Coord const &  value 
) const
virtual

Set a Coord of another type in the given record; must be convertable to ICRS.

Member Data Documentation

Key<geom::Angle> lsst::afw::table::CoordKey::_dec
private

Definition at line 176 of file aggregates.h.

Key<geom::Angle> lsst::afw::table::CoordKey::_ra
private

Definition at line 175 of file aggregates.h.


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