Skip to content

Commit

Permalink
use CONTRLLR=S for simulated images; update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jchiang87 committed Feb 13, 2024
1 parent 2af05cd commit 7bec00d
Show file tree
Hide file tree
Showing 8 changed files with 84,942 additions and 14 deletions.
Binary file modified data/input/comCamSim/gen3.sqlite3
Binary file not shown.

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions python/lsst/obs/lsst/translators/lsst.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@
# Supported controller codes.
# The order here directly relates to the resulting exposure ID
# calculation. Do not reorder. Add new ones to the end.
# OCS, CCS, pHosim, P for simulated OCS, Q for simulated CCS.
CONTROLLERS = "OCHPQ"
# OCS, CCS, pHosim, P for simulated OCS, Q for simulated CCS, S for
# simulated images.
CONTROLLERS = "OCHPQS"

# Number of decimal digits allocated to the sequence number in exposure_ids.
_SEQNUM_MAXDIGITS = 5
Expand Down
1 change: 0 additions & 1 deletion tests/headers/comCamSim-IM_P_20240117_000000_R22_S00.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,3 @@ BP_2_1: 8.52141549526488e-13
BP_3_0: 1.85515988155434e-15
DATASEC: '[4:512,1:2000]'
DETSEC: '[509:1,4000:2001]'

8 changes: 4 additions & 4 deletions tests/test_comCamSim.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ def getInstrument(cls):
return LsstComCamSim()

def setUp(self):
dataIds = {'raw': {'exposure': 5024032100720, 'name_in_raft': 'S11', 'raft': 'R22'},
dataIds = {'raw': {'exposure': 7024032100720, 'name_in_raft': 'S11', 'raft': 'R22'},
'bias': unittest.SkipTest,
'flat': unittest.SkipTest,
'dark': unittest.SkipTest,
}
self.setUp_tests(self._butler, dataIds)

ccdExposureId_bits = 52
exposureIds = {'raw': 5024032100720000,
exposureIds = {'raw': 7024032100720000,
}
filters = {'raw': 'r_03',
}
Expand All @@ -65,7 +65,7 @@ def setUp(self):
raw_subsets = (({}, 1),
({'physical_filter': 'r_03'}, 1),
({'physical_filter': 'foo'}, 0),
({'exposure': 5024032100720}, 1),
({'exposure': 7024032100720}, 1),
)
linearizer_type = unittest.SkipTest
self.setUp_butler_get(ccdExposureId_bits=ccdExposureId_bits,
Expand All @@ -81,7 +81,7 @@ def setUp(self):
linearizer_type=linearizer_type
)

self.raw_filename = '5024032100720-R22-S11-det004.fits.fz'
self.raw_filename = '7024032100720-R22-S11-det004.fits.fz'

self.setUp_camera(camera_name='LSSTComCamSim',
n_detectors=9,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_gen3.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def testComCam(self):
self.checkInstrumentWithRegistry(LsstComCam, testFpath)

def testComCamSim(self):
testFpath = "comCamSim/raw/2024-03-21/5024032100720/5024032100720-R22-S11-det004.fits.fz"
testFpath = "comCamSim/raw/2024-03-21/7024032100720/7024032100720-R22-S11-det004.fits.fz"
self.checkInstrumentWithRegistry(LsstComCamSim, testFpath)

def testImSim(self):
Expand Down
8 changes: 4 additions & 4 deletions tests/test_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ class ComCamSimIngestTestCase(IngestTestBase, lsst.utils.tests.TestCase):
instrumentClassName = "lsst.obs.lsst.LsstComCamSim"
ingestDir = TESTDIR
file = os.path.join(DATAROOT, "comCamSim", "raw", "2024-03-21",
"5024032100720", "5024032100720-R22-S11-det004.fits.fz")
dataIds = [dict(instrument="LSSTComCamSim", exposure=5024032100720, detector=4)]
"7024032100720", "7024032100720-R22-S11-det004.fits.fz")
dataIds = [dict(instrument="LSSTComCamSim", exposure=7024032100720, detector=4)]
filterLabel = lsst.afw.image.FilterLabel(physical="r_03", band="r")

@property
Expand All @@ -136,12 +136,12 @@ def visits(self):
return {
DataCoordinate.standardize(
instrument="LSSTComCamSim",
visit=5024032100720,
visit=7024032100720,
universe=butler.dimensions
): [
DataCoordinate.standardize(
instrument="LSSTComCamSim",
exposure=5024032100720,
exposure=7024032100720,
universe=butler.dimensions
)
]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_packer.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,11 @@ def test_comCamSim(self):
self.check_rubin_dimension_packer(
instrument,
is_exposure=False,
exposure_id=5024032100720,
exposure_id=7024032100720,
day_obs=20240321,
seq_num=720,
detector=4,
controller="P"
controller="S"
)

def test_imsim(self):
Expand Down

0 comments on commit 7bec00d

Please sign in to comment.