Skip to content

Commit

Permalink
Define sdss65mm_filter set and add to filter and grating list to avoi…
Browse files Browse the repository at this point in the history
…d duplication errors.
  • Loading branch information
edennihy committed Oct 10, 2023
1 parent c7934e0 commit 1080ad2
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions python/lsst/obs/lsst/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,23 @@ def addFilter(filter_dict, band, physical_filter):

# LATISS filters include a grating in the name so we need to construct
# filters for each combination of filter+grating.

# This set of filters can be installed in either the grating or filter wheel,
# so we define them here to avoid duplication.
sdss65mm_filters = [FilterDefinition(physical_filter="SDSSu_65mm",
band="u"),
FilterDefinition(physical_filter="SDSSg_65mm",
band="g"),
FilterDefinition(physical_filter="SDSSr_65mm",
band="r"),
FilterDefinition(physical_filter="SDSSi_65mm",
band="i"),
FilterDefinition(physical_filter="SDSSz_65mm",
band="z"),
FilterDefinition(physical_filter="SDSSy_65mm",
band="y"),
]

_latiss_filters = (
FilterDefinition(physical_filter="empty",
band="white",
Expand Down Expand Up @@ -279,25 +296,15 @@ def addFilter(filter_dict, band, physical_filter):
band="r"),
FilterDefinition(physical_filter="SDSSi",
band="i"),
FilterDefinition(physical_filter="SDSSu_65mm",
band="u"),
FilterDefinition(physical_filter="SDSSg_65mm",
band="g"),
FilterDefinition(physical_filter="SDSSr_65mm",
band="r"),
FilterDefinition(physical_filter="SDSSi_65mm",
band="i"),
FilterDefinition(physical_filter="SDSSz_65mm",
band="z"),
FilterDefinition(physical_filter="SDSSy_65mm",
band="y"),
FilterDefinition(physical_filter="collimator",
band="white"),
FilterDefinition(physical_filter="cyl_lens",
band="white"),
*sdss65mm_filters,
)

# Form a new set of filter definitions from all the explicit gratings
# Form a new set of filter definitions from all the explicit gratings, and add
# sdss65mm_filter set.
_latiss_gratings = ("ronchi90lpmm",
"ronchi170lpmm",
"empty",
Expand Down Expand Up @@ -325,18 +332,7 @@ def addFilter(filter_dict, band, physical_filter):
"pinhole_2_4_0500",
"pinhole_2_4_0200",
"pinhole_2_4_0100",
FilterDefinition(physical_filter="SDSSu_65mm",
band="u"),
FilterDefinition(physical_filter="SDSSg_65mm",
band="g"),
FilterDefinition(physical_filter="SDSSr_65mm",
band="r"),
FilterDefinition(physical_filter="SDSSi_65mm",
band="i"),
FilterDefinition(physical_filter="SDSSz_65mm",
band="z"),
FilterDefinition(physical_filter="SDSSy_65mm",
band="y"),
*sdss65mm_filters,
)

# Include the filters without the grating in case someone wants
Expand Down

0 comments on commit 1080ad2

Please sign in to comment.