DummyCam#

class lsst.obs.base.instrument_tests.DummyCam(collection_prefix: str | None = None)#

Bases: Instrument

Instrument class used for testing.

Attributes Summary

additionalCuratedDatasetTypes

Curated dataset types specific to this particular instrument that do not follow the standard organization found in obs data packages.

dataPackageDir

filterDefinitions

policyName

Instrument specific name to use when locating a policy or configuration file in the file system.

raw_definition

Dataset type definition to use for "raw" datasets.

Methods Summary

applyConfigOverrides(name, config)

Apply instrument-specific overrides for a task config.

getCamera()

Retrieve the cameraGeom representation of this instrument.

getName()

Return the short (dimension) name for this instrument.

getObsDataPackageDir()

Return the root of the obs data package that provides specializations for this instrument.

getObsDataPackageRoot()

Return the root of the obs data package that provides specializations for this instrument.

getRawFormatter(dataId)

Return the Formatter class that should be used to read a particular raw file.

register(registry, *[, update])

Insert Instrument, physical_filter, and detector entries into a Registry.

writeAdditionalCuratedCalibrations(butler[, ...])

Write additional curated calibrations that might be instrument specific and are not part of the standard set.

Attributes Documentation

additionalCuratedDatasetTypes: Set[str] = frozenset({'testCalib'})#

Curated dataset types specific to this particular instrument that do not follow the standard organization found in obs data packages.

These are the instrument-specific dataset types written by writeAdditionalCuratedCalibrations in addition to the calibrations found in obs data packages that follow the standard scheme. (set of str)

dataPackageDir: str | None = ''#
filterDefinitions: FilterDefinitionCollection = <lsst.obs.base.filters.FilterDefinitionCollection object>#
policyName: str | None = 'dummycam'#

Instrument specific name to use when locating a policy or configuration file in the file system.

raw_definition: tuple[str, tuple[str, ...], str] | None = ('raw_dict', ('instrument', 'detector', 'exposure'), 'StructuredDataDict')#

Dataset type definition to use for “raw” datasets. This is a tuple of the dataset type name, a tuple of dimension names, and the storage class name. If None the ingest system will use its default definition.

Methods Documentation

applyConfigOverrides(name: str, config: lsst.pex.config.Config) None#

Apply instrument-specific overrides for a task config.

Parameters#

namestr

Name of the object being configured; typically the _DefaultName of a Task.

configlsst.pex.config.Config

Config instance to which overrides should be applied.

getCamera() lsst.afw.cameraGeom.Camera#

Retrieve the cameraGeom representation of this instrument.

This is a temporary API that should go away once obs packages have a standardized approach to writing versioned cameras to a Gen3 repo.

classmethod getName() str#

Return the short (dimension) name for this instrument.

This is not (in general) the same as the class name - it’s what is used as the value of the “instrument” field in data IDs, and is usually an abbreviation of the full name.

classmethod getObsDataPackageDir() str | None#

Return the root of the obs data package that provides specializations for this instrument.

Returns#

dirstr or None

The root of the relevant obs data package, or None if this instrument does not have one.

Notes#

This is a less portable version of getObsDataPackageRoot. Please use that method in new code.

classmethod getObsDataPackageRoot() ResourcePath | None#

Return the root of the obs data package that provides specializations for this instrument.

Returns#

dirlsst.resources.ResourcePath or None

The root URI of the file resources of the relevant obs data package, or None if this instrument does not have one.

getRawFormatter(dataId: DataId) type[Formatter | FormatterV2]#

Return the Formatter class that should be used to read a particular raw file.

Parameters#

dataIdlsst.daf.butler.DataId

Dimension-based ID for the raw file or files being ingested.

Returns#

formattertype [lsst.daf.butler.Formatter | lsst.daf.butler.FormatterV2 ]

Class to be used that reads the file into the correct Python object for the raw data.

register(registry: Registry, *, update: bool = False) None#

Insert Instrument, physical_filter, and detector entries into a Registry.

writeAdditionalCuratedCalibrations(butler: Butler, collection: str | None = None, labels: Sequence[str] = ()) None#

Write additional curated calibrations that might be instrument specific and are not part of the standard set.

Default implementation does nothing.

Parameters#

butlerlsst.daf.butler.Butler

Butler to use to store these calibrations.

collectionstr, optional

Name to use for the calibration collection that associates all datasets with a validity range. If this collection already exists, it must be a CALIBRATION collection, and it must not have any datasets that would conflict with those inserted by this method. If None, a collection name is worked out automatically from the instrument name and other metadata by calling makeCalibrationCollectionName, but this default name may not work well for long-lived repositories unless labels is also provided (and changed every time curated calibrations are ingested).

labelscollections.abc.Sequence [ str ], optional

Extra strings to include in collection names, after concatenating them with the standard collection name delimiter. If provided, these are inserted into the names of the RUN collections that datasets are inserted directly into, as well the CALIBRATION collection if it is generated automatically (i.e. if collection is None). Usually this is just the name of the ticket on which the calibration collection is being created.