LSST Applications
21.0.0+75b29a8a7f,21.0.0+e70536a077,21.0.0-1-ga51b5d4+62c747d40b,21.0.0-10-gbfb87ad6+3307648ee3,21.0.0-15-gedb9d5423+47cba9fc36,21.0.0-2-g103fe59+fdf0863a2a,21.0.0-2-g1367e85+d38a93257c,21.0.0-2-g45278ab+e70536a077,21.0.0-2-g5242d73+d38a93257c,21.0.0-2-g7f82c8f+e682ffb718,21.0.0-2-g8dde007+d179fbfa6a,21.0.0-2-g8f08a60+9402881886,21.0.0-2-ga326454+e682ffb718,21.0.0-2-ga63a54e+08647d4b1b,21.0.0-2-gde069b7+26c92b3210,21.0.0-2-gecfae73+0445ed2f95,21.0.0-2-gfc62afb+d38a93257c,21.0.0-27-gbbd0d29+ae871e0f33,21.0.0-28-g5fc5e037+feb0e9397b,21.0.0-3-g21c7a62+f4b9c0ff5c,21.0.0-3-g357aad2+57b0bddf0b,21.0.0-3-g4be5c26+d38a93257c,21.0.0-3-g65f322c+3f454acf5d,21.0.0-3-g7d9da8d+75b29a8a7f,21.0.0-3-gaa929c8+9e4ef6332c,21.0.0-3-ge02ed75+4b120a55c4,21.0.0-4-g3300ddd+e70536a077,21.0.0-4-g591bb35+4b120a55c4,21.0.0-4-gc004bbf+4911b9cd27,21.0.0-4-gccdca77+f94adcd104,21.0.0-4-ge8fba5a+2b3a696ff9,21.0.0-5-gb155db7+2c5429117a,21.0.0-5-gdf36809+637e4641ee,21.0.0-6-g00874e7+c9fd7f7160,21.0.0-6-g4e60332+4b120a55c4,21.0.0-7-gc8ca178+40eb9cf840,21.0.0-8-gfbe0b4b+9e4ef6332c,21.0.0-9-g2fd488a+d83b7cd606,w.2021.05
LSST Data Management Base Package
|
Public Member Functions | |
def | __init__ (self, *args, **kwargs) |
def | fromMetadata (cls, metadata, obsInfo=None, storageClass=None, location=None) |
def | translatorClass (self) |
def | filterDefinitions (self) |
def | readImage (self) |
def | readMask (self) |
def | readVariance (self) |
def | isOnSky (self) |
def | stripMetadata (self) |
def | makeVisitInfo (self) |
def | getDetector (self, id) |
def | makeWcs (self, visitInfo, detector) |
def | makeRawSkyWcsFromBoresight (cls, boresight, orientation, detector) |
def | makeFilter (self) |
def | makeFilterLabel (self) |
def | readComponent (self, component, parameters=None) |
def | readFull (self, parameters=None) |
def | readRawHeaderWcs (self, parameters=None) |
def | write (self, inMemoryDataset) |
def | observationInfo (self) |
def | metadata (self) |
def | readMetadata (self) |
def | read (self, component=None) |
def | getImageCompressionSettings (self, recipeName) |
def | validateWriteRecipes (cls, recipes) |
Static Public Attributes | |
bool | wcsFlipX = False |
supportedExtensions = frozenset({".fits", ".fits.gz", ".fits.fz", ".fz", ".fit"}) | |
string | extension = ".fits" |
supportedWriteParameters = frozenset({"recipe"}) | |
dictionary | unsupportedParameters = {} |
Abstract base class for reading and writing raw data to and from FITS files.
Definition at line 40 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.__init__ | ( | self, | |
* | args, | ||
** | kwargs | ||
) |
Definition at line 49 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.filterDefinitions | ( | self | ) |
`~lsst.obs.base.FilterDefinitions`, defining the filters for this instrument.
Definition at line 98 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.fromMetadata | ( | cls, | |
metadata, | |||
obsInfo = None , |
|||
storageClass = None , |
|||
location = None |
|||
) |
Construct a possibly-limited formatter from known metadata. Parameters ---------- metadata : `lsst.daf.base.PropertyList` Raw header metadata, with any fixes (see `astro_metadata_translator.fix_header`) applied but nothing stripped. obsInfo : `astro_metadata_translator.ObservationInfo`, optional Structured information already extracted from ``metadata``. If not provided, will be read from ``metadata`` on first use. storageClass : `lsst.daf.butler.StorageClass`, optional StorageClass for this file. If not provided, the formatter will only support `makeWcs`, `makeVisitInfo`, `makeFilter`, and other operations that operate purely on metadata and not the actual file. location : `lsst.daf.butler.Location`, optional. Location of the file. If not provided, the formatter will only support `makeWcs`, `makeVisitInfo`, `makeFilter`, and other operations that operate purely on metadata and not the actual file. Returns ------- formatter : `FitsRawFormatterBase` An instance of ``cls``.
Definition at line 55 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.getDetector | ( | self, | |
id | |||
) |
Return the detector that acquired this raw exposure. Parameters ---------- id : `int` The identifying number of the detector to get. Returns ------- detector : `~lsst.afw.cameraGeom.Detector` The detector associated with that ``id``.
Reimplemented in lsst.obs.decam.rawFormatter.DarkEnergyCameraRawFormatter.
Definition at line 184 of file _fitsRawFormatterBase.py.
|
inherited |
Retrieve the relevant compression settings for this recipe. Parameters ---------- recipeName : `str` Label associated with the collection of compression parameters to select. Returns ------- settings : `dict` The selected settings.
Definition at line 304 of file fitsExposure.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.isOnSky | ( | self | ) |
Boolean to determine if the exposure is thought to be on the sky. Returns ------- onSky : `bool` Returns `True` if the observation looks like it was taken on the sky. Returns `False` if this observation looks like a calibration observation. Notes ----- If there is tracking RA/Dec information associated with the observation it is assumed that the observation is on sky. Currently the observation type is not checked.
Definition at line 144 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.makeFilter | ( | self | ) |
Construct a Filter from metadata. Returns ------- filter : `~lsst.afw.image.Filter` Object that identifies the filter for this image. Raises ------ NotFoundError Raised if the physical filter was not registered via `~lsst.afw.image.utils.defineFilter`.
Definition at line 286 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.makeFilterLabel | ( | self | ) |
Construct a FilterLabel from metadata. Returns ------- filter : `~lsst.afw.image.FilterLabel` Object that identifies the filter for this image.
Definition at line 303 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.makeRawSkyWcsFromBoresight | ( | cls, | |
boresight, | |||
orientation, | |||
detector | |||
) |
Class method to make a raw sky WCS from boresight and detector. Parameters ---------- boresight : `lsst.geom.SpherePoint` The ICRS boresight RA/Dec orientation : `lsst.geom.Angle` The rotation angle of the focal plane on the sky. detector : `lsst.afw.cameraGeom.Detector` Where to get the camera geomtry from. Returns ------- skyWcs : `~lsst.afw.geom.SkyWcs` Reversible mapping from pixel coordinates to sky coordinates.
Definition at line 245 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.makeVisitInfo | ( | self | ) |
Construct a VisitInfo from metadata. Returns ------- visitInfo : `~lsst.afw.image.VisitInfo` Structured metadata about the observation.
Definition at line 173 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.makeWcs | ( | self, | |
visitInfo, | |||
detector | |||
) |
Create a SkyWcs from information about the exposure. If VisitInfo is not None, use it and the detector to create a SkyWcs, otherwise return the metadata-based SkyWcs (always created, so that the relevant metadata keywords are stripped). Parameters ---------- visitInfo : `~lsst.afw.image.VisitInfo` The information about the telescope boresight and camera orientation angle for this exposure. detector : `~lsst.afw.cameraGeom.Detector` The detector used to acquire this exposure. Returns ------- skyWcs : `~lsst.afw.geom.SkyWcs` Reversible mapping from pixel coordinates to sky coordinates. Raises ------ InitialSkyWcsError Raised if there is an error generating the SkyWcs, chained from the lower-level exception if available.
Definition at line 199 of file _fitsRawFormatterBase.py.
|
inherited |
The metadata read from this file. It will be stripped as components are extracted from it (`lsst.daf.base.PropertyList`).
Definition at line 95 of file fitsExposure.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.observationInfo | ( | self | ) |
The `~astro_metadata_translator.ObservationInfo` extracted from this file's metadata (`~astro_metadata_translator.ObservationInfo`, read-only).
Definition at line 407 of file _fitsRawFormatterBase.py.
|
inherited |
Read data from a file. Parameters ---------- component : `str`, optional Component to read from the file. Only used if the `StorageClass` for reading differed from the `StorageClass` used to write the file. Returns ------- inMemoryDataset : `object` The requested data as a Python object. The type of object is controlled by the specific formatter. Raises ------ ValueError Component requested but this file does not seem to be a concrete composite. KeyError Raised when parameters passed with fileDescriptor are not supported.
Definition at line 242 of file fitsExposure.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.readComponent | ( | self, | |
component, | |||
parameters = None |
|||
) |
Read a component held by the Exposure. Parameters ---------- component : `str`, optional Component to read from the file. parameters : `dict`, optional If specified, a dictionary of slicing parameters that overrides those in ``fileDescriptor``. Returns ------- obj : component-dependent In-memory component object. Raises ------ KeyError Raised if the requested component cannot be handled.
Reimplemented from lsst.obs.base.formatters.fitsExposure.FitsExposureFormatter.
Definition at line 315 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.readFull | ( | self, | |
parameters = None |
|||
) |
Read the full Exposure object. Parameters ---------- parameters : `dict`, optional If specified, a dictionary of slicing parameters that overrides those in the `fileDescriptor` attribute. Returns ------- exposure : `~lsst.afw.image.Exposure` Complete in-memory exposure.
Reimplemented from lsst.obs.base.formatters.fitsExposure.FitsExposureFormatter.
Definition at line 354 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.readImage | ( | self | ) |
Read just the image component of the Exposure. Returns ------- image : `~lsst.afw.image.Image` In-memory image component.
Reimplemented in lsst.obs.decam.rawFormatter.DarkEnergyCameraCPCalibFormatter, and lsst.obs.decam.rawFormatter.DarkEnergyCameraRawFormatter.
Definition at line 104 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.readMask | ( | self | ) |
Read just the mask component of the Exposure. May return None (as the default implementation does) to indicate that there is no mask information to be extracted (at least not trivially) from the raw data. This will prohibit direct reading of just the mask, and set the mask of the full Exposure to zeros. Returns ------- mask : `~lsst.afw.image.Mask` In-memory mask component.
Definition at line 114 of file _fitsRawFormatterBase.py.
|
inherited |
Read all header metadata directly into a PropertyList. Returns ------- metadata : `~lsst.daf.base.PropertyList` Header metadata.
Reimplemented in lsst.obs.decam.rawFormatter.DarkEnergyCameraRawFormatter.
Definition at line 104 of file fitsExposure.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.readRawHeaderWcs | ( | self, | |
parameters = None |
|||
) |
Read the SkyWcs stored in the un-modified raw FITS WCS header keys.
Definition at line 386 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.readVariance | ( | self | ) |
Read just the variance component of the Exposure. May return None (as the default implementation does) to indicate that there is no variance information to be extracted (at least not trivially) from the raw data. This will prohibit direct reading of just the variance, and set the variance of the full Exposure to zeros. Returns ------- image : `~lsst.afw.image.Image` In-memory variance component.
Definition at line 129 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.stripMetadata | ( | self | ) |
Remove metadata entries that are parsed into components.
Reimplemented from lsst.obs.base.formatters.fitsExposure.FitsExposureFormatter.
Definition at line 164 of file _fitsRawFormatterBase.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.translatorClass | ( | self | ) |
`~astro_metadata_translator.MetadataTranslator` to translate metadata header to `~astro_metadata_translator.ObservationInfo`.
Definition at line 88 of file _fitsRawFormatterBase.py.
|
inherited |
Validate supplied recipes for this formatter. The recipes are supplemented with default values where appropriate. TODO: replace this custom validation code with Cerberus (DM-11846) Parameters ---------- recipes : `dict` Recipes to validate. Can be empty dict or `None`. Returns ------- validated : `dict` Validated recipes. Returns what was given if there are no recipes listed. Raises ------ RuntimeError Raised if validation fails.
Definition at line 341 of file fitsExposure.py.
def lsst.obs.base._fitsRawFormatterBase.FitsRawFormatterBase.write | ( | self, | |
inMemoryDataset | |||
) |
Write a Python object to a file. Parameters ---------- inMemoryDataset : `object` The Python object to store. Returns ------- path : `str` The `URI` where the primary file is stored.
Reimplemented from lsst.obs.base.formatters.fitsExposure.FitsExposureFormatter.
Definition at line 391 of file _fitsRawFormatterBase.py.
|
staticinherited |
Definition at line 86 of file fitsExposure.py.
|
staticinherited |
Definition at line 85 of file fitsExposure.py.
|
staticinherited |
Definition at line 88 of file fitsExposure.py.
|
staticinherited |
Definition at line 91 of file fitsExposure.py.
|
static |
Definition at line 46 of file _fitsRawFormatterBase.py.