File aggregates.h

template<typename T>
struct hash<lsst::afw::table::PointKey<T>>

Public Types

template<>
using argument_type = lsst::afw::table::PointKey<T>
template<>
using result_type = size_t

Public Functions

size_t operator()(argument_type const &obj) const
template<typename T>
struct hash<lsst::afw::table::BoxKey<T>>

Public Types

template<>
using argument_type = lsst::afw::table::BoxKey<T>
template<>
using result_type = size_t

Public Functions

size_t operator()(argument_type const &obj) const
template<>
struct hash<lsst::afw::table::CoordKey>

Public Types

template<>
using argument_type = lsst::afw::table::CoordKey
template<>
using result_type = size_t

Public Functions

size_t operator()(argument_type const &obj) const
template<>
struct hash<lsst::afw::table::QuadrupoleKey>

Public Types

template<>
using argument_type = lsst::afw::table::QuadrupoleKey
template<>
using result_type = size_t

Public Functions

size_t operator()(argument_type const &obj) const
template<>
struct hash<lsst::afw::table::EllipseKey>

Public Types

template<>
using argument_type = lsst::afw::table::EllipseKey
template<>
using result_type = size_t

Public Functions

size_t operator()(argument_type const &obj) const
template<typename T, int N>
struct hash<lsst::afw::table::CovarianceMatrixKey<T, N>>

Public Types

template<>
using argument_type = lsst::afw::table::CovarianceMatrixKey<T, N>
template<>
using result_type = size_t

Public Functions

size_t operator()(argument_type const &obj) const
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 afw
namespace table

Typedefs

typedef PointKey<int> Point2IKey
typedef PointKey<double> Point2DKey
using Box2IKey = BoxKey<lsst::geom::Box2I>
using Box2DKey = BoxKey<lsst::geom::Box2D>

Enums

enum CoordinateType

Enum used to set units for geometric FunctorKeys.

Values:

PIXEL
CELESTIAL
template<typename Box>
class BoxKey : public lsst::afw::table::FunctorKey<Box>
#include <aggregates.h>

A FunctorKey used to get or set a lsst::geom::Box2I or Box2D from a (min, max) pair of PointKeys.

The Box2IKey and Box2DKey typedefs should be preferred to using the template name directly.

Unnamed Group

bool operator==(BoxKey const &other) const

Compare the FunctorKey for equality with another, using the underlying x and y Keys.

bool operator!=(BoxKey const &other) const

Public Types

template<>
using Element = typename Box::Element

Type of coordinate elements (i.e. int or double).

Public Functions

BoxKey()

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

BoxKey(PointKey<Element> const &min, PointKey<Element> const &max)

Construct from a pair of PointKeys.

BoxKey(SubSchema const &s)

Construct from a subschema, assuming _min_x, _max_x, _min_y, _max_y subfields

If a schema has “a_min_x” and “a_min_x” (etc) fields, this constructor allows you to construct a BoxKey via:

BoxKey<Box> k(schema["a"]);

BoxKey(BoxKey const&)
BoxKey(BoxKey&&)
BoxKey &operator=(BoxKey const&)
BoxKey &operator=(BoxKey&&)
~BoxKey()
std::size_t hash_value() const

Return a hash of this object.

Box get(BaseRecord const &record) const

Get a Box from the given record.

void set(BaseRecord &record, Box const &value) const

Set a Box in the given record.

bool isValid() const

Return True if both the min and max PointKeys are valid.

PointKey<Element> getMin() const

Return the underlying min PointKey.

PointKey<Element> getMax() const

Return the underlying max PointKey.

Public Static Functions

static BoxKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit)

Add _min_x, _min_y, _max_x, _max_y fields to a Schema, and return a BoxKey that points to them.

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

  • [in] name: Name prefix for all fields; suffixes above will be appended to this to form the full field names. For example, if name == "b", the fields added will be “b_min_x”, “b_min_y”, “b_max_x”, and “b_max_y”.

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

  • [in] unit: String used as the unit for all fields.

Private Members

PointKey<Element> _min
PointKey<Element> _max
class CoordKey : public lsst::afw::table::FunctorKey<lsst::geom::SpherePoint>
#include <aggregates.h>

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.

