File arrays.h

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

Public Types

template<>
using argument_type = lsst::afw::table::ArrayKey<T>
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
template<typename T>
class ArrayKey : public lsst::afw::table::FunctorKey<ndarray::Array<T const, 1, 1>>, public lsst::afw::table::ReferenceFunctorKey<ndarray::ArrayRef<T, 1, 1>>, public lsst::afw::table::ConstReferenceFunctorKey<ndarray::ArrayRef<T const, 1, 1>>
#include <arrays.h>

A FunctorKey used to get or set a ndarray::Array from a sequence of scalar Keys.

ArrayKey operates on the convention that arrays are defined by a set of contiguous scalar fields (i.e. added to the Schema in order, with no interruption) of the same type, with a common field name prefix and “_0”, “_1” etc. suffixes.

Unnamed Group

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

Compare the FunctorKey for equality with another, using the underlying scalar Keys.

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

Public Functions

ArrayKey()

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

ArrayKey(std::vector<Key<T>> const &keys)

Construct from a vector of scalar Keys.

ArrayKey(Key<Array<T>> const &other)

Construct from a compound Key< Array<T> >

Key< Array<T> > is now deprecated in favor of ArrayKey; this factory function is intended to aid in the transition.

ArrayKey(SubSchema const &s)

Construct from a subschema, assuming *_0, *_1, *_2, etc. subfields

If a schema has “a_0”, “a_1”, and “a_2” fields, this constructor allows you to construct a 3-element ArrayKey via:

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

ArrayKey(ArrayKey const&)
ArrayKey(ArrayKey&&)
ArrayKey &operator=(ArrayKey const&)
ArrayKey &operator=(ArrayKey&&)
~ArrayKey()
int getSize() const

Return the number of elements in the array.

ndarray::Array<T const, 1, 1> get(BaseRecord const &record) const

Get an array from the given record.

void set(BaseRecord &record, ndarray::Array<T const, 1, 1> const &value) const

Set an array in the given record.

ndarray::ArrayRef<T, 1, 1> getReference(BaseRecord &record) const

Get non-const reference array from the given record.

ndarray::ArrayRef<T const, 1, 1> getConstReference(BaseRecord const &record) const

Get const reference array from the given record.

std::size_t hash_value() const

Return a hash of this object.

bool isValid() const

Return True if the FunctorKey contains valid scalar keys.

Key<T> operator[](int i) const

Return a scalar Key for an element of the array.

ArrayKey slice(int begin, int end) const

Return a FunctorKey corresponding to a range of elements.

Public Static Functions

static ArrayKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit, std::vector<T> const &docData)

Add an array of fields to a Schema, and return an ArrayKey that points to them.

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

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

  • [in] doc: String used as the documentation for the fields. Should include a single boost::format template string, which will be substituted with the appropriate element from the docData array to form the full documentation string.

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

  • [in] docData: Vector of values substituted into the doc fields. The length of the vector determines the number of fields added.

static ArrayKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit, int size)

Add an array of fields to a Schema, and return an ArrayKey that points to them.

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

  • [in] name: Name prefix for all fields; “_0”, “_1”, etc. 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.

  • [in] size: Number of fields to add.

Private Functions

ArrayKey(Key<T> const &begin, int size)

Private Members

Key<T> _begin
int _size
namespace std
template<typename T>
struct hash<lsst::afw::table::ArrayKey<T>>

Public Types

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

Public Functions

size_t operator()(argument_type const &obj) const