Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-28460: Normalize empty and unknown filters #340

Merged
merged 2 commits into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions python/lsst/obs/hsc/hscFilters.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@
# least some object IDs (e.g. on coadds) and changing the order will
# invalidate old objIDs
HSC_FILTER_DEFINITIONS = FilterDefinitionCollection(
FilterDefinition(band="UNRECOGNISED", physical_filter="NONE", lambdaEff=0,
alias=["NONE", "None", "Unrecognised", "UNRECOGNISED",
FilterDefinition(band="unknown", physical_filter="unknown", lambdaEff=0,
alias=["UNKNOWN", "Unrecognised", "UNRECOGNISED",
"Unrecognized", "UNRECOGNIZED", "NOTSET"]),
FilterDefinition(band="white", physical_filter="empty", lambdaEff=0,
alias=["NONE"]),
FilterDefinition(physical_filter="HSC-G",
band="g",
lambdaEff=477, alias={'W-S-G+'}),
Expand All @@ -42,7 +44,7 @@
doc="Original r-band filter, replaced in July 2016 with HSC-R2.",
lambdaEff=623, alias={'W-S-R+'}),
FilterDefinition(physical_filter="ENG-R1",
band="r1",
band="r",
doc="A filter used during early camera construction;"
"very little data was taken with this filter.",
lambdaEff=623, alias={'109'}),
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/obs/hsc/hscMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __init__(self, **kwargs):
warnings.simplefilter('ignore', category=FutureWarning)
for filt in HSC_FILTER_DEFINITIONS:
self.filters[filt.physical_filter] = afwImage.Filter(filt.physical_filter).getCanonicalName()
self.defaultFilterName = "UNRECOGNISED"
self.defaultFilterName = "unknown"

#
# The number of bits allocated for fields in object IDs, appropriate
Expand Down
2 changes: 1 addition & 1 deletion tests/test_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def testFilters(self):
FilterName(alias="HSC-I", canonical="i"),
FilterName(alias="HSC-Z", canonical="z"),
FilterName(alias="HSC-Y", canonical="y"),
FilterName(alias="NONE", canonical="UNRECOGNISED")
FilterName(alias="unknown", canonical="unknown")
)

for filterName in filterNames:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def setUp(self):
"NB1010",
"SH",
"PH",
"NONE"}
"empty"}
self.data = InstrumentTestData(name="HSC",
nDetectors=112,
firstDetectorName="1_53",
Expand Down