LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Public Member Functions | |
def | metadata (self) |
def | readMetadata (self) |
def | stripMetadata (self) |
def | readComponent (self, component, parameters=None) |
def | readFull (self, parameters=None) |
def | read (self, component=None, parameters=None) |
def | write (self, inMemoryDataset) |
Static Public Attributes | |
string | extension = ".fits" |
Interface for reading and writing Exposures to and from FITS files.
Definition at line 29 of file fitsExposureFormatter.py.
def lsst.obs.base.fitsExposureFormatter.FitsExposureFormatter.metadata | ( | self | ) |
The metadata read from this file. It will be stripped as components are extracted from it (`lsst.daf.base.PropertyList`).
Definition at line 36 of file fitsExposureFormatter.py.
def lsst.obs.base.fitsExposureFormatter.FitsExposureFormatter.read | ( | self, | |
component = None , |
|||
parameters = None |
|||
) |
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. parameters : `dict`, optional If specified, a dictionary of slicing parameters that overrides those in ``fileDescriptor``. 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 166 of file fitsExposureFormatter.py.
def lsst.obs.base.fitsExposureFormatter.FitsExposureFormatter.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 in lsst.obs.base.fitsRawFormatterBase.FitsRawFormatterBase.
Definition at line 79 of file fitsExposureFormatter.py.
def lsst.obs.base.fitsExposureFormatter.FitsExposureFormatter.readFull | ( | self, | |
parameters = None |
|||
) |
Read the full Exposure object. Parameters ---------- parameters : `dict`, optional If specified a dictionary of slicing parameters that overrides those in ``fileDescriptor`. Returns ------- exposure : `~lsst.afw.image.Exposure` Complete in-memory exposure.
Reimplemented in lsst.obs.base.fitsRawFormatterBase.FitsRawFormatterBase.
Definition at line 139 of file fitsExposureFormatter.py.
def lsst.obs.base.fitsExposureFormatter.FitsExposureFormatter.readMetadata | ( | self | ) |
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 45 of file fitsExposureFormatter.py.
def lsst.obs.base.fitsExposureFormatter.FitsExposureFormatter.stripMetadata | ( | self | ) |
Remove metadata entries that are parsed into components. This is only called when just the metadata is requested; stripping entries there forces code that wants other components to ask for those components directly rather than trying to extract them from the metadata manually, which is fragile. This behavior is an intentional change from Gen2. Parameters ---------- metadata : `~lsst.daf.base.PropertyList` Header metadata, to be modified in-place.
Reimplemented in lsst.obs.base.fitsRawFormatterBase.FitsRawFormatterBase.
Definition at line 58 of file fitsExposureFormatter.py.
def lsst.obs.base.fitsExposureFormatter.FitsExposureFormatter.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 in lsst.obs.base.fitsRawFormatterBase.FitsRawFormatterBase.
Definition at line 207 of file fitsExposureFormatter.py.
|
static |
Definition at line 32 of file fitsExposureFormatter.py.