Skip to content

Commit

Permalink
Merge pull request #206 from lsst/tickets/DM-24664
Browse files Browse the repository at this point in the history
DM-24664: Refactor data ID translation rule system
  • Loading branch information
TallJimbo committed May 2, 2020
2 parents a6a6910 + 45aab2c commit 56b0ea1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/lsst/obs/lsst/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from lsst.daf.butler.core.utils import getFullTypeName
from lsst.utils import getPackageDir
from lsst.obs.base.instrument import Instrument
from lsst.obs.base.gen2to3 import TranslatorFactory
from .filters import LSSTCAM_FILTER_DEFINITIONS, LATISS_FILTER_DEFINITIONS

from .translators import LatissTranslator, LsstCamTranslator, \
Expand Down Expand Up @@ -151,6 +152,12 @@ def extractDetectorRecord(self, camGeomDetector):
raft=group,
)

def makeDataIdTranslatorFactory(self) -> TranslatorFactory:
# Docstring inherited from lsst.obs.base.Instrument.
factory = TranslatorFactory()
factory.addGenericInstrumentRules(self.getName(), detectorKey="detector", exposureKey="expId")
return factory


class LsstComCam(LsstCam):
"""Gen3 Butler specialization for ComCam data.
Expand Down

0 comments on commit 56b0ea1

Please sign in to comment.