|
lsst.afw g10abae039c+de8826df4f
|
Public Member Functions | |
| __init__ (self, bands, image=None, mask=None, variance=None) | |
| 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 | |
| fromImages (bands, singles) | |
| fromArrays (bands, image, mask, variance, bbox=None) | |
| fromKwargs (bands, bandKwargs, singleType=MaskedImageF, **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 |
MultibandMaskedImage class This class acts as a container for multiple `afw.MaskedImage` objects. All masked images must have the same bounding box, and the associated images must all have the same data type. The `image`, `mask`, and `variance` are all stored separately into a `MultibandImage`, `MultibandMask`, and `MultibandImage` respectively, which each have their own internal 3D arrays (band, y, x). See `MultibandTripleBase` for parameter definitions.
Definition at line 801 of file _multiband.py.
| lsst.afw.image._image._multiband.MultibandMaskedImage.__init__ | ( | self, | |
| bands, | |||
| image = None, | |||
| mask = None, | |||
| variance = None ) |
Definition at line 813 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 : `MultibandImage` `MultibandImage` object that represent the image in each band. mask : `MultibandMask` `MultibandMask` object that represent the mask in each band. variance : `MultibandImage` `MultibandImage` object 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 840 of file _multiband.py.
|
protectedinherited |
Slice the current object and return the result See `Multiband._slice` for a list of the parameters.
Reimplemented from lsst.afw.multiband.MultibandBase.
Reimplemented in lsst.afw.image._exposure._multiband.MultibandExposure.
Definition at line 653 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.
|
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 MultibandMaskedImage from a collection of arrays see `tripleFromArrays` for a description of parameters
Definition at line 825 of file _multiband.py.
|
static |
Construct a MultibandImage from a collection of single band images see `tripleFromImages` for a description of parameters
Definition at line 817 of file _multiband.py.
|
static |
Build a MultibandImage from a set of keyword arguments see `makeTripleFromKwargs` for a description of parameters
Definition at line 833 of file _multiband.py.
|
inherited |
Bounding box
Reimplemented from lsst.afw.multiband.MultibandBase.
Definition at line 710 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.