Skip to content

Commit

Permalink
Add class name to instrument dimension definition
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Apr 8, 2020
1 parent 7b3444f commit 1ec897c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions config/dimensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ dimensions:
doc: >
Maximum value for the 'detector' field for detectors associated with
this instrument (exclusive).
-
name: class_name
type: string
length: 64
doc: >
Full class name of the Instrument class associated with this
instrument.
cached: true

abstract_filter:
Expand Down
3 changes: 2 additions & 1 deletion python/lsst/daf/butler/registry/tests/_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ def testDimensions(self):
registry = self.makeRegistry()
dimensionName = "instrument"
dimension = registry.dimensions[dimensionName]
dimensionValue = {"name": "DummyCam", "visit_max": 10, "exposure_max": 10, "detector_max": 2}
dimensionValue = {"name": "DummyCam", "visit_max": 10, "exposure_max": 10, "detector_max": 2,
"class_name": "lsst.obs.base.Instrument"}
registry.insertDimensionData(dimensionName, dimensionValue)
# Inserting the same value twice should fail
with self.assertRaises(sqlalchemy.exc.IntegrityError):
Expand Down
1 change: 1 addition & 0 deletions tests/data/registry/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ data:
visit_max: 1024
exposure_max: 512
detector_max: 4
class_name: lsst.obs.base.Instrument
-
type: dimension
element: physical_filter
Expand Down

0 comments on commit 1ec897c

Please sign in to comment.