LSST Applications g0265f82a02+0e5473021a,g02d81e74bb+f5613e8b4f,g1470d8bcf6+190ad2ba91,g14a832a312+311607e4ab,g2079a07aa2+86d27d4dc4,g2305ad1205+a8e3196225,g295015adf3+b67ee847e5,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g3ddfee87b4+a761f810f3,g487adcacf7+17c8fdbcbd,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+65b5bd823e,g5a732f18d5+53520f316c,g64a986408d+f5613e8b4f,g6c1bc301e9+51106c2951,g858d7b2824+f5613e8b4f,g8a8a8dda67+585e252eca,g99cad8db69+6729933424,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+ef4e3a5875,gb0e22166c9+60f28cb32d,gb6a65358fc+0e5473021a,gba4ed39666+c2a2e4ac27,gbb8dafda3b+e9bba80f27,gc120e1dc64+eee469a5e5,gc28159a63d+0e5473021a,gcf0d15dbbd+a761f810f3,gdaeeff99f8+f9a426f77a,ge6526c86ff+d4c1d4bfef,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gf1cff7945b+f5613e8b4f,w.2024.16
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: