LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Public Member Functions | Static Public Member Functions | List of all members
lsst.afw.detection.multiband.MultibandFootprint Class Reference
Inheritance diagram for lsst.afw.detection.multiband.MultibandFootprint:
lsst.afw.multiband.MultibandBase

Public Member Functions

def __init__ (self, filters, singles)
 
def getSpans (self)
 
def footprint (self)
 
def mMaskedImage (self)
 
def spans (self)
 
def getPeaks (self)
 
def peaks (self)
 
def getImage (self, bbox=None, fill=np.nan, imageType=MultibandMaskedImage)
 
def clone (self, deep=True)
 
def filters (self)
 
def singles (self)
 
def getBBox (self)
 
def getXY0 (self)
 
def x0 (self)
 
def y0 (self)
 
def origin (self)
 
def width (self)
 
def height (self)
 
def __len__ (self)
 
def __getitem__ (self, args)
 
def __iter__ (self)
 
def __next__ (self)
 
def setXY0 (self, xy0)
 
def shiftedTo (self, xy0)
 
def shiftedBy (self, offset)
 
def __repr__ (self)
 
def __str__ (self)
 

Static Public Member Functions

def fromArrays (filters, image, mask=None, variance=None, footprint=None, xy0=None, thresh=0, peaks=None)
 
def fromImages (filters, image, mask=None, variance=None, footprint=None, thresh=0, peaks=None)
 
def fromMaskedImages (filters, maskedImages, footprint=None, thresh=0, peaks=None)
 

Detailed Description

Multiband Footprint class

A `MultibandFootprint` is a collection of HeavyFootprints that have
the same `SpanSet` and `peakCatalog` but different flux in each band.

Parameters
----------
filters : `list`
    List of filter names.
singles : `list`
    A list of single band `HeavyFootprint` objects.
    Each `HeavyFootprint` should have the same `PeakCatalog`
    and the same `SpanSet`, however to save CPU cycles there
    is no internal check for consistency of the peak catalog.

Definition at line 110 of file multiband.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.afw.detection.multiband.MultibandFootprint.__init__ (   self,
  filters,
  singles 
)

Definition at line 126 of file multiband.py.

126  def __init__(self, filters, singles):
127  super().__init__(filters, singles)
128  # Ensure that all HeavyFootprints have the same SpanSet
129  spans = singles[0].getSpans()
130  if not all([heavy.getSpans() == spans for heavy in singles]):
131  raise ValueError("All HeavyFootprints in singles are expected to have the same SpanSet")
132 
133  # Assume that all footprints have the same SpanSet and PeakCatalog
134  footprint = Footprint(spans)
135  footprint.setPeakCatalog(singles[0].getPeaks())
136  self._footprint = footprint
137 
lsst::afw::detection::Footprint Footprint
Definition: Source.h:57
bool all(CoordinateExpr< N > const &expr) noexcept
Return true if all elements are true.

Member Function Documentation

◆ __getitem__()

def lsst.afw.multiband.MultibandBase.__getitem__ (   self,
  args 
)
inherited
Get a slice of the underlying array

If only a single filter is specified,
return the single band object sliced
appropriately.

Reimplemented in lsst.afw.image.image._multiband.MultibandPixel.

Definition at line 147 of file multiband.py.

147  def __getitem__(self, args):
148  """Get a slice of the underlying array
149 
150  If only a single filter is specified,
151  return the single band object sliced
152  appropriately.
153  """
154  if not isinstance(args, tuple):
155  indices = (args,)
156  else:
157  indices = args
158 
159  # Return the single band object if the first
160  # index is not a list or slice.
161  filters, filterIndex = self._filterNamesToIndex(indices[0])
162  if not isinstance(filterIndex, slice) and len(filterIndex) == 1:
163  if len(indices) > 2:
164  return self.singles[filterIndex[0]][indices[1:]]
165  elif len(indices) == 2:
166  return self.singles[filterIndex[0]][indices[1]]
167  else:
168  return self.singles[filterIndex[0]]
169 
170  return self._slice(filters=filters, filterIndex=filterIndex, indices=indices[1:])
171 

◆ __iter__()

def lsst.afw.multiband.MultibandBase.__iter__ (   self)
inherited

Definition at line 172 of file multiband.py.

172  def __iter__(self):
173  self._filterIndex = 0
174  return self
175 

