lsst.obs.base  20.0.0-69-g8f355a9+701c885a11
Public Member Functions | Static Public Attributes | List of all members
lsst.obs.base.exposureAssembler.ExposureAssembler Class Reference
Inheritance diagram for lsst.obs.base.exposureAssembler.ExposureAssembler:

Public Member Functions

def getComponent (self, composite, componentName)
 
def getValidComponents (self, composite)
 
def disassemble (self, composite)
 
def assemble (self, components)
 
def handleParameters (self, inMemoryDataset, parameters=None)
 
str selectResponsibleComponent (cls, str readComponent, fromComponents)
 

Static Public Attributes

 EXPOSURE_COMPONENTS = set(("image", "variance", "mask", "wcs", "psf"))
 
 EXPOSURE_INFO_COMPONENTS
 
dictionary EXPOSURE_READ_COMPONENTS = {"bbox", "dimensions", "xy0"}
 
dictionary COMPONENT_MAP = {"bbox": "BBox", "xy0": "XY0"}
 

Detailed Description

Definition at line 31 of file exposureAssembler.py.

Member Function Documentation

◆ assemble()

def lsst.obs.base.exposureAssembler.ExposureAssembler.assemble (   self,
  components 
)
Construct an Exposure from components.

Parameters
----------
components : `dict`
    All the components from which to construct the Exposure.
    Some can be missing.

Returns
-------
exposure : `~lsst.afw.image.Exposure`
    Assembled exposure.

Raises
------
ValueError
    Some supplied components are not recognized.

Definition at line 179 of file exposureAssembler.py.

◆ disassemble()

def lsst.obs.base.exposureAssembler.ExposureAssembler.disassemble (   self,
  composite 
)
Disassemble an afw Exposure.

This implementation attempts to extract components from the parent
by looking for attributes of the same name or getter methods derived
from the component name.

Parameters
----------
composite : `~lsst.afw.image.Exposure`
    `Exposure` composite object consisting of components to be
    extracted.

Returns
-------
components : `dict`
    `dict` with keys matching the components defined in
    `self.storageClass` and values being `DatasetComponent` instances
    describing the component.

Raises
------
ValueError
    A requested component can not be found in the parent using generic
    lookups.
TypeError
    The parent object does not match the supplied `self.storageClass`.

Definition at line 126 of file exposureAssembler.py.

◆ getComponent()

def lsst.obs.base.exposureAssembler.ExposureAssembler.getComponent (   self,
  composite,
  componentName 
)
Get a component from an Exposure

Parameters
----------
composite : `~lsst.afw.image.Exposure`
    `Exposure` to access component.
componentName : `str`
    Name of component to retrieve.

Returns
-------
component : `object`
    The component. Can be None.

Raises
------
AttributeError
    The component can not be found.

Definition at line 69 of file exposureAssembler.py.

◆ getValidComponents()

def lsst.obs.base.exposureAssembler.ExposureAssembler.getValidComponents (   self,
  composite 
)
Extract all non-None components from a composite.

Parameters
----------
composite : `object`
    Composite from which to extract components.

Returns
-------
comps : `dict`
    Non-None components extracted from the composite, indexed by the
    component name as derived from the `self.storageClass`.

Definition at line 103 of file exposureAssembler.py.

◆ handleParameters()

def lsst.obs.base.exposureAssembler.ExposureAssembler.handleParameters (   self,
  inMemoryDataset,
  parameters = None 
)
Modify the in-memory dataset using the supplied parameters,
returning a possibly new object.

Parameters
----------
inMemoryDataset : `object`
    Object to modify based on the parameters.
parameters : `dict`, optional
    Parameters to apply. Values are specific to the parameter.
    Supported parameters are defined in the associated
    `StorageClass`.  If no relevant parameters are specified the
    inMemoryDataset will be return unchanged.

Returns
-------
inMemoryDataset : `object`
    Updated form of supplied in-memory dataset, after parameters
    have been used.

Definition at line 260 of file exposureAssembler.py.

◆ selectResponsibleComponent()

str lsst.obs.base.exposureAssembler.ExposureAssembler.selectResponsibleComponent (   cls,
str  readComponent,
  fromComponents 
)

Definition at line 289 of file exposureAssembler.py.

Member Data Documentation

◆ COMPONENT_MAP

dictionary lsst.obs.base.exposureAssembler.ExposureAssembler.COMPONENT_MAP = {"bbox": "BBox", "xy0": "XY0"}
static

Definition at line 39 of file exposureAssembler.py.

◆ EXPOSURE_COMPONENTS

lsst.obs.base.exposureAssembler.ExposureAssembler.EXPOSURE_COMPONENTS = set(("image", "variance", "mask", "wcs", "psf"))
static

Definition at line 33 of file exposureAssembler.py.

◆ EXPOSURE_INFO_COMPONENTS

lsst.obs.base.exposureAssembler.ExposureAssembler.EXPOSURE_INFO_COMPONENTS
static
Initial value:
= set(("apCorrMap", "coaddInputs", "photoCalib", "metadata",
"filter", "transmissionCurve", "visitInfo",
"detector", "validPolygon"))

Definition at line 34 of file exposureAssembler.py.

◆ EXPOSURE_READ_COMPONENTS

dictionary lsst.obs.base.exposureAssembler.ExposureAssembler.EXPOSURE_READ_COMPONENTS = {"bbox", "dimensions", "xy0"}
static

Definition at line 37 of file exposureAssembler.py.


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