LSST Applications  21.0.0+75b29a8a7f,21.0.0+e70536a077,21.0.0-1-ga51b5d4+62c747d40b,21.0.0-10-gbfb87ad6+1472003707,21.0.0-12-g51f5968d7+47cba9fc36,21.0.0-2-g103fe59+b7c383bd9a,21.0.0-2-g1367e85+48b67f5d39,21.0.0-2-g45278ab+e70536a077,21.0.0-2-g4bc9b9f+3fe6d1dcab,21.0.0-2-g5242d73+48b67f5d39,21.0.0-2-g54e2caa+df6b29423d,21.0.0-2-g7f82c8f+6775bdeedd,21.0.0-2-g8dde007+9e83774735,21.0.0-2-g8f08a60+9402881886,21.0.0-2-ga326454+6775bdeedd,21.0.0-2-ga63a54e+1ed2fee5f8,21.0.0-2-gde069b7+26c92b3210,21.0.0-2-gecfae73+adba745f5b,21.0.0-2-gfc62afb+48b67f5d39,21.0.0-23-ga70773b+149afabbf4,21.0.0-25-g85b8e57b+773e41f820,21.0.0-3-g357aad2+5f60c9c50d,21.0.0-3-g4be5c26+48b67f5d39,21.0.0-3-g65f322c+73694798db,21.0.0-3-g6d51c4a+ed84a54361,21.0.0-3-g7d9da8d+75b29a8a7f,21.0.0-3-gaa929c8+6a9f1b9ca4,21.0.0-3-ge02ed75+ed84a54361,21.0.0-4-g3300ddd+e70536a077,21.0.0-4-gc004bbf+542906830e,21.0.0-4-gccdca77+f94adcd104,21.0.0-4-gd1c1571+0451688df7,21.0.0-5-g7b47fff+ed84a54361,21.0.0-5-gb155db7+58d9d10622,21.0.0-5-gdf36809+637e4641ee,21.0.0-6-g722ad07+d350a29088,21.0.0-7-gfd72ab2+fa9972ccfc,21.0.0-8-gfbe0b4b+6a9f1b9ca4,w.2021.05
LSST Data Management Base Package
Public Member Functions | Static Public Member Functions | List of all members
lsst::afw::image::FilterProperty Class Referencefinal

Describe the properties of a Filter (e.g. More...

#include <Filter.h>

Public Member 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)
 
 FilterProperty (FilterProperty const &)=default
 
 FilterProperty (FilterProperty &&) noexcept=default
 
FilterPropertyoperator= (FilterProperty const &)=default
 
FilterPropertyoperator= (FilterProperty &&) noexcept=default
 
 ~FilterProperty () noexcept=default
 
std::string const & getName () const noexcept
 Return a filter's name. More...
 
double getLambdaEff () const noexcept
 Return the filter's effective wavelength (nm) More...
 
double getLambdaMin () const noexcept
 Return the filter's minimum wavelength (nm) where the transmission is above 1% of the maximum. More...
 
double getLambdaMax () const noexcept
 Return the filter's maximum wavelength (nm) where the transmission is above 1% of the maximum. More...
 
bool operator== (FilterProperty const &rhs) const noexcept
 Return true iff two FilterProperties are identical. More...
 
bool operator!= (FilterProperty const &rhs) const noexcept
 Return true iff rhs != this. More...
 
std::size_t hash_value () const noexcept
 Return a hash of this object. More...
 

Static Public Member Functions

static void reset ()
 Clear all definitions. More...
 
static FilterProperty const & lookup (std::string const &name)
 Lookup the properties of a filter "name". More...
 

Detailed Description

Describe the properties of a Filter (e.g.

effective wavelength)

Definition at line 51 of file Filter.h.

Constructor & Destructor Documentation

◆ FilterProperty() [1/4]

lsst::afw::image::FilterProperty::FilterProperty ( std::string const &  name,
double  lambdaEff,
double  lambdaMin = NAN,
double  lambdaMax = NAN,
bool  force = false 
)
inlineexplicit

Definition at line 53 of file Filter.h.

55  : _name(name), _lambdaEff(lambdaEff), _lambdaMin(lambdaMin), _lambdaMax(lambdaMax) {
56  _insert(force);
57  }

◆ FilterProperty() [2/4]