◆ __len__()

def lsst.afw.multiband.MultibandBase.__len__ (   self)
inherited

Definition at line 144 of file multiband.py.

144  def __len__(self):
145  return len(self.filters)
146 

◆ __next__()

def lsst.afw.multiband.MultibandBase.__next__ (   self)
inherited

Definition at line 176 of file multiband.py.

176  def __next__(self):
177  if self._filterIndex < len(self.filters):
178  result = self.singles[self._filterIndex]
179  self._filterIndex += 1
180  else:
181  raise StopIteration
182  return result
183 

◆ __repr__()

def lsst.afw.multiband.MultibandBase.__repr__ (   self)
inherited

Definition at line 310 of file multiband.py.

310  def __repr__(self):
311  result = "<{0}, filters={1}, bbox={2}>".format(
312  self.__class__.__name__, self.filters, self.getBBox().__repr__())
313  return result
314 
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
Definition: history.py:174

◆ __str__()

def lsst.afw.multiband.MultibandBase.__str__ (   self)
inherited

Definition at line 315 of file multiband.py.

315  def __str__(self):
316  if hasattr(self, "array"):
317  return str(self.array)
318  return self.__repr__()

◆ clone()

def lsst.afw.detection.multiband.MultibandFootprint.clone (   self,
  deep = True 
)
Copy the current object

Parameters
----------
deep : `bool`
    Whether or not to make a deep copy

Returns
-------
result : `MultibandFootprint`
    The cloned footprint.

Reimplemented from lsst.afw.multiband.MultibandBase.

Definition at line 339 of file multiband.py.

339  def clone(self, deep=True):
340  """Copy the current object
341 
342  Parameters
343  ----------
344  deep : `bool`
345  Whether or not to make a deep copy
346 
347  Returns
348  -------
349  result : `MultibandFootprint`
350  The cloned footprint.
351  """
352  if deep:
353  footprint = Footprint(self.footprint.getSpans())
354  for peak in self.footprint.getPeaks():
355  footprint.addPeak(peak.getX(), peak.getY(), peak.getValue())
356  mMaskedImage = self.getImage()
357  filters = tuple([f for f in self.filters])
358  result = MultibandFootprint.fromMaskedImages(filters, mMaskedImage, footprint)
359  else:
360  result = MultibandFootprint(self.filters, self.singles)
361  return result

◆ filters()

def lsst.afw.multiband.MultibandBase.filters (   self)
inherited
List of filter names for the single band objects

Definition at line 86 of file multiband.py.

86  def filters(self):
87  """List of filter names for the single band objects
88  """
89  return self._filters
90 

◆ footprint()

def lsst.afw.detection.multiband.MultibandFootprint.footprint (   self)
Common SpanSet and peak catalog for the single band footprints

Definition at line 259 of file multiband.py.

259  def footprint(self):
260  """Common SpanSet and peak catalog for the single band footprints"""
261  return self._footprint
262 

◆ fromArrays()

def lsst.afw.detection.multiband.MultibandFootprint.fromArrays (   filters,
  image,
  mask = None,
  variance = None,
  footprint = None,
  xy0 = None,
  thresh = 0,
  peaks = None 
)
static
Create a `MultibandFootprint` from an `image`, `mask`, `variance`

Parameters
----------
filters : `list`
    List of filter names.
image: array
    An array to convert into `lsst.afw.detection.HeavyFootprint` objects.
    Only pixels above the `thresh` value for at least one band
    will be included in the `SpanSet` and resulting footprints.
mask : array
    Mask for the `image` array.
variance : array
    Variance of the `image` array.
footprint : `Footprint`
    `Footprint` that contains the `SpanSet` and `PeakCatalog`
    to use for the `HeavyFootprint` in each band.
    If `footprint` is `None` then the `thresh` is used to create a
    `Footprint` based on the pixels above the `thresh` value.
xy0 : `Point2I`
    If `image` is an array and `footprint` is `None` then specifying
    `xy0` gives the location of the minimum `x` and `y` value of the
    `images`.
thresh : `float` or list of floats
    Threshold in each band (or the same threshold to be used in all bands)
    to include a pixel in the `SpanSet` of the `MultibandFootprint`.
    If `Footprint` is not `None` then `thresh` is ignored.
