lsst.obs.base  18.1.0-11-g311e899+4
Public Member Functions | List of all members
lsst.obs.base.fitsRawFormatterBase.FitsRawFormatterBase Class Reference
Inheritance diagram for lsst.obs.base.fitsRawFormatterBase.FitsRawFormatterBase:

Public Member Functions

def translatorClass (self)
 
def readImage (self)
 
def readMask (self)
 
def readVariance (self)
 
def stripMetadata (self)
 
def makeVisitInfo (self)
 
def makeWcs (self)
 
def makeFilter (self)
 
def readImageComponent (self, component)
 
def readInfoComponent (self, component)
 
def readFull (self, parameters=None)
 
def write (self, inMemoryDataset)
 
def observationInfo (self)
 

Detailed Description

Abstract base class for reading and writing raw data to and from
FITS files.

Definition at line 33 of file fitsRawFormatterBase.py.

Member Function Documentation

◆ makeFilter()

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.

Definition at line 115 of file fitsRawFormatterBase.py.

◆ makeVisitInfo()

def lsst.obs.base.fitsRawFormatterBase.FitsRawFormatterBase.makeVisitInfo (   self)
Construct a VisitInfo from ObservationInfo.

Returns
-------
visitInfo : `~lsst.afw.image.VisitInfo`
    Structured metadata about the observation.

Definition at line 94 of file fitsRawFormatterBase.py.

◆ makeWcs()

def lsst.obs.base.fitsRawFormatterBase.FitsRawFormatterBase.makeWcs (   self)
Construct a SkyWcs from metadata.

Returns
-------
wcs : `~lsst.afw.geom.SkyWcs`
    Reversible mapping from pixel coordinates to sky coordinates.

Definition at line 104 of file fitsRawFormatterBase.py.

◆ observationInfo()

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 220 of file fitsRawFormatterBase.py.

◆ readFull()

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 ``self.fileDescriptor`.

Returns
-------
exposure : `~lsst.afw.image.Exposure`
    Complete in-memory exposure.

Definition at line 172 of file fitsRawFormatterBase.py.

◆ readImage()

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.

Definition at line 48 of file fitsRawFormatterBase.py.

◆ readImageComponent()

def lsst.obs.base.fitsRawFormatterBase.FitsRawFormatterBase.readImageComponent (   self,
  component 
)
Read the image, mask, or variance component of an Exposure.

Parameters
----------
component : `str`, optional
    Component to read from the file.  Always one of "image",
    "variance", or "mask".

Returns
-------
image : `~lsst.afw.image.Image` or `~lsst.afw.image.Mask`
    In-memory image, variance, or mask component.

Definition at line 125 of file fitsRawFormatterBase.py.

◆ readInfoComponent()

def lsst.obs.base.fitsRawFormatterBase.FitsRawFormatterBase.readInfoComponent (   self,
  component 
)
Read a component held by ExposureInfo.

The implementation provided by FitsRawFormatter provides only "wcs"
and "visitInfo".  When adding support for other components, subclasses
should delegate to `super()` for those and update `readFull` with
similar logic.

Parameters
----------
component : `str`, optional
    Component to read from the file.

Returns
-------
obj : component-dependent
    In-memory component object.

Definition at line 146 of file fitsRawFormatterBase.py.

◆ readMask()

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 58 of file fitsRawFormatterBase.py.

◆ readVariance()

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 73 of file fitsRawFormatterBase.py.

◆ stripMetadata()

def lsst.obs.base.fitsRawFormatterBase.FitsRawFormatterBase.stripMetadata (   self)
Remove metadata entries that are parsed into components.

Definition at line 88 of file fitsRawFormatterBase.py.

◆ translatorClass()

def lsst.obs.base.fitsRawFormatterBase.FitsRawFormatterBase.translatorClass (   self)
`~astro_metadata_translator.MetadataTranslator` to translate
metadata header to `~astro_metadata_translator.ObservationInfo`.

Definition at line 40 of file fitsRawFormatterBase.py.

◆ write()

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.

Definition at line 204 of file fitsRawFormatterBase.py.


The documentation for this class was generated from the following file: