Coverage for tests/test_ts8.py: 46%
37 statements
« prev ^ index » next coverage.py v7.4.4, created at 2024-04-23 02:29 -0700
« prev ^ index » next coverage.py v7.4.4, created at 2024-04-23 02:29 -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.utils.tests
26from lsst.geom import arcseconds, Extent2I
27import lsst.afw.image
29from lsst.obs.lsst.testHelper import ObsLsstButlerTests, ObsLsstObsBaseOverrides
30from lsst.obs.lsst import LsstTS8
33class TestTs8(ObsLsstObsBaseOverrides, ObsLsstButlerTests):
34 instrumentDir = "ts8"
36 @classmethod
37 def getInstrument(cls):
38 return LsstTS8()
40 def setUp(self):
41 dataIds = {'raw': {'exposure': 201807241028453, 'name_in_raft': 'S11', 'raft': 'RTM-010'},
42 'bias': {'name_in_raft': 'S11', 'raft': 'RTM-010',
43 'day_obs': 20180724, 'seq_num': 17},
44 'flat': unittest.SkipTest,
45 'dark': unittest.SkipTest
46 }
47 self.setUp_tests(self._butler, dataIds)
49 ccdExposureId_bits = 58
50 exposureIds = {'raw': 201807241028453067, 'bias': 201807241028453067}
51 filters = {'raw': 'z', 'bias': '_unknown_'}
52 exptimes = {'raw': 21.913, 'bias': 0}
53 detectorIds = {'raw': 67, 'bias': 67}
54 detector_names = {'raw': 'RTM-010_S11', 'bias': 'RTM-010_S11'}
55 detector_serials = {'raw': 'E2V-CCD250-179', 'bias': 'E2V-CCD250-179'}
56 dimensions = {'raw': Extent2I(4608, 4096),
57 'bias': Extent2I(4096, 4004)}
58 sky_origin = unittest.SkipTest
59 raw_subsets = (({}, 1),
60 ({'physical_filter': 'z'}, 1),
61 ({'physical_filter': 'foo'}, 0),
62 ({'exposure': 201807241028453}, 1),
63 ({'exposure': 201807241028454}, 0),
64 )
65 linearizer_type = unittest.SkipTest
66 self.setUp_butler_get(ccdExposureId_bits=ccdExposureId_bits,
67 exposureIds=exposureIds,
68 filters=filters,
69 exptimes=exptimes,
70 detectorIds=detectorIds,
71 detector_names=detector_names,
72 detector_serials=detector_serials,
73 dimensions=dimensions,
74 sky_origin=sky_origin,
75 raw_subsets=raw_subsets,
76 linearizer_type=linearizer_type
77 )
79 self.raw_filename = '201807241028453-RTM-010-S11-det067.fits'
81 self.setUp_camera(camera_name='LSST-TS8',
82 n_detectors=225,
83 first_detector_name='RTM-002_S00',
84 plate_scale=20.0 * arcseconds,
85 )
87 super().setUp()
90class MemoryTester(lsst.utils.tests.MemoryTestCase):
91 pass
94def setup_module(module):
95 lsst.utils.tests.init()
98if __name__ == '__main__': 98 ↛ 99line 98 didn't jump to line 99, because the condition on line 98 was never true
99 setup_module(sys.modules[__name__])
100 unittest.main()