peaks : `PeakCatalog`
    Catalog containing information about the peaks located in the
    footprints.

Returns
-------
result : `MultibandFootprint`
    MultibandFootprint created from the arrays

Definition at line 139 of file multiband.py.

139  def fromArrays(filters, image, mask=None, variance=None, footprint=None, xy0=None, thresh=0, peaks=None):
140  """Create a `MultibandFootprint` from an `image`, `mask`, `variance`
141 
142  Parameters
143  ----------
144  filters : `list`
145  List of filter names.
146  image: array
147  An array to convert into `lsst.afw.detection.HeavyFootprint` objects.
148  Only pixels above the `thresh` value for at least one band
149  will be included in the `SpanSet` and resulting footprints.
150  mask : array
151  Mask for the `image` array.
152  variance : array
153  Variance of the `image` array.
154  footprint : `Footprint`
155  `Footprint` that contains the `SpanSet` and `PeakCatalog`
156  to use for the `HeavyFootprint` in each band.
157  If `footprint` is `None` then the `thresh` is used to create a
158  `Footprint` based on the pixels above the `thresh` value.
159  xy0 : `Point2I`
160  If `image` is an array and `footprint` is `None` then specifying
161  `xy0` gives the location of the minimum `x` and `y` value of the
162  `images`.
163  thresh : `float` or list of floats
164  Threshold in each band (or the same threshold to be used in all bands)
165  to include a pixel in the `SpanSet` of the `MultibandFootprint`.
166  If `Footprint` is not `None` then `thresh` is ignored.
167  peaks : `PeakCatalog`
168  Catalog containing information about the peaks located in the
169  footprints.
170 
171  Returns
172  -------
173  result : `MultibandFootprint`
174  MultibandFootprint created from the arrays
175  """
176  # Generate a new Footprint if one has not been specified
177  if footprint is None:
178  spans, imageBBox = getSpanSetFromImages(image, thresh, xy0)
179  footprint = Footprint(spans)
180  else:
181  imageBBox = footprint.getBBox()
182 
183  if peaks is not None:
184  footprint.setPeakCatalog(peaks)
185  mMaskedImage = MultibandMaskedImage.fromArrays(filters, image, mask, variance, imageBBox)
186  singles = [makeHeavyFootprint(footprint, maskedImage) for maskedImage in mMaskedImage]
187  return MultibandFootprint(filters, singles)
188 
def getSpanSetFromImages(images, thresh=0, xy0=None)
Definition: multiband.py:35
HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > makeHeavyFootprint(Footprint const &foot, lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &img, HeavyFootprintCtrl const *ctrl=nullptr)
Create a HeavyFootprint with footprint defined by the given Footprint and pixel values from the given...

◆ fromImages()

def lsst.afw.detection.multiband.MultibandFootprint.fromImages (   filters,
  image,
  mask = None,
  variance = None,
  footprint = None,
  thresh = 0,
  peaks = None 
)
static
Create a `MultibandFootprint` from an `image`, `mask`, `variance`

Parameters
----------
filters : `list`
    List of filter names.
image : `lsst.afw.image.MultibandImage`, or list of `lsst.afw.image.Image`
    A `lsst.afw.image.MultibandImage` (or collection of images in each band)
    to convert into `HeavyFootprint` objects.
    Only pixels above the `thresh` value for at least one band
    will be included in the `SpanSet` and resulting footprints.
mask : `MultibandMask` or list of `Mask`
    Mask for the `image`.
variance : `lsst.afw.image.MultibandImage`, or list of `lsst.afw.image.Image`
    Variance of the `image`.
thresh : `float` or `list` of floats
    Threshold in each band (or the same threshold to be used in all bands)
    to include a pixel in the `SpanSet` of the `MultibandFootprint`.
    If `Footprint` is not `None` then `thresh` is ignored.
peaks : `PeakCatalog`
    Catalog containing information about the peaks located in the
    footprints.

Returns
-------
result : `MultibandFootprint`
    MultibandFootprint created from the image, mask, and variance

Definition at line 190 of file multiband.py.

