Coverage for tests/test_ts3.py: 46%
37 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-07-21 11:55 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-07-21 11:55 +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 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 LsstTS3
33class TestTs3(ObsLsstObsBaseOverrides, ObsLsstButlerTests):
34 instrumentDir = "ts3"
36 @classmethod
37 def getInstrument(cls):
38 return LsstTS3()
40 def setUp(self):
41 dataIds = {'raw': {'exposure': 201607220607067, 'name_in_raft': 'S00', 'raft': 'R071'},
42 'bias': unittest.SkipTest,
43 'flat': unittest.SkipTest,
44 'dark': unittest.SkipTest
45 }
46 self.setUp_tests(self._butler, dataIds)
48 ccdExposureId_bits = 58
49 exposureIds = {'raw': 201607220607067071}
50 filters = {'raw': '550CutOn'}
51 exptimes = {'raw': 30.611}
52 detectorIds = {'raw': 71}
53 detector_names = {'raw': 'R071_S00'}
54 detector_serials = {'raw': 'ITL-3800C-098'}
55 dimensions = {'raw': Extent2I(4352, 4096),
56 }
57 sky_origin = unittest.SkipTest
58 raw_subsets = (({}, 2),
59 ({'physical_filter': '550CutOn'}, 2),
60 ({'detector': 71}, 1),
61 ({'detector.raft': 'R433'}, 1),
62 ({'detector.raft': 'R999'}, 0),
63 ({'exposure': 201607220607067}, 1),
64 ({'exposure': 201607220607068}, 0),
65 ({'physical_filter': '550CutOn'}, 2),
66 ({'physical_filter': 'foo'}, 0)
67 )
68 linearizer_type = unittest.SkipTest
69 self.setUp_butler_get(ccdExposureId_bits=ccdExposureId_bits,
70 exposureIds=exposureIds,
71 filters=filters,
72 exptimes=exptimes,
73 detectorIds=detectorIds,
74 detector_names=detector_names,
75 detector_serials=detector_serials,
76 dimensions=dimensions,
77 sky_origin=sky_origin,
78 raw_subsets=raw_subsets,
79 linearizer_type=linearizer_type
80 )
82 self.raw_filename = '201607220607067-R071-S00-det071.fits'
84 self.setUp_camera(camera_name='LSST-TS3',
85 n_detectors=435,
86 first_detector_name='R000_S00',
87 plate_scale=20.0 * arcseconds,
88 )
90 super().setUp()
93class MemoryTester(lsst.utils.tests.MemoryTestCase):
94 pass
97def setup_module(module):
98 lsst.utils.tests.init()
101if __name__ == '__main__': 101 ↛ 102line 101 didn't jump to line 102, because the condition on line 101 was never true
102 setup_module(sys.modules[__name__])
103 unittest.main()