File Filter.h

template<>
struct hash<lsst::afw::image::FilterProperty>

Public Types

template<>
using argument_type = lsst::afw::image::FilterProperty
template<>
using result_type = size_t

Public Functions

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

Public Types

template<>
using argument_type = lsst::afw::image::Filter
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 image
class Filter : public Storable
#include <Filter.h>

Holds an integer identifier for an LSST filter.

Public Functions

Filter(std::string const &name, bool const force = false)

Parameters
  • name: Name of filter

  • force: Allow us to construct an unknown Filter

Creates a Filter with the given name

Filter(int id = UNKNOWN)

Parameters
  • id: Id number of desired filter

Creates a Filter with the given identifier

Filter(std::shared_ptr<lsst::daf::base::PropertySet const> metadata, bool const force = false)

Create a Filter from a PropertySet (e.g. a FITS header)

Parameters
  • metadata: Metadata to process (e.g. a IFITS header)

  • force: Allow us to construct an unknown Filter

Filter(Filter const&)
Filter(Filter&&)
Filter &operator=(Filter const&)
Filter &operator=(Filter&&)
~Filter()
bool operator==(Filter const &rhs) const

Are two filters identical?

bool operator!=(Filter const &rhs) const
std::size_t hash_value() const

Return a hash of this object.

int getId() const

Return a Filter’s integral id

std::string const &getName() const

Return a Filter’s name

std::string const &getCanonicalName() const

Return a filter’s canonical name

I.e. if this filter’s an alias, return the name of the aliased Filter

std::vector<std::string> getAliases() const

Return all aliases by which this filter is known

The list excludes the canonical name

FilterProperty const &getFilterProperty() const

Return a Filter’s FilterProperty

std::shared_ptr<typehandling::Storable> cloneStorable() const

Create a new Filter that is a copy of this one.

bool equals(typehandling::Storable const &other) const

Compare this object to another Storable.

Return

*this == other if other is a Filter; otherwise false.

bool isPersistable() const

Public Static Functions

static void reset()

Clear all definitions

static int define(FilterProperty const &filterProperty, int id = AUTO, bool force = false)

Define a filter name to have the specified id

If id == Filter::AUTO a value will be chosen for you.

It is an error to attempt to change a name’s id (unless you specify force)

static int defineAlias(std::string const &oldName, std::string const &newName, bool force = false)

Define an alias for a filter

Parameters
  • oldName: old name for Filter

  • newName: new name for Filter

  • force: force an alias even if newName is already in use

static std::vector<std::string> getNames()

Return a list of known filters

Public Static Attributes

int const AUTO
int const UNKNOWN

Protected Functions

std::string getPersistenceName() const
std::string getPythonModule() const
void write(OutputArchiveHandle &handle) const

Private Types

typedef std::unordered_map<std::string, std::string const> AliasMap
typedef std::unordered_map<std::string, unsigned int const> NameMap
typedef std::unordered_map<unsigned int, std::string const> IdMap

Private Members

int _id
std::string _name

Private Static Functions

static void _initRegistry()

Initialise the Filter registry

static int _lookup(std::string const &name, bool const force = false)

Lookup the ID associated with a name

Parameters
  • name: Name of filter

  • force: return an invalid ID, but don’t throw, if name is unknown

static std::string const &_lookup(int id)

Lookup the name associated with an ID

Private Static Attributes

int _id0
AliasMap *_aliasMap
IdMap *_idMap
NameMap *_nameMap
class FilterProperty
#include <Filter.h>

Describe the properties of a Filter (e.g. effective wavelength)

Public Functions

FilterProperty(std::string const &name, double lambdaEff, double lambdaMin = NAN, double lambdaMax = NAN, bool force = false)
FilterProperty(std::string const &name, lsst::daf::base::PropertySet const &prop = lsst::daf::base::PropertySet(), bool force = false)

Parameters
  • name: name of filter

  • prop: values describing the Filter

  • force: Allow this name to replace a previous one

FilterProperty(FilterProperty const&)
FilterProperty(FilterProperty&&)
FilterProperty &operator=(FilterProperty const&)
FilterProperty &operator=(FilterProperty&&)
~FilterProperty()
std::string const &getName() const

Return a filter’s name

double getLambdaEff() const

Return the filter’s effective wavelength (nm)

double getLambdaMin() const

Return the filter’s minimum wavelength (nm) where the transmission is above 1% of the maximum.

double getLambdaMax() const

Return the filter’s maximum wavelength (nm) where the transmission is above 1% of the maximum.

bool operator==(FilterProperty const &rhs) const

Return true iff two FilterProperties are identical

Parameters
  • rhs: Object to compare with this

bool operator!=(FilterProperty const &rhs) const

Parameters
  • rhs: Object to compare with this

Return true iff rhs != this

std::size_t hash_value() const

Return a hash of this object.

Public Static Functions

static void reset()

Clear all definitions

static FilterProperty const &lookup(std::string const &name)

Lookup the properties of a filter “name”

Parameters
  • name: name of desired filter

Private Types

typedef std::unordered_map<std::string, FilterProperty> PropertyMap

Private Functions

void _insert(bool force = false)

Insert FilterProperty into registry

Parameters
  • force: Allow this name to replace a previous one?

Private Members

std::string _name
double _lambdaEff
double _lambdaMin
double _lambdaMax

Private Static Functions

static void _initRegistry()

Initialise the Filter registry

Private Static Attributes

PropertyMap *_propertyMap
namespace detail

Functions

int stripFilterKeywords(std::shared_ptr<lsst::daf::base::PropertySet> metadata)

Remove Filter-related keywords from the metadata

Return

Number of keywords stripped

Parameters
  • [inout] metadata: Metadata to be stripped

namespace std
template<>
struct hash<lsst::afw::image::Filter>

Public Types

template<>
using argument_type = lsst::afw::image::Filter
template<>
using result_type = size_t

Public Functions

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

Public Types

template<>
using argument_type = lsst::afw::image::FilterProperty
template<>
using result_type = size_t

Public Functions

size_t operator()(argument_type const &obj) const