190  def fromImages(filters, image, mask=None, variance=None, footprint=None, thresh=0, peaks=None):
191  """Create a `MultibandFootprint` from an `image`, `mask`, `variance`
192 
193  Parameters
194  ----------
195  filters : `list`
196  List of filter names.
197  image : `lsst.afw.image.MultibandImage`, or list of `lsst.afw.image.Image`
198  A `lsst.afw.image.MultibandImage` (or collection of images in each band)
199  to convert into `HeavyFootprint` objects.
200  Only pixels above the `thresh` value for at least one band
201  will be included in the `SpanSet` and resulting footprints.
202  mask : `MultibandMask` or list of `Mask`
203  Mask for the `image`.
204  variance : `lsst.afw.image.MultibandImage`, or list of `lsst.afw.image.Image`
205  Variance of the `image`.
206  thresh : `float` or `list` of floats
207  Threshold in each band (or the same threshold to be used in all bands)
208  to include a pixel in the `SpanSet` of the `MultibandFootprint`.
209  If `Footprint` is not `None` then `thresh` is ignored.
210  peaks : `PeakCatalog`
211  Catalog containing information about the peaks located in the
212  footprints.
213 
214  Returns
215  -------
216  result : `MultibandFootprint`
217  MultibandFootprint created from the image, mask, and variance
218  """
219  # Generate a new Footprint if one has not been specified
220  if footprint is None:
221  spans, imageBBox = getSpanSetFromImages(image, thresh)
222  footprint = Footprint(spans)
223 
224  if peaks is not None:
225  footprint.setPeakCatalog(peaks)
226  mMaskedImage = MultibandMaskedImage(filters, image, mask, variance)
227  singles = [makeHeavyFootprint(footprint, maskedImage) for maskedImage in mMaskedImage]
228  return MultibandFootprint(filters, singles)
229 

◆ fromMaskedImages()

def lsst.afw.detection.multiband.MultibandFootprint.fromMaskedImages (   filters,
  maskedImages,
  footprint = None,
  thresh = 0,
  peaks = None 
)
static
Create a `MultibandFootprint` from a list of `MaskedImage`

See `fromImages` for a description of the parameters not listed below

Parameters
----------
maskedImages : `list` of `lsst.afw.image.MaskedImage`
    MaskedImages to extract the single band heavy footprints from.
    Like `fromImages`, if a `footprint` is not specified then all
    pixels above `thresh` will be used, and `peaks` will be added
    to the `PeakCatalog`.

Returns
-------
result : `MultibandFootprint`
    MultibandFootprint created from the image, mask, and variance

Definition at line 231 of file multiband.py.

231  def fromMaskedImages(filters, maskedImages, footprint=None, thresh=0, peaks=None):
232  """Create a `MultibandFootprint` from a list of `MaskedImage`
233 
234  See `fromImages` for a description of the parameters not listed below
235 
236  Parameters
237  ----------
238  maskedImages : `list` of `lsst.afw.image.MaskedImage`
239  MaskedImages to extract the single band heavy footprints from.
240  Like `fromImages`, if a `footprint` is not specified then all
241  pixels above `thresh` will be used, and `peaks` will be added
242  to the `PeakCatalog`.
243 
244  Returns
245  -------
246  result : `MultibandFootprint`
247  MultibandFootprint created from the image, mask, and variance
248  """
249  image = [maskedImage.image for maskedImage in maskedImages]
250  mask = [maskedImage.mask for maskedImage in maskedImages]
251  variance = [maskedImage.variance for maskedImage in maskedImages]
252  return MultibandFootprint.fromImages(filters, image, mask, variance, footprint, thresh, peaks)
253 

◆ getBBox()

def lsst.afw.multiband.MultibandBase.getBBox (   self)
inherited
Bounding box

Definition at line 97 of file multiband.py.

97  def getBBox(self):
98  """Bounding box
99  """
100  return self._bbox
101 

◆ getImage()

def lsst.afw.detection.multiband.MultibandFootprint.getImage (   self,
  bbox = None,
  fill = np.nan,
  imageType = MultibandMaskedImage 
)
Convert a `MultibandFootprint` to a `MultibandImage`

This returns the heavy footprints converted into an `MultibandImage` or
`MultibandMaskedImage` (depending on `imageType`).
This might be different than the internal `mMaskedImage` property
of the `MultibandFootprint`, as the `mMaskedImage` might contain
some non-zero pixels not contained in the footprint but present in
the images.

Parameters
----------
bbox : `Box2I`
    Bounding box of the resulting image.
    If no bounding box is specified, then the bounding box
    of the footprint is used.
