Coverage for python/lsst/obs/lsst/ucd.py : 52%

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_lsst. # # 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 LSST License Statement and # the GNU General Public License along with this program. If not, # see <http://www.lsstcorp.org/LegalNotices/>. #
"""Make a VisitInfo from the FITS header of a raw image."""
"""The Mapper for the UCDavis camera."""
list(AuxTelMapper.yamlFileList) + list(LsstCamMapper.yamlFileList)
if 'detectorName' in dataId: detectorName = dataId['detectorName'] else: detectorName = LsstUCDCamTranslator.DETECTOR_NAME if 'raftName' in dataId: raftName = dataId['raftName'] else: raftName = LsstUCDCamTranslator.compute_detector_group_from_num(dataId['detector']) return f"{raftName}_{detectorName}"
"""Parser suitable for UCD data.
We need this to parse the UC Davis headers. """
"""Translate the sequence number
Sometimes this is present, sometimes it is not. When it is, return it as an int. When it's not, provide a default value of 0 as an int. This function exists because currently the Gen2 butler's default value providing pathway has trouble with types.
Parameters ---------- md : `~lsst.daf.base.PropertyList` or `~lsst.daf.base.PropertySet` Image metadata.
Returns ------- seqNum : `int` The seqNum, with a default value of 0 if required """ try: seqNum = int(md.getScalar("SEQNUM")) except KeyError: seqNum = 0 return seqNum |