FilterDefinitionCollection¶
-
class
lsst.obs.base.
FilterDefinitionCollection
(*filters)¶ Bases:
collections.abc.Sequence
,typing.Generic
An order-preserving collection of multiple
FilterDefinition
.Parameters: - filters :
Sequence
The filters in this collection.
Methods Summary
count
(value)defineFilters
()Define all the filters to lsst.afw.image.Filter
.findAll
(name)Return the FilterDefinitions that match a particular name. index
(value, [start, [stop]])Raises ValueError if the value is not present. reset
()Reset the afw Filter definitions and clear the defined
singleton.Methods Documentation
-
count
(value) → integer -- return number of occurrences of value¶
-
defineFilters
() → None¶ Define all the filters to
lsst.afw.image.Filter
.Filter
objects are singletons, so we protect against filters being defined multiple times.Raises: - RuntimeError
Raised if any other
FilterDefinitionCollection
has already calleddefineFilters
.
-
findAll
(name: str) → Set[lsst.obs.base.filters.FilterDefinition]¶ Return the FilterDefinitions that match a particular name.
This method makes no attempt to prioritize, e.g., band names over physical filter names; any definition that makes any reference to the name is returned.
Parameters: - name :
str
The name to search for. May be any band, physical, or alias name.
Returns: - matches :
set
[FilterDefinition
] All FilterDefinitions containing
name
as one of their filter names.
- name :
-
index
(value[, start[, stop]]) → integer -- return first index of value.¶ Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
-
classmethod
reset
() → None¶ Reset the afw Filter definitions and clear the
defined
singleton. Use this in unittests that define different filters.
- filters :