LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
lsst.afw.image._image._multiband.MultibandMaskedImage Class Reference
Inheritance diagram for lsst.afw.image._image._multiband.MultibandMaskedImage:
lsst.afw.image._image._multiband.MultibandTripleBase lsst.afw.multiband.MultibandBase

Public Member Functions

 __init__ (self, filters, image=None, mask=None, variance=None)
 

Static Public Member Functions

 fromImages (filters, singles)
 
 fromArrays (filters, image, mask, variance, bbox=None)
 
 fromKwargs (filters, filterKwargs, singleType=MaskedImageF, **kwargs)
 

Protected Member Functions

 _buildSingles (self, image=None, mask=None, variance=None)
 

Detailed Description

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 (filter, y, x).

See `MultibandTripleBase` for parameter definitions.

Definition at line 801 of file _multiband.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.afw.image._image._multiband.MultibandMaskedImage.__init__ ( self,
filters,
image = None,
mask = None,
variance = None )

Reimplemented from lsst.afw.image._image._multiband.MultibandTripleBase.

Definition at line 813 of file _multiband.py.

813 def __init__(self, filters, image=None, mask=None, variance=None):
814 super().__init__(filters, image, mask, variance)
815

Member Function Documentation

◆ _buildSingles()

lsst.afw.image._image._multiband.MultibandMaskedImage._buildSingles ( self,
image = None,
mask = None,
variance = None )
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.

840 def _buildSingles(self, image=None, mask=None, variance=None):
841 """Make a new list of single band objects
842
843 Parameters
844 ----------
845 image : `MultibandImage`
846 `MultibandImage` object that represent the image in each band.
847 mask : `MultibandMask`
848 `MultibandMask` object that represent the mask in each band.
849 variance : `MultibandImage`
850 `MultibandImage` object that represent the variance in each band.
851
852 Returns
853 -------
854 singles : `tuple`
855 Tuple of `MaskedImage` objects for each band,
856 where the `image`, `mask`, and `variance` of each `single`
857 point to the multiband objects.
858 """
859 singles = []
860 if image is None:
861 image = self.image
862 if mask is None:
863 mask = self.mask
864 if variance is None:
865 variance = self.variance
866
867 dtype = image.array.dtype
868 singles = []
869 for f in self.filters:
870 _image = image[f]
871 if mask is not None:
872 _mask = mask[f]
873 else:
874 _mask = None
875 if variance is not None:
876 _variance = variance[f]
877 else:
878 _variance = None
879 singles.append(MaskedImage(image=_image, mask=_mask, variance=_variance, dtype=dtype))
880 return tuple(singles)

◆ fromArrays()

lsst.afw.image._image._multiband.MultibandMaskedImage.fromArrays ( filters,
image,
mask,
variance,
bbox = None )
static
Construct a MultibandMaskedImage from a collection of arrays

see `tripleFromArrays` for a description of parameters

Definition at line 825 of file _multiband.py.

825 def fromArrays(filters, image, mask, variance, bbox=None):
826 """Construct a MultibandMaskedImage from a collection of arrays
827
828 see `tripleFromArrays` for a description of parameters
829 """
830 return tripleFromArrays(MultibandMaskedImage, filters, image, mask, variance, bbox)
831

◆ fromImages()

lsst.afw.image._image._multiband.MultibandMaskedImage.fromImages ( filters,
singles )
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.

817 def fromImages(filters, singles):
818 """Construct a MultibandImage from a collection of single band images
819
820 see `tripleFromImages` for a description of parameters
821 """
822 return tripleFromSingles(MultibandMaskedImage, filters, singles)
823

◆ fromKwargs()

lsst.afw.image._image._multiband.MultibandMaskedImage.fromKwargs ( filters,
filterKwargs,
singleType = MaskedImageF,
** kwargs )
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.

833 def fromKwargs(filters, filterKwargs, singleType=MaskedImageF, **kwargs):
834 """Build a MultibandImage from a set of keyword arguments
835
836 see `makeTripleFromKwargs` for a description of parameters
837 """
838 return makeTripleFromKwargs(MultibandMaskedImage, filters, filterKwargs, singleType, **kwargs)
839

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