32 #ifndef LSST_AFW_IMAGE_FILTER_H 33 #define LSST_AFW_IMAGE_FILTER_H 37 #include <unordered_map> 54 double lambdaMax = NAN,
bool force =
false)
55 : _name(name), _lambdaEff(lambdaEff), _lambdaMin(lambdaMin), _lambdaMax(lambdaMax) {
100 return !(*
this == rhs);
107 static void reset() { _initRegistry(); }
122 static void _initRegistry();
128 void _insert(
bool force =
false);
135 static PropertyMap* _propertyMap;
150 bool const force =
false 152 : _id(_lookup(name, force)), _name(name) {}
158 : _id(
id), _name(_lookup(
id)) {}
171 ~
Filter() noexcept =
default;
185 int getId() const noexcept {
return _id; }
210 static void reset() { _initRegistry(); }
218 static int define(
FilterProperty const& filterProperty,
int id = AUTO,
bool force =
false);
241 static void _initRegistry();
258 static AliasMap* _aliasMap;
259 static IdMap* _idMap;
260 static NameMap* _nameMap;
292 #endif // LSST_AFW_IMAGE_FILTER_H std::string const & getCanonicalName() const
Return a filter's canonical name.
static void reset()
Clear all definitions.
std::string const & getName() const noexcept
Return a filter's name.
int stripFilterKeywords(std::shared_ptr< lsst::daf::base::PropertySet > metadata)
Remove Filter-related keywords from the metadata.
size_t operator()(argument_type const &obj) const noexcept
static FilterProperty const & lookup(std::string const &name)
Lookup the properties of a filter "name".
A base class for image defects.
int getId() const noexcept
Return a Filter's integral id.
bool operator==(FilterProperty const &rhs) const noexcept
Return true iff two FilterProperties are identical.
FilterProperty & operator=(FilterProperty const &)=default
double getLambdaMax() const noexcept
Return the filter's maximum wavelength (nm) where the transmission is above 1% of the maximum...
Holds an integer identifier for an LSST filter.
~FilterProperty() noexcept=default
bool operator!=(FilterProperty const &rhs) const noexcept
Return true iff rhs != this.
size_t operator()(argument_type const &obj) const noexcept
double getLambdaEff() const noexcept
Return the filter's effective wavelength (nm)
Filter(int id=UNKNOWN)
Creates a Filter with the given identifier.
Filter(std::string const &name, bool const force=false)
Creates a Filter with the given name.
bool operator!=(Filter const &rhs) const noexcept
Describe the properties of a Filter (e.g.
FilterProperty(std::string const &name, double lambdaEff, double lambdaMin=NAN, double lambdaMax=NAN, bool force=false)
static void reset()
Clear all definitions.
std::string const & getName() const noexcept
Return a Filter's name.
double getLambdaMin() const noexcept
Return the filter's minimum wavelength (nm) where the transmission is above 1% of the maximum...
std::size_t hash_value() const noexcept
Return a hash of this object.