File slots.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 afw
namespace table
class CentroidSlotDefinition : public lsst::afw::table::SlotDefinition
#include <slots.h>

SlotDefinition specialization for centroids.

Public Types

typedef lsst::geom::Point2D MeasValue

Type returned by accessing the slot measurement.

typedef Eigen::Matrix<float, 2, 2> ErrValue

Type returned by accessing the slot uncertainty.

typedef Point2DKey MeasKey

Key type used to access the slot measurement.

typedef CovarianceMatrixKey<float, 2> ErrKey

Key type used to access the slot uncertainty.

Public Functions

CentroidSlotDefinition(std::string const &name)

Construct a SlotDefinition from the name of the slot (e.g. “Centroid”)

bool isValid() const

Return true if the key associated with the measurement is valid.

MeasKey getMeasKey() const

Return the cached Key used to access the slot measurement.

ErrKey getErrKey() const

Return the cached Key used to access the slot uncertainty.

Key<Flag> getFlagKey() const

Return the cached Key used to access the slot failure flag.

void setKeys(std::string const &alias, Schema const &schema)

Update the cached Keys following an change of aliases in the given Schema

This method is intended for internal use by SourceTable only.

Parameters
  • [in] alias: If non-empty, abort early if this string does not start with getAlias() (used to see if an alias change might have affected this slot, and avoid unnecessary work if not).

  • [in] schema: Schema to search for Keys.

CentroidSlotDefinition(CentroidSlotDefinition const&)
CentroidSlotDefinition(CentroidSlotDefinition&&)
CentroidSlotDefinition &operator=(CentroidSlotDefinition const&)
CentroidSlotDefinition &operator=(CentroidSlotDefinition&&)
~CentroidSlotDefinition()

Private Members

MeasKey _measKey
ErrKey _errKey
Key<Flag> _flagKey
class FluxSlotDefinition : public lsst::afw::table::SlotDefinition
#include <slots.h>

SlotDefinition specialization for fluxes.

Public Types

typedef double MeasValue

Type returned by accessing the slot measurement.

typedef double ErrValue

Type returned by accessing the slot uncertainty.

typedef Key<double> MeasKey

Key type used to access the slot measurement.

typedef Key<double> ErrKey

Key type used to access the slot uncertainty.

Public Functions

FluxSlotDefinition(std::string const &name)

Construct a SlotDefinition from the name of the slot (e.g. “PsfFlux”)

bool isValid() const

Return true if the key associated with the measurement is valid.

MeasKey getMeasKey() const

Return the cached Key used to access the slot measurement.

ErrKey getErrKey() const

Return the cached Key used to access the slot uncertainty.

Key<Flag> getFlagKey() const

Return the cached Key used to access the slot failure flag.

void setKeys(std::string const &alias, Schema const &schema)

Update the cached Keys following an change of aliases in the given Schema

This method is intended for internal use by SourceTable only.

Parameters
  • [in] alias: If non-empty, abort early if this string does not start with getAlias() (used to see if an alias change might have affected this slot, and avoid unnecessary work if not).

  • [in] schema: Schema to search for Keys.

FluxSlotDefinition(FluxSlotDefinition const&)
FluxSlotDefinition(FluxSlotDefinition&&)
FluxSlotDefinition &operator=(FluxSlotDefinition const&)
FluxSlotDefinition &operator=(FluxSlotDefinition&&)
~FluxSlotDefinition()

Private Members

MeasKey _measKey
ErrKey _errKey
Key<Flag> _flagKey
class ShapeSlotDefinition : public lsst::afw::table::SlotDefinition
#include <slots.h>

SlotDefinition specialization for shapes.

Public Types

typedef geom::ellipses::Quadrupole MeasValue

Type returned by accessing the slot measurement.

typedef Eigen::Matrix<float, 3, 3> ErrValue

Type returned by accessing the slot uncertainty.

typedef QuadrupoleKey MeasKey

Key type used to access the slot measurement.

typedef CovarianceMatrixKey<float, 3> ErrKey

Key type used to access the slot uncertainty.

Public Functions

ShapeSlotDefinition(std::string const &name)

Construct a SlotDefinition from the name of the slot (e.g. “Shape”)

bool isValid() const

Return true if the key associated with the measurement is valid.

MeasKey getMeasKey() const

Return the cached Key used to access the slot measurement.

ErrKey getErrKey() const

Return the cached Key used to access the slot uncertainty.

Key<Flag> getFlagKey() const

Return the cached Key used to access the slot failure flag.

void setKeys(std::string const &alias, Schema const &schema)

Update the cached Keys following an change of aliases in the given Schema

This method is intended for internal use by SourceTable only.

Parameters
  • [in] alias: If non-empty, abort early if this string does not start with getAlias() (used to see if an alias change might have affected this slot, and avoid unnecessary work if not).

  • [in] schema: Schema to search for Keys.

ShapeSlotDefinition(ShapeSlotDefinition const&)
ShapeSlotDefinition(ShapeSlotDefinition&&)
ShapeSlotDefinition &operator=(ShapeSlotDefinition const&)
ShapeSlotDefinition &operator=(ShapeSlotDefinition&&)
~ShapeSlotDefinition()

Private Members

MeasKey _measKey
ErrKey _errKey
Key<Flag> _flagKey
class SlotDefinition
#include <slots.h>

Base class for helper classes that define slots on SourceTable/SourceRecord.

Each type of slot corresponds to a subclass of SlotDefinition, and each actual slot corresponds to a particular field name prefix. For instance, to look up the centroid slot, we look for fields named “slot_Centroid_x” and “slot_Centroid_y”. Instead of actually naming a particular field that, however, we use Schema’s alias mechanism (see AliasMap) to make these field name lookups resolve to the name of other fields. The actual definition of the slots is thus managed by the Schema’s AliasMap, though a SourceTable object will cache Keys for the various slots to make sure accessing slot values is efficient (more precisely, when you set an alias related to a slot on an AliasMap, any table it corresponds to will receive a notification that it should update its Keys). These cached Keys are actually stored within the SlotDefinition (as data members of derived classes).

Note that the uncertainty and failure flag components of slots are not required; a slot may have only a measurement defined, or a measurement and either one of these (but not both). A slot may not have only an uncertainty and/or a a failure flag, however.

A SlotDefinition instance is not just an internal object used by SourceTable; it can also be used to inspect the slots via SourceTable::getXxxSlot(), which is now the preferred way to access the Keys that slots correspond to. SlotDefinition objects should only be constructed by SourceTable, however.

Subclassed by lsst::afw::table::CentroidSlotDefinition, lsst::afw::table::FluxSlotDefinition, lsst::afw::table::ShapeSlotDefinition

Public Functions

SlotDefinition(std::string const &name)

Construct a SlotDefinition from the name of the slot (e.g. “Centroid” or “PsfFlux”)

std::string getName() const

Return the name of the slot (e.g. “Centroid” or “PsfFlux”)

std::string getAlias() const

Return the alias field prefix used to lookup Keys for the slot.

This simply prepends “slot_” to the slot name.

SlotDefinition(SlotDefinition const&)
SlotDefinition(SlotDefinition&&)
SlotDefinition &operator=(SlotDefinition const&)
SlotDefinition &operator=(SlotDefinition&&)
~SlotDefinition()

Protected Attributes

std::string _name
struct SlotSuite
#include <slots.h>

An aggregate containing all of the current slots used in SourceTable.

This is essentially for internal use by SourceTable only; it is defined here to keep the source code for the slot mechanism in one place as much as possible.

Public Functions

void handleAliasChange(std::string const &alias, Schema const &schema)

Handle a callback from an AliasMap informing the table that an alias has changed.

SlotSuite(Schema const &schema)

Initialize the slots.

Public Members

FluxSlotDefinition defPsfFlux
FluxSlotDefinition defApFlux
FluxSlotDefinition defGaussianFlux
FluxSlotDefinition defModelFlux
FluxSlotDefinition defCalibFlux
CentroidSlotDefinition defCentroid
ShapeSlotDefinition defShape