File AliasMap.h

template<>
struct hash<lsst::afw::table::AliasMap>

Public Types

template<>
using argument_type = lsst::afw::table::AliasMap
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
class AliasMap
#include <AliasMap.h>

Mapping class that holds aliases for a Schema

Aliases need not be complete, but they must match to the beginning of a field name to be useful. For example, if “a_b_c” is a true field name, “x_->a_b” is a valid alias that will cause “x_y_c” to map to “a_b_c”, but “y_z->b_c” will not cause “a_y_z” to be matched.

Aliases are not checked to see if they match any existing fields, and if an alias has the same name as a field name, it will take precedence and hide the true field.

Unlike the other components of a Schema, aliases can be modified and removed, even after a Table has been constructed from the Schema.

AliasMaps are shared when Schemas are copy-constructed, but can be separated manually by calling Schema::disconnectAliases() or Schema::setAliasMap(). In addition, the AliasMap is deep-copied when used to construct a Table (or Catalog).

In order to allow Tables to react to changes in aliases (which may be used to define cached Keys held by the table, as in SourceTable’s “slots” mechanism), an AliasMap that is part of a Schema held by a Table will hold a pointer to that Table, and call BaseTable::handleAliasChanges() when its aliases are set or removed.

Unnamed Group

bool operator==(AliasMap const &other) const

Equality comparison

bool operator!=(AliasMap const &other) const

Public Types

typedef std::map<std::string, std::string>::const_iterator Iterator

An iterator over alias->target pairs.

Public Functions

AliasMap()
AliasMap(AliasMap const &other)

Deep-copy an AliasMap

The new AliasMap will not be linked to any tables, even if other is.

AliasMap(AliasMap &&other)
AliasMap &operator=(AliasMap const&)
AliasMap &operator=(AliasMap&&)
~AliasMap()
Iterator begin() const

Return a iterator to the beginning of the map.

Iterator end() const

Return a iterator to one past the end of the map.

std::size_t size() const

Return the number of aliases.

bool empty() const

Return the true if there are no aliases.

std::string apply(std::string const &name) const

Apply any aliases that match the given field name and return a de-aliased name.

Given a string that starts with any alias in the map, this returns a string with the part of the string that matches the alias replaced by that alias’s target. The longest such alias is used.

For example:

m = AliasMap();
m.set("q", "a");
m.set("q1", "b");
assert(m.apply("q3") == "a3");
assert(m.apply("q12") == "b2");

std::string get(std::string const &alias) const

Return the target of the given alias

Unlike apply(), this will not return partial matches.

Exceptions
  • pex::exceptions::NotFoundError: if no alias with the given name exists

void set(std::string const &alias, std::string const &target)

Add an alias to the schema or replace an existing one.

bool erase(std::string const &alias)

Remove an alias from the schema if it is present.

Return

True if an alias was erased, and false if no such alias was found.

std::size_t hash_value() const

Return a hash of this object.

bool contains(AliasMap const &other) const

Return true if all aliases in this are also in other (with the same targets).

Private Types

typedef std::map<std::string, std::string> Internal

Private Functions

void _apply(std::string &name) const

Private Members

Internal _internal
BaseTable *_table

Friends

friend lsst::afw::table::Schema
friend lsst::afw::table::SubSchema
friend lsst::afw::table::BaseTable
namespace std
template<>
struct hash<lsst::afw::table::AliasMap>

Public Types

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

Public Functions

size_t operator()(argument_type const &obj) const