diff --git a/python/lsst/obs/base/_instrument.py b/python/lsst/obs/base/_instrument.py index a143f923..f7cc5d9c 100644 --- a/python/lsst/obs/base/_instrument.py +++ b/python/lsst/obs/base/_instrument.py @@ -701,9 +701,9 @@ def loadCamera(butler: Butler, dataId: DataId, *, collections: Any = None) -> tu Data ID that identifies at least the ``instrument`` and ``exposure`` dimensions. collections : Any, optional - Collections to be searched, overriding ``self.butler.collections``. - Can be any of the types supported by the ``collections`` argument - to butler construction. + Collections to be searched, overriding + ``self.butler.collections.defaults``. Can be any of the types + supported by the ``collections`` argument to butler construction. Returns ------- @@ -722,7 +722,7 @@ def loadCamera(butler: Butler, dataId: DataId, *, collections: Any = None) -> tu Raised when ``dataId`` does not specify a valid data ID. """ if collections is None: - collections = list(butler.collections) + collections = list(butler.collections.defaults) # Registry would do data ID expansion internally if we didn't do it first, # but we might want an expanded data ID ourselves later, so we do it here # to ensure it only happens once. diff --git a/python/lsst/obs/base/defineVisits.py b/python/lsst/obs/base/defineVisits.py index 3e3def4d..fe864efd 100644 --- a/python/lsst/obs/base/defineVisits.py +++ b/python/lsst/obs/base/defineVisits.py @@ -357,7 +357,7 @@ def compute( Struct describing the visit and the exposures associated with it. collections : Any, optional Collections to be searched for raws and camera geometry, overriding - ``self.butler.collections``. + ``self.butler.collections.defaults``. Can be any of the types supported by the ``collections`` argument to butler construction. @@ -479,7 +479,7 @@ def _buildVisitRecords( constituent exposures. collections : Any, optional Collections to be searched for raws and camera geometry, overriding - ``self.butler.collections``. + ``self.butler.collections.defaults``. Can be any of the types supported by the ``collections`` argument to butler construction. @@ -637,7 +637,7 @@ def run( instrument, and are expected to be on-sky science exposures. collections : Any, optional Collections to be searched for raws and camera geometry, overriding - ``self.butler.collections``. + ``self.butler.collections.defaults``. Can be any of the types supported by the ``collections`` argument to butler construction. update_records : `bool`, optional @@ -1203,7 +1203,7 @@ def computeExposureBounds( Dimension record for the exposure. collections : Any, optional Collections to be searched for raws and camera geometry, overriding - ``self.butler.collections``. + ``self.butler.collections.defaults``. Can be any of the types supported by the ``collections`` argument to butler construction. @@ -1214,7 +1214,7 @@ def computeExposureBounds( sphere representing that detector's corners projected onto the sky. """ if collections is None: - collections = list(self.butler.collections) + collections = list(self.butler.collections.defaults) camera, versioned = loadCamera(self.butler, exposure.dataId, collections=collections) if not versioned and self.config.requireVersionedCamera: raise LookupError(f"No versioned camera found for exposure {exposure.dataId}.") diff --git a/tests/test_defineVisits.py b/tests/test_defineVisits.py index 9355358e..e4c4fa34 100644 --- a/tests/test_defineVisits.py +++ b/tests/test_defineVisits.py @@ -197,7 +197,7 @@ def testPickleTask(self): self.assertEqual(self.task.log.name, copy.log.name) self.assertEqual(self.task.config, copy.config) self.assertEqual(self.task.butler._config, copy.butler._config) - self.assertEqual(list(self.task.butler.collections), list(copy.butler.collections)) + self.assertEqual(list(self.task.butler.collections.defaults), list(copy.butler.collections.defaults)) self.assertEqual(self.task.butler.run, copy.butler.run) self.assertEqual(self.task.universe, copy.universe) diff --git a/tests/test_ingest.py b/tests/test_ingest.py index 089c0975..15df5c86 100644 --- a/tests/test_ingest.py +++ b/tests/test_ingest.py @@ -467,7 +467,7 @@ def testPickleTask(self): self.assertEqual(self.task.log.name, copy.log.name) self.assertEqual(self.task.config, copy.config) self.assertEqual(self.task.butler._config, copy.butler._config) - self.assertEqual(list(self.task.butler.collections), list(copy.butler.collections)) + self.assertEqual(list(self.task.butler.collections.defaults), list(copy.butler.collections.defaults)) self.assertEqual(self.task.butler.run, copy.butler.run) self.assertEqual(self.task.universe, copy.universe) self.assertEqual(self.task.datasetType, copy.datasetType)