Skip to content

Commit

Permalink
Use the new Instrument.from_string class method.
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Mar 22, 2022
1 parent 15c5924 commit 977e1c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/data/make_butler_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

import lsst.daf.butler
from lsst.daf.butler.script import ingest_files
import lsst.obs.base
import lsst.pipe.base

repopath = "cfht_minimal/repo"
instrument = "lsst.obs.cfht.MegaPrime"
lsst.daf.butler.Butler.makeRepo(repopath)
butler = lsst.daf.butler.Butler(repopath, writeable=True)
instrInstance = lsst.obs.base.utils.getInstrument(instrument)
instrInstance = lsst.pipe.base.Instrument.from_string(instrument)
instrInstance.register(butler.registry)

graph = butler.registry.dimensions.extract(["htm7"])
Expand Down
3 changes: 2 additions & 1 deletion tests/jointcalTestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from lsst.ctrl.mpexec import SimplePipelineExecutor
import lsst.daf.butler
from lsst.daf.butler.script import ingest_files
import lsst.pipe.base
import lsst.obs.base
import lsst.geom
from lsst.verify.bin.jobReporter import JobReporter
Expand Down Expand Up @@ -72,7 +73,7 @@ def importRepository(instrument, exportPath, exportFile, outputDir=None,
_ = lsst.daf.butler.Butler.makeRepo(repopath)
butler = lsst.daf.butler.Butler(repopath, writeable=True)

instrInstance = lsst.obs.base.utils.getInstrument(instrument)
instrInstance = lsst.pipe.base.utils.Instrument.from_string(instrument)
instrInstance.register(butler.registry)

# Register refcats first, so the `refcats` collection will exist.
Expand Down

0 comments on commit 977e1c2

Please sign in to comment.