DummyCam#
- class lsst.obs.base.instrument_tests.DummyCam(collection_prefix: str | None = None)#
Bases:
InstrumentInstrument class used for testing.
Attributes Summary
Curated dataset types specific to this particular instrument that do not follow the standard organization found in obs data packages.
Instrument specific name to use when locating a policy or configuration file in the file system.
Dataset type definition to use for "raw" datasets.
Methods Summary
applyConfigOverrides(name, config)Apply instrument-specific overrides for a task config.
Retrieve the cameraGeom representation of this instrument.
getName()Return the short (dimension) name for this instrument.
Return the root of the obs data package that provides specializations for this instrument.
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
writeAdditionalCuratedCalibrationsin addition to the calibrations found in obs data packages that follow the standard scheme. (setofstr)
- 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
Nonethe 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#
- name
str Name of the object being configured; typically the _DefaultName of a Task.
- config
lsst.pex.config.Config Config instance to which overrides should be applied.
- name
- getCamera() lsst.afw.cameraGeom.Camera#
Retrieve the cameraGeom representation of this instrument.
This is a temporary API that should go away once
obspackages 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#
- dir
strorNone The root of the relevant obs data package, or
Noneif this instrument does not have one.
Notes#
This is a less portable version of
getObsDataPackageRoot. Please use that method in new code.- dir
- classmethod getObsDataPackageRoot() ResourcePath | None#
Return the root of the obs data package that provides specializations for this instrument.
Returns#
- dir
lsst.resources.ResourcePathorNone The root URI of the file resources of the relevant obs data package, or
Noneif this instrument does not have one.
- dir
- getRawFormatter(dataId: DataId) type[Formatter | FormatterV2]#
Return the Formatter class that should be used to read a particular raw file.
Parameters#
- dataId
lsst.daf.butler.DataId Dimension-based ID for the raw file or files being ingested.
Returns#
- formatter
type[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.
- dataId
- 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#
- butler
lsst.daf.butler.Butler Butler to use to store these calibrations.
- collection
str, 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
CALIBRATIONcollection, and it must not have any datasets that would conflict with those inserted by this method. IfNone, a collection name is worked out automatically from the instrument name and other metadata by callingmakeCalibrationCollectionName, but this default name may not work well for long-lived repositories unlesslabelsis also provided (and changed every time curated calibrations are ingested).- labels
collections.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
RUNcollections that datasets are inserted directly into, as well theCALIBRATIONcollection if it is generated automatically (i.e. ifcollection is None). Usually this is just the name of the ticket on which the calibration collection is being created.
- butler