Coverage for tests/test_latiss.py: 48%
38 statements
« prev ^ index » next coverage.py v7.5.1, created at 2024-05-12 02:12 -0700
« prev ^ index » next coverage.py v7.5.1, created at 2024-05-12 02:12 -0700
1# This file is part of obs_lsst.
2#
3# Developed for the LSST Data Management System.
4# This product includes software developed by the LSST Project
5# (http://www.lsst.org).
6# See the COPYRIGHT file at the top-level directory of this distribution
7# for details of code ownership.
8#
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation, either version 3 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program. If not, see <http://www.gnu.org/licenses/>.
21#
22import sys
23import unittest
25import lsst.log
26import lsst.utils.tests
27from lsst.geom import arcseconds, Extent2I
28import lsst.afw.image
30from lsst.obs.lsst.testHelper import ObsLsstButlerTests, ObsLsstObsBaseOverrides
31from lsst.obs.lsst import Latiss
34class TestLatiss(ObsLsstObsBaseOverrides, ObsLsstButlerTests):
35 instrumentDir = "latiss"
37 @classmethod
38 def getInstrument(cls):
39 return Latiss()
41 def setUp(self):
42 dataIds = {'raw': {'exposure': 3018092000065, 'detector': 0},
43 'bias': {'detector': 0, 'exposure': 3018092000065},
44 'flat': unittest.SkipTest,
45 'dark': unittest.SkipTest
46 }
47 self.setUp_tests(self._butler, dataIds)
49 ccdExposureId_bits = 52
50 exposureIds = {'raw': 3018092000065, 'bias': 3018092000065}
51 filters = {'raw': 'unknown~unknown', 'bias': '_unknown_'}
52 exptimes = {'raw': 27.0, 'bias': 0}
53 detectorIds = {'raw': 0, 'bias': 0}
54 detector_names = {'raw': 'RXX_S00', 'bias': 'RXX_S00'}
55 detector_serials = {'raw': 'ITL-3800C-068', 'bias': 'ITL-3800C-098'}
56 dimensions = {'raw': Extent2I(4608, 4096),
57 'bias': Extent2I(4072, 4000)}
58 sky_origin = unittest.SkipTest
59 raw_subsets = (({}, 1),
60 ({'physical_filter': 'unknown~unknown'}, 1),
61 ({'physical_filter': 'SDSSg'}, 0),
62 ({'exposure.day_obs': 20180920}, 1),
63 ({'exposure': 3018092000065}, 1),
64 ({'exposure': 9999999999999}, 0),
65 )
66 linearizer_type = unittest.SkipTest
67 self.setUp_butler_get(ccdExposureId_bits=ccdExposureId_bits,
68 exposureIds=exposureIds,
69 filters=filters,
70 exptimes=exptimes,
71 detectorIds=detectorIds,
72 detector_names=detector_names,
73 detector_serials=detector_serials,
74 dimensions=dimensions,
75 sky_origin=sky_origin,
76 raw_subsets=raw_subsets,
77 linearizer_type=linearizer_type
78 )
80 self.raw_filename = '3018092000065-det000.fits'
82 self.setUp_camera(camera_name='LATISS',
83 n_detectors=1,
84 first_detector_name='RXX_S00',
85 plate_scale=9.5695 * arcseconds,
86 )
88 super().setUp()
91class MemoryTester(lsst.utils.tests.MemoryTestCase):
92 pass
95def setup_module(module):
96 lsst.utils.tests.init()
99if __name__ == '__main__': 99 ↛ 100line 99 didn't jump to line 100, because the condition on line 99 was never true
100 setup_module(sys.modules[__name__])
101 unittest.main()