fill : `float`
    Value to use for any pixel in the resulting image
    outside of the `SpanSet`.
imageType : `type`
    This should be either a `MultibandMaskedImage`
    or `MultibandImage` and describes the type of the output image.

Returns
-------
result : `MultibandBase`
    The resulting `MultibandImage` or `MultibandMaskedImage` created
    from the `MultibandHeavyFootprint`.

Definition at line 300 of file multiband.py.

300  def getImage(self, bbox=None, fill=np.nan, imageType=MultibandMaskedImage):
301  """Convert a `MultibandFootprint` to a `MultibandImage`
302 
303  This returns the heavy footprints converted into an `MultibandImage` or
304  `MultibandMaskedImage` (depending on `imageType`).
305  This might be different than the internal `mMaskedImage` property
306  of the `MultibandFootprint`, as the `mMaskedImage` might contain
307  some non-zero pixels not contained in the footprint but present in
308  the images.
309 
310  Parameters
311  ----------
312  bbox : `Box2I`
313  Bounding box of the resulting image.
314  If no bounding box is specified, then the bounding box
315  of the footprint is used.
316  fill : `float`
317  Value to use for any pixel in the resulting image
318  outside of the `SpanSet`.
319  imageType : `type`
320  This should be either a `MultibandMaskedImage`
321  or `MultibandImage` and describes the type of the output image.
322 
323  Returns
324  -------
325  result : `MultibandBase`
326  The resulting `MultibandImage` or `MultibandMaskedImage` created
327  from the `MultibandHeavyFootprint`.
328  """
329  if imageType == MultibandMaskedImage:
330  singleType = MaskedImage
331  elif imageType == MultibandImage:
332  singleType = Image
333  else:
334  raise TypeError("Expected imageType to be either MultibandImage or MultibandMaskedImage")
335  maskedImages = [heavyFootprintToImage(heavy, fill, bbox, singleType) for heavy in self.singles]
336  mMaskedImage = imageType.fromImages(self.filters, maskedImages)
337  return mMaskedImage
338 
def heavyFootprintToImage(heavy, fill=np.nan, bbox=None, imageType=MaskedImage)
Definition: multiband.py:80

◆ getPeaks()

def lsst.afw.detection.multiband.MultibandFootprint.getPeaks (   self)
Get the `PeakCatalog`

Definition at line 273 of file multiband.py.

273  def getPeaks(self):
274  """Get the `PeakCatalog`"""
275  return self._footprint.getPeaks()
276 

◆ getSpans()

def lsst.afw.detection.multiband.MultibandFootprint.getSpans (   self)
Get the full `SpanSet`

Definition at line 254 of file multiband.py.

254  def getSpans(self):
255  """Get the full `SpanSet`"""
256  return self._footprint.getSpans()
257 

◆ getXY0()

def lsst.afw.multiband.MultibandBase.getXY0 (   self)
inherited
Minimum coordinate in the bounding box

Definition at line 102 of file multiband.py.

102  def getXY0(self):
103  """Minimum coordinate in the bounding box
104  """
105  return self.getBBox().getMin()
106 

◆ height()

def lsst.afw.multiband.MultibandBase.height (   self)
inherited
Height of the images

Definition at line 139 of file multiband.py.

139  def height(self):
140  """Height of the images
141  """
142  return self.getBBox().getHeight()
143 

◆ mMaskedImage()

def lsst.afw.detection.multiband.MultibandFootprint.mMaskedImage (   self)
MultibandMaskedImage that the footprints present a view into

Definition at line 264 of file multiband.py.

264  def mMaskedImage(self):
265  """MultibandMaskedImage that the footprints present a view into"""
266  return self._mMaskedImage
267 

◆ origin()

def lsst.afw.multiband.MultibandBase.origin (   self)
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 124 of file multiband.py.

124  def origin(self):
125  """Minimum (y,x) position
126 
127  This is the position of `self.getBBox().getMin()`,
128  but available as a tuple for numpy array indexing.
129  """
130  return (self.y0, self.x0)
131 

◆ peaks()

def lsst.afw.detection.multiband.MultibandFootprint.peaks (   self)
`PeakCatalog` of the `MultibandFootprint`

Definition at line 278 of file multiband.py.