Private Members

Key<lsst::geom::Angle> _ra
Key<lsst::geom::Angle> _dec
template<typename T, int N>
class CovarianceMatrixKey : public lsst::afw::table::FunctorKey<Eigen::Matrix<T, N, N>>

Unnamed Group

bool operator==(CovarianceMatrixKey const &other) const

Compare the FunctorKey for equality with another, using its constituent Keys.

bool operator!=(CovarianceMatrixKey const &other) const

Public Types

typedef std::vector<Key<T>> ErrKeyArray
typedef std::vector<Key<T>> CovarianceKeyArray
typedef std::vector<std::string> NameArray

Public Functions

CovarianceMatrixKey()

Construct an invalid instance; must assign before subsequent use.

CovarianceMatrixKey(ErrKeyArray const &err, CovarianceKeyArray const &cov = CovarianceKeyArray())

Construct a from arrays of per-element Keys

The err array Keys should point to the square root of the diagonal of the covariance matrix. The cov array Keys should point to the off-diagonal elements of the lower-triangle, packed first in rows, then in columns (or equivalently, in the upper-triangle, packed first in columns, then in rows). For a 4x4 matrix, the order is is:

err[0]^2   cov[0]     cov[1]     cov[3]
cov[0]     err[1]^2   cov[2]     cov[4]
cov[1]     cov[2]     err[2]^2   cov[5]
cov[3]     cov[4]     cov[5]     err[3]^2

The cov array may also be empty, to indicate that no off-diagonal elements are stored, and should be set to zero. If not empty, the size of the cov matrix must be exactly n*(n-1)/2, where n is the size of the err matrix.

CovarianceMatrixKey(SubSchema const &s, NameArray const &names)

Construct from a subschema and an array of names for each parameter of the matrix.

The field names should match the following convention:

  • diagonal elements should have names like “p1Err”, where “p1” is the name of the parameter, and should contain the square root of the variance in that parameter.

  • off-diagonal elements hould have names like “p1_p2_Cov”, where “p1” and “p2” are names of parameters. For example, for the covariance matrix of a position, we’d look for “xErr”, “yErr”, and “x_y_Cov”.

CovarianceMatrixKey(CovarianceMatrixKey const&)
CovarianceMatrixKey(CovarianceMatrixKey&&)
CovarianceMatrixKey &operator=(CovarianceMatrixKey const&)
CovarianceMatrixKey &operator=(CovarianceMatrixKey&&)
~CovarianceMatrixKey()
Eigen::Matrix<T, N, N> get(BaseRecord const &record) const

Get a covariance matrix from the given record.

void set(BaseRecord &record, Eigen::Matrix<T, N, N> const &value) const

Set a covariance matrix in the given record (uses only the lower triangle of the given matrix)

T getElement(BaseRecord const &record, int i, int j) const

Return the element in row i and column j.

void setElement(BaseRecord &record, int i, int j, T value) const

Set the element in row i and column j.

bool isValid() const

Return True if all the constituent error Keys are valid

Note that if the only one or more off-diagonal keys are invalid, we assume that means those terms are zero, not that the whole FunctorKey is invalid.

std::size_t hash_value() const

Return a hash of this object.

Public Static Functions

static CovarianceMatrixKey addFields(Schema &schema, std::string const &prefix, NameArray const &names, std::string const &unit, bool diagonalOnly = false)

Add covariance matrix fields to a Schema, and return a CovarianceMatrixKey to manage them.

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

  • [in] prefix: String used to form the first part of all field names. Suffixes of the form ‘_xErr’ and ‘_x_y_Cov’ will be added to form the full field names (using names={‘x’, ‘y’} as an example).

  • [in] unit: Unit for for error (standard deviation) values; covariance matrix elements will be unit^2.

  • [in] names: Vector of strings containing the names of the quantities the covariance matrix represents the uncertainty of.

  • [in] diagonalOnly: If true, only create fields for the error values.

static CovarianceMatrixKey addFields(Schema &schema, std::string const &prefix, NameArray const &names, NameArray const &units, bool diagonalOnly = false)

Add covariance matrix fields to a Schema, and return a CovarianceMatrixKey to manage them.

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

  • [in] prefix: String used to form the first part of all field names. Suffixes of the form ‘_xErr’ and ‘_x_y_Cov’ will be added to form the full field names (using names={‘x’, ‘y’} as an example).

  • [in] units: Vector of units for for error (standard deviation) values; covariance matrix elements will have “{units[i]} {units[j]}” or “{units[i]}^2”, depending on whether units[i] == units[j].

  • [in] names: Vector of strings containing the names of the quantities the covariance matrix represents the uncertainty of.

  • [in] diagonalOnly: If true, only create fields for the error values.

Private Members

ErrKeyArray _err
CovarianceKeyArray _cov
class EllipseKey : public lsst::afw::table::FunctorKey<lsst::afw::geom::ellipses::Ellipse>
#include <aggregates.h>

A FunctorKey used to get or set a geom::ellipses::Ellipse from an (xx,yy,xy,x,y) tuple of Keys.

Unnamed Group

bool operator==(EllipseKey const &other) const

Compare the FunctorKey for equality with another, using the underlying Ixx, Iyy, Ixy Keys.

bool operator!=(EllipseKey const &other) const

Unnamed Group

QuadrupoleKey getCore() const

Return constituent FunctorKeys.

PointKey<double> getCenter() const

Public Functions

EllipseKey()

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

EllipseKey(QuadrupoleKey const &qKey, PointKey<double> const &pKey)

Construct from individual Keys.

EllipseKey(SubSchema const &s)

Construct from a subschema, assuming (xx, yy, xy, x, y) subfields

If a schema has “a_xx”, “a_yy”, “a_xy”, “a_x”, and “a_y” fields, this constructor allows you to construct an EllipseKey via:

EllipseKey k(schema["a"]);

EllipseKey(EllipseKey const&)
EllipseKey(EllipseKey&&)
EllipseKey &operator=(EllipseKey const&)
EllipseKey &operator=(EllipseKey&&)
~EllipseKey()
geom::ellipses::Ellipse get(BaseRecord const &record) const

Get an Ellipse from the given record.

void set(BaseRecord &record, geom::ellipses::Ellipse const &value) const

Set an Ellipse in the given record.

std::size_t hash_value() const

Return a hash of this object.

bool isValid() const

Return True if all the constituent Keys are valid.

Public Static Functions

static EllipseKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit)

Add a set of _xx, _yy, _xy, _x, _y fields to a Schema, and return an EllipseKey that points to them.

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

  • [in] name: Name prefix for all fields; “_xx”, “_yy”, “_xy”, “_x” ,”_y”, will be appended to this to form the full field names.

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

  • [in] unit: String used as the unit for x and y fields; “<unit>^2” will be used for xx, yy, and xy fields.

Private Members

QuadrupoleKey _qKey
PointKey<double> _pKey
template<typename T>
class PointKey : public lsst::afw::table::FunctorKey<lsst::geom::Point<T, 2>>
#include <aggregates.h>

A FunctorKey used to get or set a lsst::geom::Point from an (x,y) pair of int or double Keys.

Unnamed Group

bool operator==(PointKey<T> const &other) const

Compare the FunctorKey for equality with another, using the underlying x and y Keys.

bool operator!=(PointKey<T> const &other) const

Public Functions

PointKey()

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

PointKey(Key<T> const &x, Key<T> const &y)

Construct from a pair of Keys.

PointKey(PointKey const&)
PointKey(PointKey&&)
PointKey &operator=(PointKey const&)
PointKey &operator=(PointKey&&)
~PointKey()
PointKey(SubSchema const &s)

Construct from a subschema, assuming x and y subfields

If a schema has “a_x” and “a_y” fields, this constructor allows you to construct a PointKey via:

PointKey<T> k(schema["a"]);

lsst::geom::Point<T, 2> get(BaseRecord const &record) const

Get a Point from the given record.

void set(BaseRecord &record, lsst::geom::Point<T, 2> const &value) const

Set a Point in the given record.

std::size_t hash_value() const

Return a hash of this object.

bool isValid() const

Return True if both the x and y Keys are valid.

