Skip to content

Commit

Permalink
Merge pull request #136 from lsst/tickets/DM-23976
Browse files Browse the repository at this point in the history
DM-23976: Implement gen3 instrument writeCuratedCalibrations
  • Loading branch information
timj committed Mar 31, 2020
2 parents 4648504 + 3f76b48 commit 13f9125
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 3 additions & 5 deletions python/lsst/obs/decam/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

class DarkEnergyCamera(Instrument):
filterDefinitions = DECAM_FILTER_DEFINITIONS
policyName = "decam"
obsDataPackage = "obs_decam_data"

def __init__(self, **kwargs):
super().__init__(**kwargs)
Expand All @@ -46,7 +48,7 @@ def getName(cls):
return "DECam"

def getCamera(self):
path = os.path.join(getPackageDir("obs_decam"), "decam", "camGeom")
path = os.path.join(getPackageDir("obs_decam"), self.policyName, "camGeom")
config = CameraConfig()
config.load(os.path.join(path, "camera.py"))
return makeCameraFromPath(
Expand Down Expand Up @@ -82,7 +84,3 @@ def getRawFormatter(self, dataId):
# local import to prevent circular dependency
from .rawFormatter import DarkEnergyCameraRawFormatter
return DarkEnergyCameraRawFormatter

def writeCuratedCalibrations(self, butler):
# TODO: DM-21016
pass
8 changes: 8 additions & 0 deletions tests/test_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

@unittest.skipIf(testDataDirectory is None, "testdata_decam must be set up")
class DecamIngestTestCase(IngestTestBase, lsst.utils.tests.TestCase):
curatedCalibrationDatasetTypes = ("camera", "defects")

def setUp(self):
self.ingestDir = os.path.dirname(__file__)
self.instrument = lsst.obs.decam.DarkEnergyCamera()
Expand All @@ -56,6 +58,9 @@ def setUp(self):
class DecamIngestFullFileTestCase(IngestTestBase, lsst.utils.tests.TestCase):
"""Test ingesting a file that contains all "normal" DECam HDUs.
"""
# No need to test writeCuratedCalibrations again
curatedCalibrationDatasetTypes = None

def setUp(self):
self.ingestDir = os.path.dirname(__file__)
self.instrument = lsst.obs.decam.DarkEnergyCamera()
Expand All @@ -74,6 +79,9 @@ def setUp(self):
class DecamIngestShuffledFullFileTestCase(IngestTestBase, lsst.utils.tests.TestCase):
"""Test ingesting a file that contains all detectors in a random order.
"""
# No need to test writeCuratedCalibrations again
curatedCalibrationDatasetTypes = None

def setUp(self):
self.ingestDir = os.path.dirname(__file__)
self.instrument = lsst.obs.decam.DarkEnergyCamera()
Expand Down

0 comments on commit 13f9125

Please sign in to comment.