Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-35035: Remove gen2to3 code from instrument class #104

Merged
merged 1 commit into from
Jul 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 0 additions & 14 deletions python/lsst/obs/cfht/_instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

from lsst.afw.cameraGeom import makeCameraFromPath, CameraConfig
from lsst.obs.base import Instrument, VisitSystem
from lsst.obs.base.gen2to3 import TranslatorFactory, BandToPhysicalFilterKeyHandler
from .cfhtFilters import MEGAPRIME_FILTER_DEFINITIONS

from lsst.utils.introspection import get_full_type_name
Expand Down Expand Up @@ -102,16 +101,3 @@ def getRawFormatter(self, dataId):
# local import to prevent circular dependency
from .rawFormatter import MegaPrimeRawFormatter
return MegaPrimeRawFormatter

def makeDataIdTranslatorFactory(self) -> TranslatorFactory:
# Docstring inherited from lsst.obs.base.Instrument.
factory = TranslatorFactory()
factory.addGenericInstrumentRules(self.getName(), calibFilterType="band")

# calibRegistry entries are bands, but we need
# physical_filter in the gen3 registry.
factory.addRule(BandToPhysicalFilterKeyHandler(self.filterDefinitions),
instrument=self.getName(),
gen2keys=("filter",),
consume=("filter",))
return factory