lsst.obs.base¶
The lsst.obs.base module provides the framework and common API for telescope/camera specific “obs” packages.
New cameras will derive from the classes defined here.
lsst.obs.base.tests provides the tests that all “obs” packages should pass.
Contributing¶
lsst.obs.base is developed at https://github.com/lsst/obs_base.
You can find Jira issues for this module under the obs_base component.
Command Line Scripts¶
convert_gen2_repo_to_gen3.py¶
Convert a gen2 butler repo to gen 3. See
lsst.obs.base.ConvertRepoConfig for most of the config options.
usage: convert_gen2_repo_to_gen3.py [-h] --gen2root GEN2ROOT --gen3root
                                    GEN3ROOT [--skymapName SKYMAPNAME]
                                    [--skymapConfig SKYMAPCONFIG]
                                    [--calibs CALIBS]
                                    [--reruns [RERUNS [RERUNS ...]]]
                                    [--transferMode {auto,link,symlink,hardlink,copy,move,relsymlink}]
                                    [-v] [-c CONFIG]
                                    lsst.obs.CAMERA.INSTRUMENT
positional arguments¶
- 
lsst.obs.camera.instrument¶ The full import path to the gen3 Instrument class for this camera (e.g. lsst.obs.decam.DarkEnergyCamera).
optional arguments¶
- 
-h,--help¶ show this help message and exit
- 
--gen2root<gen2root>¶ Root path of the gen 2 repo to be converted.
- 
--gen3root<gen3root>¶ Root path of the gen 3 repo to be produced.
- 
--skymapName<skymapname>¶ Name of the new gen3 skymap (e.g. ‘discrete/ci_hsc’).
- 
--skymapConfig<skymapconfig>¶ Path to skymap config file defining the new gen3 skymap.
- 
--calibs<calibs>¶ Path to the gen 2 calibration repo; absolute, or relative to gen2root.
- 
--reruns<reruns>¶ List of gen 2 reruns to convert.
- 
--transferMode{auto,link,symlink,hardlink,copy,move,relsymlink}¶ Mode to use to transfer files into the new repository.
- 
-v,--verbose¶ Set the log level to DEBUG.
- 
-c<config>,--config<config>¶ Path to a
ConvertRepoConfigoverride to be included after the Instrument config overrides are applied.
Python API reference¶
lsst.obs.base Package¶
Functions¶
addUnboundedCalibrationLabel(registry, …) | 
Add a special ‘unbounded’ calibration_label dimension entry for the given camera that is valid for any exposure. | 
bboxFromIraf(irafBBoxStr) | 
Return a Box2I corresponding to an IRAF-style BBOX | 
createInitialSkyWcs(visitInfo, detector[, flipX]) | 
Create a SkyWcs from the telescope boresight and detector geometry. | 
exposureFromImage(image[, dataId, mapper, …]) | 
Generate an Exposure from an image-like object | 
loadCamera(butler, dataId, Mapping[str, …) | 
Attempt to load versioned camera geometry from a butler, but fall back to obtaining a nominal camera from the Instrument class if that fails. | 
makeExposureRecordFromObsInfo(obsInfo, universe) | 
Construct an exposure DimensionRecord from astro_metadata_translator.ObservationInfo. | 
makeTransferChoiceField([doc, default]) | 
Create a Config field with options for how to transfer files between data repositories. | 
Classes¶
CalibrationMapping(datasetType, policy, …) | 
CalibrationMapping is a Mapping subclass for calibration-type products. | 
CameraMapper(policy, repositoryDir[, root, …]) | 
CameraMapper is a base class for mappers that handle images from a camera and products derived from them. | 
DatasetMapping(datasetType, policy, …) | 
DatasetMapping is a Mapping subclass for non-Exposure datasets that can be retrieved by the standard daf_persistence mechanism. | 
DefineVisitsConfig | 
|
DefineVisitsTask(config, *, butler, **kwargs) | 
Driver Task for defining visits (and their spatial regions) in Gen3 Butler repositories. | 
ExposureIdInfo([expId, expBits, maxBits]) | 
Exposure ID and number of bits used. | 
ExposureMapping(datasetType, policy, …) | 
ExposureMapping is a Mapping subclass for normal exposures. | 
FilterDefinition(physical_filter, lambdaEff, …) | 
The definition of an instrument’s filter bandpass. | 
FilterDefinitionCollection(*filters) | 
An order-preserving collection of `FilterDefinition`s. | 
FitsRawFormatterBase(*args, **kwargs) | 
Abstract base class for reading and writing raw data to and from FITS files. | 
GroupExposuresConfig | 
|
GroupExposuresTask(config, **kwargs) | 
Abstract base class for the subtask of DefineVisitsTask that is responsible for grouping exposures into visits. | 
ImageMapping(datasetType, policy, registry, …) | 
ImageMapping is a Mapping subclass for non-camera images. | 
InitialSkyWcsError | 
For handling failures when creating a SkyWcs from a camera geometry and boresight. | 
Instrument(*args, **kwargs) | 
Base class for instrument-specific logic for the Gen3 Butler. | 
MakeRawVisitInfo([log, doStripHeader]) | 
Base class functor to make a VisitInfo from the FITS header of a raw image. | 
MakeRawVisitInfoViaObsInfo([log, doStripHeader]) | 
Base class functor to make a VisitInfo from the FITS header of a raw image using ObservationInfo translators. | 
Mapping(datasetType, policy, registry, …) | 
Mapping is a base class for all mappings. | 
RawIngestConfig | 
|
RawIngestTask(config, *, butler, **kwargs) | 
Driver Task for ingesting raw data into Gen3 Butler repositories. | 
VisitDefinitionData(instrument, id, name, …) | 
Struct representing a group of exposures that will be used to define a visit. |