LSST Applications g0da5cf3356+25b44625d0,g17e5ecfddb+50a5ac4092,g1c76d35bf8+585f0f68a2,g295839609d+8ef6456700,g2e2c1a68ba+cc1f6f037e,g38293774b4+62d12e78cb,g3b44f30a73+2891c76795,g48ccf36440+885b902d19,g4b2f1765b6+0c565e8f25,g5320a0a9f6+bd4bf1dc76,g56364267ca+403c24672b,g56b687f8c9+585f0f68a2,g5c4744a4d9+78cd207961,g5ffd174ac0+bd4bf1dc76,g6075d09f38+3075de592a,g667d525e37+cacede5508,g6f3e93b5a3+da81c812ee,g71f27ac40c+cacede5508,g7212e027e3+eb621d73aa,g774830318a+18d2b9fa6c,g7985c39107+62d12e78cb,g79ca90bc5c+fa2cc03294,g881bdbfe6c+cacede5508,g91fc1fa0cf+82a115f028,g961520b1fb+2534687f64,g96f01af41f+f2060f23b6,g9ca82378b8+cacede5508,g9d27549199+78cd207961,gb065e2a02a+ad48cbcda4,gb1df4690d6+585f0f68a2,gb35d6563ee+62d12e78cb,gbc3249ced9+bd4bf1dc76,gbec6a3398f+bd4bf1dc76,gd01420fc67+bd4bf1dc76,gd59336e7c4+c7bb92e648,gf46e8334de+81c9a61069,gfed783d017+bd4bf1dc76,v25.0.1.rc3
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lsst.afw.image.image._multiband.MultibandTripleBase Class Reference
Inheritance diagram for lsst.afw.image.image._multiband.MultibandTripleBase:
lsst.afw.multiband.MultibandBase lsst.afw.image.exposure._multiband.MultibandExposure lsst.afw.image.image._multiband.MultibandMaskedImage

Public Member Functions

def __init__ (self, filters, image, mask, variance)
 
def setXY0 (self, xy0)
 
def shiftedTo (self, xy0)
 
def clone (self, deep=True)
 
def image (self)
 
def mask (self)
 
def variance (self)
 
def getBBox (self, origin=PARENT)
 

Detailed Description

MultibandTripleBase class

This is a base class inherited by multiband classes
with `image`, `mask`, and `variance` objects,
such as `MultibandMaskedImage` and `MultibandExposure`.

Parameters
----------
filters : `list`
   List of filter names. If `singles` is an `OrderedDict`
   then this argument is ignored, otherwise it is required.
image : `list` or `MultibandImage`
   List of `Image` objects that represent the image in each band or
   a `MultibandImage`.
   Ignored if `singles` is not `None`.
mask : `list` or `MultibandMask`
   List of `Mask` objects that represent the mask in each bandor
   a `MultibandMask`.
   Ignored if `singles` is not `None`.
variance : `list` or `MultibandImage`
   List of `Image` objects that represent the variance in each bandor
   a `MultibandImage`.
   Ignored if `singles` is not `None`.

Definition at line 554 of file _multiband.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.afw.image.image._multiband.MultibandTripleBase.__init__ (   self,
  filters,
  image,
  mask,
  variance 
)

Reimplemented from lsst.afw.multiband.MultibandBase.

Reimplemented in lsst.afw.image.exposure._multiband.MultibandExposure, and lsst.afw.image.image._multiband.MultibandMaskedImage.

Definition at line 579 of file _multiband.py.

579 def __init__(self, filters, image, mask, variance):
580 self._filters = tuple(filters)
581 # Convert single band images into multiband images
582 if not isinstance(image, MultibandBase):
583 image = MultibandImage.fromImages(filters, image)
584 if mask is not None:
585 mask = MultibandMask.fromMasks(filters, mask)
586 if variance is not None:
587 variance = MultibandImage.fromImages(filters, variance)
588 self._image = image
589 self._mask = mask
590 self._variance = variance
591
592 self._singles = self._buildSingles(self._image, self._mask, self._variance)
593 self._bbox = self.singles[0].getBBox()
594

