Coverage for python/lsst/obs/subaru/gen3/hsc/gen2convert.py : 80%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# This file is part of obs_subaru. # # Developed for the LSST Data Management System. # This product includes software developed by the LSST Project # (http://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
"""KeyHandler for HSC filter keys that should be mapped to AbstractFilters. """
physical = gen2id["filter"] m = FILTER_REGEX.match(physical) if m: return m.group(1).lower() return physical
# Add camera to Gen3 data ID if Gen2 contains "visit" or "ccd". # (Both rules will match, so we'll actually set camera in the same dict twice). camera="HSC", gen2keys=("visit",), consume=False) camera="HSC", gen2keys=("ccd",), consume=False)
# Copy Gen2 'visit' to Gen3 'exposure' for raw only. Also consume filter, # since that's implied by 'exposure' in Gen3. camera="HSC", datasetTypeName="raw", gen2keys=("visit",), consume=("visit", "filter"))
# Copy Gen2 'visit' to Gen3 'visit' otherwise. Also consume filter. consume=("visit", "filter"))
# Copy Gen2 'ccd' to Gen3 'sensor;
# Translate Gen2 `filter` to AbstractFilter if it hasn't been consumed yet and gen2keys includes tract. consume=("filter",))
# Add camera for HSC transmission curve datasets (transmission_sensor is # already handled by the above translators). camera="HSC", datasetTypeName="transmission_optics") camera="HSC", datasetTypeName="transmission_atmosphere") camera="HSC", datasetTypeName="transmission_filter") camera="HSC", datasetTypeName="transmission_filter")
# Add calibration mapping for filter for filter dependent types camera="HSC", datasetTypeName=calibType)
# Add calibration mapping for date ranges for all calibration types. camera="HSC", datasetTypeName=calibType) camera="HSC", datasetTypeName=calibType) |