Coverage for python/lsst/obs/subaru/gen3/hsc/gen2to3.py : 93%

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. """
if d.physical_filter is not None}
physical = gen2id["filter"] return self._map.get(physical, physical)
# Add instrument to Gen3 data ID if Gen2 contains "visit" or "ccd". # (Both rules will match, so we'll actually set instrument in the same dict twice). instrument="HSC", gen2keys=("visit",), consume=False) instrument="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. instrument="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 'detector;
# Translate Gen2 `filter` to AbstractFilter if it hasn't been consumed yet and gen2keys includes tract. consume=("filter",))
# Add instrument for HSC transmission curve datasets (transmission_sensor is # already handled by the above translators). instrument="HSC", datasetTypeName="transmission_optics") instrument="HSC", datasetTypeName="transmission_atmosphere") instrument="HSC", datasetTypeName="transmission_filter") instrument="HSC", datasetTypeName="transmission_filter")
# Add calibration mapping for filter for filter dependent types instrument="HSC", datasetTypeName=calibType) |