Key<T> getX() const

Return the underlying x Key.

Key<T> getY() const

Return the underlying y Key.

Public Static Functions

static PointKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit)

Add a pair of _x, _y fields to a Schema, and return a PointKey that points to them.

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

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

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

  • [in] unit: String used as the unit for all fields.

Private Members

Key<T> _x
Key<T> _y
class QuadrupoleKey : public lsst::afw::table::FunctorKey<lsst::afw::geom::ellipses::Quadrupole>
#include <aggregates.h>

A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys.

Unnamed Group

bool operator==(QuadrupoleKey const &other) const

Compare the FunctorKey for equality with another, using the underlying Ixx, Iyy, Ixy Keys.

bool operator!=(QuadrupoleKey const &other) const

Unnamed Group

Key<double> getIxx() const

Return a constituent Key.

Key<double> getIyy() const
Key<double> getIxy() const

Public Functions

QuadrupoleKey()

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

QuadrupoleKey(Key<double> const &ixx, Key<double> const &iyy, Key<double> const &ixy)

Construct from individual Keys.

QuadrupoleKey(SubSchema const &s)

Construct from a subschema with appropriate subfields

If the schema has “a_xx”, “a_yy” and “a_xy” fields this constructor enables you to construct a QuadrupoleKey via:

QuadrupoleKey k(schema["a"], coordType);

QuadrupoleKey(QuadrupoleKey const&)
QuadrupoleKey(QuadrupoleKey&&)
QuadrupoleKey &operator=(QuadrupoleKey const&)
QuadrupoleKey &operator=(QuadrupoleKey&&)
~QuadrupoleKey()
geom::ellipses::Quadrupole get(BaseRecord const &record) const

Get a Quadrupole from the given record.

void set(BaseRecord &record, geom::ellipses::Quadrupole const &value) const

Set a Quadrupole in the given record.

std::size_t hash_value() const

Return a hash of this object.

bool isValid() const

Return True if all the constituent Keys are valid.

Public Static Functions

static QuadrupoleKey addFields(Schema &schema, std::string const &name, std::string const &doc, CoordinateType coordType = CoordinateType::PIXEL)

Add a set of quadrupole subfields to a schema and return a QuadrupoleKey that points to them.

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

  • [in] name: Name prefix for all fields; (“_xx”, “_yy”, “_xy”) will be appended to this to form the full field names. In celestial coordinates, we use “x” as a synonym for “RA” and “y” for “dec”.

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

  • [in] coordType: Type of coordinates in use (PIXEL or CELESTIAL).

Private Members

Key<double> _ixx
Key<double> _iyy
Key<double> _ixy
namespace std
template<typename T>
struct hash<lsst::afw::table::BoxKey<T>>

Public Types

template<>
using argument_type = lsst::afw::table::BoxKey<T>
template<>
using result_type = size_t

Public Functions

size_t operator()(argument_type const &obj) const
template<>
struct hash<lsst::afw::table::CoordKey>

Public Types

template<>
using argument_type = lsst::afw::table::CoordKey
template<>
using result_type = size_t

Public Functions

size_t operator()(argument_type const &obj) const
template<typename T, int N>
struct hash<lsst::afw::table::CovarianceMatrixKey<T, N>>

Public Types

template<>
using argument_type = lsst::afw::table::CovarianceMatrixKey<T, N>
template<>
using result_type = size_t

Public Functions

size_t operator()(argument_type const &obj) const
template<>
struct hash<lsst::afw::table::EllipseKey>

Public Types

template<>
using argument_type = lsst::afw::table::EllipseKey
template<>
using result_type = size_t

Public Functions

size_t operator()(argument_type const &obj) const
template<typename T>
struct hash<lsst::afw::table::PointKey<T>>

Public Types

template<>
using argument_type = lsst::afw::table::PointKey<T>
template<>
using result_type = size_t

Public Functions

size_t operator()(argument_type const &obj) const
template<>
struct hash<lsst::afw::table::QuadrupoleKey>

Public Types

template<>
using argument_type = lsst::afw::table::QuadrupoleKey
template<>
using result_type = size_t

Public Functions

size_t operator()(argument_type const &obj) const