File FieldBase.h

template<>
struct FieldBase<std::string>
#include <FieldBase.h>

Field base class specialization for strings.

Subclassed by lsst::afw::table::Key< std::string >

Public Types

typedef std::string Value

the type returned by BaseRecord::get

typedef char *Reference

the type returned by BaseRecord::operator[]

typedef char const *ConstReference

the type returned by BaseRecord::operator[] (const)

typedef char Element

the type of subfields and array elements

Public Functions

FieldBase(int size = -1)

Construct a FieldBase with the given size.

A size == 0 indicates a variable-length string. Negative sizes are not permitted.

This constructor is implicit and has an invalid default so it can be used in the Field constructor (as if it were an int argument) without specializing Field. In other words, it allows one to construct a 25-character string field like this:

Field< std::string >("name", "documentation", 25);

…even though the third argument to the Field constructor takes a FieldBase, not an int.

FieldBase(FieldBase const&)
FieldBase(FieldBase&&)
FieldBase &operator=(FieldBase const&)
FieldBase &operator=(FieldBase&&)
~FieldBase()
int getElementCount() const

Return the number of subfield elements (equal to the size of the string, including a null terminator), or 0 for a variable-length string.

int getSize() const

Return the maximum length of the string, including a null terminator (equal to the number of subfield elements), or 0 for a variable-length string.

bool isVariableLength() const

Return true if the field is variable-length (each record can have a different size array).

Public Static Functions

static std::string getTypeString()

Return a string description of the field type.

Protected Functions

void stream(std::ostream &os) const

Defines how Fields are printed.

Reference getReference(Element *p, ndarray::Manager::Ptr const &m) const

Used to implement BaseRecord::operator[] (non-const).

ConstReference getConstReference(Element const *p, ndarray::Manager::Ptr const &m) const

Used to implement BaseRecord::operator[] (const).

Value getValue(Element const *p, ndarray::Manager::Ptr const &m) const

Used to implement BaseRecord::get.

void setValue(Element *p, ndarray::Manager::Ptr const&, std::string const &value) const

Used to implement BaseRecord::set Fixed-lengths strings are handled by copying the data into p through p + _size, nulling extra characters, if any. The data is only null-terminated if value.size() < _size. Variable-length strings are handled by setting p to the address of a std::string that is a copy of value

Protected Static Functions

static FieldBase makeDefault()

Needed to allow Keys to be default-constructed.

Private Members

int _size
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>
struct FieldBase
#include <FieldBase.h>

Field base class default implementation (used for numeric scalars and lsst::geom::Angle).

Subclassed by lsst::afw::table::Key< afw::table::Array< Scalar > >, lsst::afw::table::Key< afw::table::Flag >, lsst::afw::table::Key< afw::table::RecordId >, lsst::afw::table::Key< CentroidElement >, lsst::afw::table::Key< double >, lsst::afw::table::Key< Element >, lsst::afw::table::Key< ErrElement >, lsst::afw::table::Key< float >, lsst::afw::table::Key< FluxErrElement >, lsst::afw::table::Key< int >, lsst::afw::table::Key< lsst::afw::table::Array< int > >, lsst::afw::table::Key< lsst::afw::table::Array< Scalar > >, lsst::afw::table::Key< lsst::geom::Angle >, lsst::afw::table::Key< Mag >, lsst::afw::table::Key< MagErrElement >, lsst::afw::table::Key< meas::base::Flux >, lsst::afw::table::Key< RecordId >, lsst::afw::table::Key< Scalar >, lsst::afw::table::Field< T >, lsst::afw::table::Key< T >

Public Types

typedef T Value

the type returned by BaseRecord::get

typedef T &Reference

the type returned by BaseRecord::operator[] (non-const)

typedef T const &ConstReference

the type returned by BaseRecord::operator[] (const)

typedef T Element

the type of subfields (the same as the type itself for scalars)

Public Functions

int getElementCount() const

Return the number of subfield elements (always one for scalars).

FieldBase()
FieldBase(int)
FieldBase(FieldBase const&)
FieldBase(FieldBase&&)
FieldBase &operator=(FieldBase const&)
FieldBase &operator=(FieldBase&&)
~FieldBase()

Public Static Functions

static std::string getTypeString()

Return a string description of the field type.

Protected Functions

void stream(std::ostream &os) const

Defines how Fields are printed.

Reference getReference(Element *p, ndarray::Manager::Ptr const&) const

Used to implement BaseRecord::operator[] (non-const).

ConstReference getConstReference(Element const *p, ndarray::Manager::Ptr const&) const

Used to implement BaseRecord::operator[] (const).

Value getValue(Element const *p, ndarray::Manager::Ptr const&) const

Used to implement BaseRecord::get.

void setValue(Element *p, ndarray::Manager::Ptr const&, Value v) const

Used to implement BaseRecord::set.

Protected Static Functions

static FieldBase makeDefault()

Needed to allow Keys to be default-constructed.

template<typename U>
struct FieldBase<Array<U>>
#include <FieldBase.h>

Field base class specialization for arrays.

The Array tag is used for both fixed-length (same size in every record, accessible via ColumnView) and variable-length arrays; variable-length arrays are initialized with a size of 0. Ideally, we’d use complete different tag classes for those two very different types, but boost::variant and boost::mpl put a limit of 20 on the number of field types, and we’re running out. In a future reimplementation of afw::table, we should fix this.

Public Types

typedef ndarray::Array<U const, 1, 1> Value

the type returned by BaseRecord::get

typedef ndarray::ArrayRef<U, 1, 1> Reference

the type returned by BaseRecord::operator[]

typedef ndarray::ArrayRef<U const, 1, 1> ConstReference

the type returned by BaseRecord::operator[] (const)

typedef U Element

the type of subfields and array elements

Public Functions

FieldBase(int size = 0)

Construct a FieldBase with the given size.

A size == 0 indicates a variable-length array. Negative sizes are not permitted.

This constructor is implicit with a default so it can be used in the Field constructor (as if it were an int argument) without specializing Field. In other words, it allows one to construct a 25-element array field like this:

Field< Array<float> >("name", "documentation", 25);

…even though the third argument to the Field constructor takes a FieldBase, not an int.

FieldBase(FieldBase const&)
FieldBase(FieldBase&&)
FieldBase &operator=(FieldBase const&)
FieldBase &operator=(FieldBase&&)
~FieldBase()
int getElementCount() const

Return the number of subfield elements (equal to the size of the array), or 0 for a variable-length array.

int getSize() const

Return the size of the array (equal to the number of subfield elements), or 0 for a variable-length array.

bool isVariableLength() const

Return true if the field is variable-length (each record can have a different size array).

Public Static Functions

static std::string getTypeString()

Return a string description of the field type.

Protected Functions

void stream(std::ostream &os) const

Defines how Fields are printed.

Reference getReference(Element *p, ndarray::Manager::Ptr const &m) const

Used to implement BaseRecord::operator[] (non-const).

ConstReference getConstReference(Element const *p, ndarray::Manager::Ptr const &m) const

Used to implement BaseRecord::operator[] (const).

Value getValue(Element const *p, ndarray::Manager::Ptr const &m) const

Used to implement BaseRecord::get.

void setValue(Element *p, ndarray::Manager::Ptr const&, ndarray::Array<Element, 1, 1> const &value) const

Used to implement BaseRecord::set; accepts only non-const arrays of the right type. Fixed-length arrays are handled by copying the data from value to p through p + _size. Variable-length arrays are handled by setting p to the address of value, an ndarray, hence a shallow copy (ndarray arrays are reference-counted so this will not leak memory). If you want deep assignment of variable-length data, use operator[] to get a reference and assign to that.

template<typename Derived>
void setValue(Element *p, ndarray::Manager::Ptr const&, ndarray::ExpressionBase<Derived> const &value) const

Used to implement BaseRecord::set; accepts any ndarray expression.

Protected Static Functions

static FieldBase makeDefault()

Needed to allow Keys to be default-constructed.

Private Functions

template<typename Derived>
void setValueDeep(Element *p, ndarray::ExpressionBase<Derived> const &value) const

Private Members

int _size
template<>
struct FieldBase<std::string>
#include <FieldBase.h>

Field base class specialization for strings.

Subclassed by lsst::afw::table::Key< std::string >

Public Types

typedef std::string Value

the type returned by BaseRecord::get

typedef char *Reference

the type returned by BaseRecord::operator[]

typedef char const *ConstReference

the type returned by BaseRecord::operator[] (const)

typedef char Element

the type of subfields and array elements

Public Functions

FieldBase(int size = -1)

Construct a FieldBase with the given size.

A size == 0 indicates a variable-length string. Negative sizes are not permitted.

This constructor is implicit and has an invalid default so it can be used in the Field constructor (as if it were an int argument) without specializing Field. In other words, it allows one to construct a 25-character string field like this:

Field< std::string >("name", "documentation", 25);

…even though the third argument to the Field constructor takes a FieldBase, not an int.

FieldBase(FieldBase const&)
FieldBase(FieldBase&&)
FieldBase &operator=(FieldBase const&)
FieldBase &operator=(FieldBase&&)
~FieldBase()
int getElementCount() const

Return the number of subfield elements (equal to the size of the string, including a null terminator), or 0 for a variable-length string.

int getSize() const

Return the maximum length of the string, including a null terminator (equal to the number of subfield elements), or 0 for a variable-length string.

bool isVariableLength() const

Return true if the field is variable-length (each record can have a different size array).

Public Static Functions

static std::string getTypeString()

Return a string description of the field type.

Protected Functions

void stream(std::ostream &os) const

Defines how Fields are printed.

Reference getReference(Element *p, ndarray::Manager::Ptr const &m) const

Used to implement BaseRecord::operator[] (non-const).

ConstReference getConstReference(Element const *p, ndarray::Manager::Ptr const &m) const

Used to implement BaseRecord::operator[] (const).

Value getValue(Element const *p, ndarray::Manager::Ptr const &m) const

Used to implement BaseRecord::get.

void setValue(Element *p, ndarray::Manager::Ptr const&, std::string const &value) const

Used to implement BaseRecord::set Fixed-lengths strings are handled by copying the data into p through p + _size, nulling extra characters, if any. The data is only null-terminated if value.size() < _size. Variable-length strings are handled by setting p to the address of a std::string that is a copy of value

Protected Static Functions

static FieldBase makeDefault()

Needed to allow Keys to be default-constructed.

Private Members

int _size
namespace detail

Functions

int indexCovariance(int i, int j)

Defines the ordering of packed covariance matrices.

This storage is equivalent to LAPACK ‘UPLO=U’.

int computeCovariancePackedSize(int size)

Defines the packed size of a covariance matrices.