Coverage for tests/test_ingest.py : 53%

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_decam. # # 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/>.
"""
self.ingestDir = os.path.dirname(__file__) self.instrument = lsst.obs.decam.DarkEnergyCamera() # DecamRawIngestTask ingests every detector in each raw file, so we # only have to specify one file here, but should get two dataIds # in the output repo. self.file = os.path.join(testDataDirectory, "rawData", "raw", "raw.fits") self.dataIds = [dict(instrument="DECam", exposure=229388, detector=25), dict(instrument="DECam", exposure=229388, detector=1)] self.RawIngestTask = lsst.obs.decam.DecamRawIngestTask
super().setUp()
"""Test ingesting a file that contains all "normal" DECam HDUs. """ self.ingestDir = os.path.dirname(__file__) self.instrument = lsst.obs.decam.DarkEnergyCamera() # DecamRawIngestTask ingests every detector in each raw file, so we # only have to specify one file here, but should get many dataIds # in the output repo. self.file = os.path.join(testDataDirectory, "rawData", "raw", "c4d_150227_012718_ori-stripped.fits.fz") self.dataIds = [{"instrument": "DECam", "exposure": 415282, "detector": i} for i in range(1, 63)] self.RawIngestTask = lsst.obs.decam.DecamRawIngestTask
super().setUp()
"""Test ingesting a file that contains all detectors in a random order. """ self.ingestDir = os.path.dirname(__file__) self.instrument = lsst.obs.decam.DarkEnergyCamera() # DecamRawIngestTask ingests every detector in each raw file, so we # only have to specify one file here, but should get many dataIds # in the output repo. self.file = os.path.join(testDataDirectory, "rawData", "raw", "c4d_150227_012718_ori-stripped-shuffled.fits.fz") self.dataIds = [{"instrument": "DECam", "exposure": 415282, "detector": i} for i in range(1, 63)] self.RawIngestTask = lsst.obs.decam.DecamRawIngestTask
super().setUp()
lsst.utils.tests.init()
lsst.utils.tests.init() unittest.main() |