Member Function Documentation

◆ clone()

def lsst.afw.image.image._multiband.MultibandTripleBase.clone (   self,
  deep = True 
)
Make a copy of the current instance

Reimplemented from lsst.afw.multiband.MultibandBase.

Definition at line 639 of file _multiband.py.

639 def clone(self, deep=True):
640 """Make a copy of the current instance
641 """
642 image = self.image.clone(deep)
643 if self.mask is not None:
644 mask = self.mask.clone(deep)
645 else:
646 mask = None
647 if self.variance is not None:
648 variance = self.variance.clone(deep)
649 else:
650 variance = None
651 return type(self)(self.filters, image, mask, variance)
652
table::Key< int > type
Definition: Detector.cc:163

◆ getBBox()

def lsst.afw.image.image._multiband.MultibandTripleBase.getBBox (   self,
  origin = PARENT 
)
Bounding box

Reimplemented from lsst.afw.multiband.MultibandBase.

Definition at line 710 of file _multiband.py.

710 def getBBox(self, origin=PARENT):
711 """Bounding box
712 """
713 if origin == PARENT:
714 return self._bbox
715 elif origin == LOCAL:
716 return Box2I(Point2I(0, 0), self._bbox.getDimensions())
717 raise ValueError("Unrecognized origin, expected either PARENT or LOCAL")
718
719

◆ image()

def lsst.afw.image.image._multiband.MultibandTripleBase.image (   self)
The image of the MultibandMaskedImage

Definition at line 696 of file _multiband.py.

696 def image(self):
697 """The image of the MultibandMaskedImage"""
698 return self._image
699

◆ mask()

def lsst.afw.image.image._multiband.MultibandTripleBase.mask (   self)
The mask of the MultibandMaskedImage

Definition at line 701 of file _multiband.py.

701 def mask(self):
702 """The mask of the MultibandMaskedImage"""
703 return self._mask
704

◆ setXY0()

def lsst.afw.image.image._multiband.MultibandTripleBase.setXY0 (   self,
  xy0 
)
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.

595 def setXY0(self, xy0):
596 """Shift the bounding box but keep the same Extent
597 This is different than `MultibandBase.setXY0`
598 because the multiband `image`, `mask`, and `variance` objects
599 must all have their bounding boxes updated.
600 Parameters
601 ----------
602 xy0 : `Point2I`
603 New minimum bounds of the bounding box
604 """
605 super().setXY0(xy0)
606 self.image.setXY0(xy0)
607 if self.mask is not None:
608 self.mask.setXY0(xy0)
609 if self.variance is not None:
610 self.variance.setXY0(xy0)
611

◆ shiftedTo()

def lsst.afw.image.image._multiband.MultibandTripleBase.shiftedTo (   self,
  xy0 
)
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.

612 def shiftedTo(self, xy0):
613 """Shift the bounding box but keep the same Extent
614
615 This is different than `MultibandBase.shiftedTo`
616 because the multiband `image`, `mask`, and `variance` objects
617 must all have their bounding boxes updated.
618
619 Parameters
620 ----------
621 xy0 : `Point2I`
622 New minimum bounds of the bounding box
623
624 Returns
625 -------
626 result : `MultibandBase`
627 A copy of the object, shifted to `xy0`.
628 """
629 raise NotImplementedError("shiftedTo not implemented until DM-10781")
630 result = self.clone(False)
631 result._image = result.image.shiftedTo(xy0)
632 if self.mask is not None:
633 result._mask = result.mask.shiftedTo(xy0)
634 if self.variance is not None:
635 result._variance = result.variance.shiftedTo(xy0)
636 result._bbox = result.image.getBBox()
637 return result
638

◆ variance()

def lsst.afw.image.image._multiband.MultibandTripleBase.variance (   self)
The variance of the MultibandMaskedImage

Definition at line 706 of file _multiband.py.

706 def variance(self):
707 """The variance of the MultibandMaskedImage"""
708 return self._variance
709
afw::table::Key< afw::table::Array< VariancePixelT > > variance

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