Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: afw
-
Labels:
-
Story Points:1
-
Epic Link:
-
Sprint:AP S21-1 (December)
-
Team:Alert Production
-
Urgent?:No
Description
Before the introduction of FilterLabel in DM-27169, every ExposureInfo had a Filter, which may have been the "default" filter ("_unknown_", -1). Some downstream code in obs_base took advantage of this behavior to pass invalid filters unconditionally to Exposure.setFilter.
The implementation of FilterLabel in ExposureInfo allows an exposure to not have any filter information, and this representation should be preferred over FilterLabel(physical="_unknown_"). While there is a check to prevent this in the ExposureInfo constructor, setFilter assumes that any Filter passed to it must be valid. Rewrite the checks so that it is impossible to convert the default Filter into a FilterLabel.
One question about whether this and how this might be testable, but I think you're good to merge.