lsst::afw::image::FilterProperty::FilterProperty ( std::string const &  name,
lsst::daf::base::PropertySet const &  prop = lsst::daf::base::PropertySet(),
bool  force = false 
)
explicit
Parameters
namename of filter
propvalues describing the Filter
forceAllow this name to replace a previous one

Definition at line 52 of file Filter.cc.

53  : _name(name), _lambdaEff(NAN), _lambdaMin(NAN), _lambdaMax(NAN) {
54  if (prop.exists("lambdaEff")) {
55  _lambdaEff = prop.getAsDouble("lambdaEff");
56  }
57  if (prop.exists("lambdaMin")) {
58  _lambdaMin = prop.getAsDouble("lambdaMin");
59  }
60  if (prop.exists("lambdaMax")) {
61  _lambdaMax = prop.getAsDouble("lambdaMax");
62  }
63  _insert(force);
64 }
table::Key< std::string > name
Definition: Filter.cc:188

◆ FilterProperty() [3/4]

lsst::afw::image::FilterProperty::FilterProperty ( FilterProperty const &  )
default

◆ FilterProperty() [4/4]

lsst::afw::image::FilterProperty::FilterProperty ( FilterProperty &&  )
defaultnoexcept

◆ ~FilterProperty()

lsst::afw::image::FilterProperty::~FilterProperty ( )
defaultnoexcept

Member Function Documentation

◆ getLambdaEff()

double lsst::afw::image::FilterProperty::getLambdaEff ( ) const
inlinenoexcept

Return the filter's effective wavelength (nm)

Definition at line 80 of file Filter.h.

80 { return _lambdaEff; }

◆ getLambdaMax()

double lsst::afw::image::FilterProperty::getLambdaMax ( ) const
inlinenoexcept

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

Definition at line 88 of file Filter.h.

88 { return _lambdaMax; }

◆ getLambdaMin()

double lsst::afw::image::FilterProperty::getLambdaMin ( ) const
inlinenoexcept

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

Definition at line 84 of file Filter.h.

84 { return _lambdaMin; }

◆ getName()

std::string const& lsst::afw::image::FilterProperty::getName ( ) const
inlinenoexcept

Return a filter's name.

Definition at line 76 of file Filter.h.

76 { return _name; }

◆ hash_value()

std::size_t lsst::afw::image::FilterProperty::hash_value ( ) const
noexcept

Return a hash of this object.

Definition at line 91 of file Filter.cc.

91 { return std::hash<double>()(_lambdaEff); };

◆ lookup()

FilterProperty const & lsst::afw::image::FilterProperty::lookup ( std::string const &  name)
static

Lookup the properties of a filter "name".

Parameters
namename of desired filter

Definition at line 101 of file Filter.cc.

101  {
102  if (!_propertyMap) {
103  _initRegistry();
104  }
105 
106  PropertyMap::iterator keyVal = _propertyMap->find(name);
107 
108  if (keyVal == _propertyMap->end()) {
109  throw LSST_EXCEPT(pexEx::NotFoundError, "Unable to find filter " + name);
110  }
111 
112  return keyVal->second;
113 }
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
Reports attempts to access elements using an invalid key.
Definition: Runtime.h:151
T end(T... args)
T find(T... args)

◆ operator!=()

bool lsst::afw::image::FilterProperty::operator!= ( FilterProperty const &  rhs) const
inlinenoexcept

Return true iff rhs != this.

Parameters
rhsObject to compare with this

Definition at line 98 of file Filter.h.

99  {
100  return !(*this == rhs);
101  }

◆ operator=() [1/2]

FilterProperty& lsst::afw::image::FilterProperty::operator= ( FilterProperty &&  )
defaultnoexcept

◆ operator=() [2/2]

FilterProperty& lsst::afw::image::FilterProperty::operator= ( FilterProperty const &  )
default

◆ operator==()

bool lsst::afw::image::FilterProperty::operator== ( FilterProperty const &  rhs) const
noexcept

Return true iff two FilterProperties are identical.

Parameters
rhsObject to compare with this

Definition at line 87 of file Filter.cc.

87  {
88  return (_lambdaEff == rhs._lambdaEff);
89 }

◆ reset()

static void lsst::afw::image::FilterProperty::reset ( )
inlinestatic

Clear all definitions.

Definition at line 107 of file Filter.h.

107 { _initRegistry(); }

The documentation for this class was generated from the following files: