|
lsst.afw g714e0ed6de+196fb0684f
|
Public Member Functions | |
| __init__ (self, bands, image, mask, variance, psfs=None) | |
| computePsfKernelImage (self, position) | |
| computePsfImage (self, position=None) | |
| getPsfs (self) | |
| setXY0 (self, xy0) | |
| shiftedTo (self, xy0) | |
| clone (self, deep=True) | |
| image (self) | |
| mask (self) | |
| variance (self) | |
| getBBox (self, origin=PARENT) | |
| y0 (self) | |
| x0 (self) | |
| bands (self) | |
| singles (self) | |
| filters (self) | |
| getXY0 (self) | |
| origin (self) | |
| width (self) | |
| height (self) | |
| __len__ (self) | |
| __getitem__ (self, args) | |
| __iter__ (self) | |
| __next__ (self) | |
| shiftedBy (self, offset) | |
| __repr__ (self) | |
| __str__ (self) | |
Static Public Member Functions | |
| fromExposures (bands, singles) | |
| fromArrays (bands, image, mask, variance, bbox=None) | |
| fromKwargs (bands, bandKwargs, singleType=ExposureF, **kwargs) | |
| fromButler (butler, bands, *args, **kwargs) | |
Public Attributes | |
| y0 | |
| x0 | |
| bands | |
| singles = Box2I(xy0, self._bbox.getDimensions()) | |
| array | |
Protected Member Functions | |
| _buildSingles (self, image=None, mask=None, variance=None) | |
| _slice (self, bands, bandIndex, indices) | |
| _verifyUpdate (self, image=None, mask=None, variance=None) | |
| _bandNamesToIndex (self, bandIndex) | |
Protected Attributes | |
| _image = image | |
| _mask = mask | |
| _variance = variance | |
| _bands = tuple([f for f in bands]) | |
| _singles = tuple(singles) | |
| _bbox = self._singles[0].getBBox() | |
| int | _bandIndex = 0 |
MultibandExposure class This class acts as a container for multiple `afw.Exposure` objects. All exposures must have the same bounding box, and the associated images must all have the same data type. See `MultibandTripleBase` for parameter definitions.
Definition at line 125 of file _multiband.py.
| lsst.afw.image._exposure._multiband.MultibandExposure.__init__ | ( | self, | |
| bands, | |||
| image, | |||
| mask, | |||
| variance, | |||
| psfs = None ) |
Definition at line 134 of file _multiband.py.
|
inherited |
Get a slice of the underlying array If only a single band is specified, return the single band object sliced appropriately.
Definition at line 159 of file multiband.py.
|
inherited |
Definition at line 184 of file multiband.py.
|
inherited |
Definition at line 156 of file multiband.py.
|
inherited |
Definition at line 188 of file multiband.py.
|
inherited |
Definition at line 322 of file multiband.py.
|
inherited |
Definition at line 327 of file multiband.py.
|
protectedinherited |
Convert a list of band names to an index or a slice
Parameters
----------
bandIndex: iterable or `object`
Index to specify a band or list of bands,
usually a string or enum.
For example `bandIndex` can be
`"R"` or `["R", "G", "B"]` or `[Band.R, Band.G, Band.B]`,
if `Band` is an enum.
Returns
-------
bandNames: `list`
Names of the bands in the slice
bandIndex: `slice` or `list` of `int`
Index of each band in `bandNames` in
`self.bands`.
Definition at line 196 of file multiband.py.
|
protected |
Make a new list of single band objects
Parameters
----------
image: `list`
List of `Image` objects that represent the image in each band.
mask: `list`
List of `Mask` objects that represent the mask in each band.
variance: `list`
List of `Image` objects that represent the variance in each band.
Returns
-------
singles: tuple
Tuple of `MaskedImage` objects for each band,
where the `image`, `mask`, and `variance` of each `single`
point to the multiband objects.
Definition at line 165 of file _multiband.py.
|
protected |
Slice the current object and return the result See `Multiband._slice` for a list of the parameters. This overwrites the base method to attach the PSF to each individual exposure.
Reimplemented from lsst.afw.image._image._multiband.MultibandTripleBase.
Definition at line 295 of file _multiband.py.
|
protectedinherited |
Check that the new image, mask, or variance is valid This basically means checking that the update to the property matches the current bounding box and inherits from the `MultibandBase` class.
Definition at line 680 of file _multiband.py.
|
inherited |
List of band names for the single band objects
Definition at line 98 of file multiband.py.
|
inherited |
Make a copy of the current instance
Reimplemented from lsst.afw.multiband.MultibandBase.
Definition at line 639 of file _multiband.py.
| lsst.afw.image._exposure._multiband.MultibandExposure.computePsfImage | ( | self, | |
| position = None ) |
Get a multiband PSF image
The PSF Kernel Image is computed for each band
and combined into a (band, y, x) array and stored
as `self._psfImage`.
The result is not cached, so if the same PSF is expected
to be used multiple times it is a good idea to store the
result in another variable.
Parameters
----------
position: `Point2D` or `tuple`
Coordinates to evaluate the PSF. If `position` is `None`
then `Psf.getAveragePosition()` is used.
Returns
-------
self._psfImage: array
The multiband PSF image.
Definition at line 258 of file _multiband.py.
| lsst.afw.image._exposure._multiband.MultibandExposure.computePsfKernelImage | ( | self, | |
| position ) |
Get a multiband PSF image
The PSF Kernel Image is computed for each band
and combined into a (band, y, x) array and stored
as `self._psfImage`.
The result is not cached, so if the same PSF is expected
to be used multiple times it is a good idea to store the
result in another variable.
Parameters
----------
position: `Point2D` or `tuple`
Coordinates to evaluate the PSF.
Returns
-------
self._psfImage: array
The multiband PSF image.
Definition at line 232 of file _multiband.py.
|
inherited |
List of filter names for the single band objects (deprecated) Use `bands` instead.
Definition at line 90 of file multiband.py.
|
static |
Construct a MultibandExposure from a collection of arrays see `tripleFromArrays` for a description of parameters
Definition at line 150 of file _multiband.py.
|
static |
Load a multiband exposure from a butler
Because each band is stored in a separate exposure file,
this method can be used to load all of the exposures for
a given set of bands
Parameters
----------
butler: `lsst.daf.butler.Butler`
Butler connection to use to load the single band
calibrated images
bands: `list` or `str`
List of names for each band
args: `list`
Arguments to the Butler.
kwargs: `dict`
Keyword arguments to pass to the Butler
that are the same in all bands.
Returns
-------
result: `MultibandExposure`
The new `MultibandExposure` created by combining all of the
single band exposures.
Definition at line 200 of file _multiband.py.
|
static |
Construct a MultibandImage from a collection of single band images see `tripleFromExposures` for a description of parameters
Definition at line 141 of file _multiband.py.
|
static |
Build a MultibandImage from a set of keyword arguments see `makeTripleFromKwargs` for a description of parameters
Definition at line 158 of file _multiband.py.
|
inherited |
Bounding box
Reimplemented from lsst.afw.multiband.MultibandBase.
Definition at line 710 of file _multiband.py.
| lsst.afw.image._exposure._multiband.MultibandExposure.getPsfs | ( | self | ) |
Extract the PSF model in each band
Returns
-------
psfs : `dict` of `lsst.afw.detection.Psf`
The PSF in each band
Definition at line 285 of file _multiband.py.
|
inherited |
Minimum coordinate in the bounding box
Definition at line 114 of file multiband.py.
|
inherited |
Height of the images
Definition at line 151 of file multiband.py.
|
inherited |
The image of the MultibandMaskedImage
Definition at line 696 of file _multiband.py.
|
inherited |
The mask of the MultibandMaskedImage
Definition at line 701 of file _multiband.py.
|
inherited |
Minimum (y,x) position This is the position of `self.getBBox().getMin()`, but available as a tuple for numpy array indexing.
Definition at line 136 of file multiband.py.
|
inherited |
Shift the bounding box but keep the same Extent This is different than `MultibandBase.setXY0` because the multiband `image`, `mask`, and `variance` objects must all have their bounding boxes updated. Parameters ---------- xy0 : `Point2I` New minimum bounds of the bounding box
Reimplemented from lsst.afw.multiband.MultibandBase.
Definition at line 595 of file _multiband.py.
|
inherited |
Shift a bounding box by an offset, but keep the same Extent
This method is broken until DM-10781 is completed.
Parameters
----------
offset: `Extent2I`
Amount to shift the bounding box in x and y.
Returns
-------
result: `MultibandBase`
A copy of the object, shifted by `offset`
Definition at line 274 of file multiband.py.
|
inherited |
Shift the bounding box but keep the same Extent This is different than `MultibandBase.shiftedTo` because the multiband `image`, `mask`, and `variance` objects must all have their bounding boxes updated. Parameters ---------- xy0 : `Point2I` New minimum bounds of the bounding box Returns ------- result : `MultibandBase` A copy of the object, shifted to `xy0`.
Reimplemented from lsst.afw.multiband.MultibandBase.
Definition at line 612 of file _multiband.py.
|
inherited |
List of single band objects
Definition at line 104 of file multiband.py.
|
inherited |
The variance of the MultibandMaskedImage
Definition at line 706 of file _multiband.py.
|
inherited |
Width of the images
Definition at line 145 of file multiband.py.
|
inherited |
X0 X component of XY0 `Point2I.getX()`
Definition at line 120 of file multiband.py.
|
inherited |
Y0 Y component of XY0 `Point2I.getY()`
Definition at line 128 of file multiband.py.
|
protectedinherited |
Definition at line 185 of file multiband.py.
|
protectedinherited |
Definition at line 57 of file multiband.py.
|
protectedinherited |
Definition at line 61 of file multiband.py.
|
protectedinherited |
Definition at line 588 of file _multiband.py.
|
protectedinherited |
Definition at line 589 of file _multiband.py.
|
protectedinherited |
Definition at line 58 of file multiband.py.
|
protectedinherited |
Definition at line 590 of file _multiband.py.
|
inherited |
Definition at line 329 of file multiband.py.
|
inherited |
Definition at line 157 of file multiband.py.
|
inherited |
Definition at line 249 of file multiband.py.
|
inherited |
Definition at line 142 of file multiband.py.
|
inherited |
Definition at line 142 of file multiband.py.