278  def peaks(self):
279  """`PeakCatalog` of the `MultibandFootprint`"""
280  return self._footprint.getPeaks()
281 

◆ setXY0()

def lsst.afw.multiband.MultibandBase.setXY0 (   self,
  xy0 
)
inherited
Shift the bounding box but keep the same Extent

Parameters
----------
xy0: `Point2I`
    New minimum bounds of the bounding box

Reimplemented in lsst.afw.image.image._multiband.MultibandTripleBase.

Definition at line 228 of file multiband.py.

228  def setXY0(self, xy0):
229  """Shift the bounding box but keep the same Extent
230 
231  Parameters
232  ----------
233  xy0: `Point2I`
234  New minimum bounds of the bounding box
235  """
236  self._bbox = Box2I(xy0, self._bbox.getDimensions())
237  for singleObj in self.singles:
238  singleObj.setXY0(xy0)
239 

◆ shiftedBy()

def lsst.afw.multiband.MultibandBase.shiftedBy (   self,
  offset 
)
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 262 of file multiband.py.

262  def shiftedBy(self, offset):
263  """Shift a bounding box by an offset, but keep the same Extent
264 
265  This method is broken until DM-10781 is completed.
266 
267  Parameters
268  ----------
269  offset: `Extent2I`
270  Amount to shift the bounding box in x and y.
271 
272  Returns
273  -------
274  result: `MultibandBase`
275  A copy of the object, shifted by `offset`
276  """
277  raise NotImplementedError("shiftedBy not implemented until DM-10781")
278  xy0 = self._bbox.getMin() + offset
279  return self.shiftedTo(xy0)
280 

◆ shiftedTo()

def lsst.afw.multiband.MultibandBase.shiftedTo (   self,
  xy0 
)
inherited
Shift the bounding box but keep the same Extent

This method is broken until DM-10781 is completed.

Parameters
----------
xy0: `Point2I`
    New minimum bounds of the bounding box

Returns
-------
result: `MultibandBase`
    A copy of the object, shifted to `xy0`.

Reimplemented in lsst.afw.image.image._multiband.MultibandTripleBase.

Definition at line 240 of file multiband.py.

240  def shiftedTo(self, xy0):
241  """Shift the bounding box but keep the same Extent
242 
243  This method is broken until DM-10781 is completed.
244 
245  Parameters
246  ----------
247  xy0: `Point2I`
248  New minimum bounds of the bounding box
249 
250  Returns
251  -------
252  result: `MultibandBase`
253  A copy of the object, shifted to `xy0`.
254  """
255  raise NotImplementedError("shiftedBy not implemented until DM-10781")
256  result = self.clone(False)
257  result._bbox = Box2I(xy0, result._bbox.getDimensions())
258  for singleObj in result.singles:
259  singleObj.setXY0(xy0)
260  return result
261 

◆ singles()

def lsst.afw.multiband.MultibandBase.singles (   self)
inherited
List of single band objects

Definition at line 92 of file multiband.py.

92  def singles(self):
93  """List of single band objects
94  """
95  return self._singles
96 

◆ spans()

def lsst.afw.detection.multiband.MultibandFootprint.spans (   self)
`SpanSet` of the `MultibandFootprint`

Definition at line 269 of file multiband.py.

269  def spans(self):
270  """`SpanSet` of the `MultibandFootprint`"""
271  return self._footprint.getSpans()
272 

◆ width()

def lsst.afw.multiband.MultibandBase.width (   self)
inherited
Width of the images

Definition at line 133 of file multiband.py.

133  def width(self):
134  """Width of the images
135  """
136  return self.getBBox().getWidth()
137 

◆ x0()

def lsst.afw.multiband.MultibandBase.x0 (   self)
inherited
X0

X component of XY0 `Point2I.getX()`

Definition at line 108 of file multiband.py.

108  def x0(self):
109  """X0
110 
111  X component of XY0 `Point2I.getX()`
112  """
113  return self.getBBox().getMinX()
114 

◆ y0()

def lsst.afw.multiband.MultibandBase.y0 (   self)
inherited
Y0

Y component of XY0 `Point2I.getY()`

Definition at line 116 of file multiband.py.

116  def y0(self):
117  """Y0
118 
119  Y component of XY0 `Point2I.getY()`
120  """
121  return self.getBBox().getMinY()
122 

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