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