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 | Static Public Member Functions | List of all members
lsst.afw.image.exposure._multiband.MultibandExposure Class Reference
Inheritance diagram for lsst.afw.image.exposure._multiband.MultibandExposure:
lsst.afw.image.image._multiband.MultibandTripleBase lsst.afw.multiband.MultibandBase

Public Member Functions

def __init__ (self, filters, image, mask, variance, psfs=None)
 
def computePsfKernelImage (self, position)
 
def computePsfImage (self, position=None)
 
def getPsfs (self)
 

Static Public Member Functions

def fromExposures (filters, singles)
 
def fromArrays (filters, image, mask, variance, bbox=None)
 
def fromKwargs (filters, filterKwargs, singleType=ExposureF, **kwargs)
 
def fromButler (butler, bands, *args, **kwargs)
 

Detailed Description

MultibandExposure class

This class acts as a container for multiple `afw.Exposure` objects.
All exposures must have the same bounding box, and the associated
images must all have the same data type.

See `MultibandTripleBase` for parameter definitions.

Definition at line 90 of file _multiband.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.afw.image.exposure._multiband.MultibandExposure.__init__ (   self,
  filters,
  image,
  mask,
  variance,
  psfs = None 
)

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

Definition at line 99 of file _multiband.py.

99 def __init__(self, filters, image, mask, variance, psfs=None):
100 super().__init__(filters, image, mask, variance)
101 if psfs is not None:
102 for psf, exposure in zip(psfs, self.singles):
103 exposure.setPsf(psf)
104

Member Function Documentation

◆ computePsfImage()

def lsst.afw.image.exposure._multiband.MultibandExposure.computePsfImage (   self,
  position = None 
)
Get a multiband PSF image

The PSF Kernel Image is computed for each band
and combined into a (filter, y, x) array and stored
as `self._psfImage`.
The result is not cached, so if the same PSF is expected
to be used multiple times it is a good idea to store the
result in another variable.

Parameters
----------
position: `Point2D` or `tuple`
    Coordinates to evaluate the PSF. If `position` is `None`
    then `Psf.getAveragePosition()` is used.

Returns
-------
self._psfImage: array
    The multiband PSF image.

Definition at line 224 of file _multiband.py.

224 def computePsfImage(self, position=None):
225 """Get a multiband PSF image
226
227 The PSF Kernel Image is computed for each band
228 and combined into a (filter, y, x) array and stored
229 as `self._psfImage`.
230 The result is not cached, so if the same PSF is expected
231 to be used multiple times it is a good idea to store the
232 result in another variable.
233
234 Parameters
235 ----------
236 position: `Point2D` or `tuple`
237 Coordinates to evaluate the PSF. If `position` is `None`
238 then `Psf.getAveragePosition()` is used.
239
240 Returns
241 -------
242 self._psfImage: array
243 The multiband PSF image.
244 """
245 return computePsfImage(
246 psfModels=self.getPsfs(),
247 position=position,
248 bands=self.filters,
249 useKernelImage=True,
250 )
251

◆ computePsfKernelImage()

def lsst.afw.image.exposure._multiband.MultibandExposure.computePsfKernelImage (   self,
  position 
)
Get a multiband PSF image

The PSF Kernel Image is computed for each band
and combined into a (filter, y, x) array and stored
as `self._psfImage`.
The result is not cached, so if the same PSF is expected
to be used multiple times it is a good idea to store the
result in another variable.

Parameters
----------
position: `Point2D` or `tuple`
    Coordinates to evaluate the PSF.

Returns
-------
self._psfImage: array
    The multiband PSF image.

Definition at line 197 of file _multiband.py.

197 def computePsfKernelImage(self, position):
198 """Get a multiband PSF image
199
200 The PSF Kernel Image is computed for each band
201 and combined into a (filter, y, x) array and stored
202 as `self._psfImage`.
203 The result is not cached, so if the same PSF is expected
204 to be used multiple times it is a good idea to store the
205 result in another variable.
206
207 Parameters
208 ----------
209 position: `Point2D` or `tuple`
210 Coordinates to evaluate the PSF.
211
212 Returns
213 -------
214 self._psfImage: array
215 The multiband PSF image.
216 """
217 return computePsfImage(
218 psfModels=self.getPsfs(),
219 position=position,
220 bands=self.filters,
221 useKernelImage=True,
222 )
223

◆ fromArrays()

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

see `tripleFromArrays` for a description of parameters

Definition at line 115 of file _multiband.py.

115 def fromArrays(filters, image, mask, variance, bbox=None):
116 """Construct a MultibandExposure from a collection of arrays
117
118 see `tripleFromArrays` for a description of parameters
119 """
120 return tripleFromArrays(MultibandExposure, filters, image, mask, variance, bbox)
121

◆ fromButler()

def lsst.afw.image.exposure._multiband.MultibandExposure.fromButler (   butler,
  bands,
args,
**  kwargs 
)
static
Load a multiband exposure from a butler

Because each band is stored in a separate exposure file,
this method can be used to load all of the exposures for
a given set of bands

Parameters
----------
butler: `lsst.daf.butler.Butler`
    Butler connection to use to load the single band
    calibrated images
bands: `list` or `str`
    List of names for each band
args: `list`
    Arguments to the Butler.
kwargs: `dict`
    Keyword arguments to pass to the Butler
    that are the same in all bands.

Returns
-------
result: `MultibandExposure`
    The new `MultibandExposure` created by combining all of the
    single band exposures.

Definition at line 165 of file _multiband.py.

165 def fromButler(butler, bands, *args, **kwargs):
166 """Load a multiband exposure from a butler
167
168 Because each band is stored in a separate exposure file,
169 this method can be used to load all of the exposures for
170 a given set of bands
171
172 Parameters
173 ----------
174 butler: `lsst.daf.butler.Butler`
175 Butler connection to use to load the single band
176 calibrated images
177 bands: `list` or `str`
178 List of names for each band
179 args: `list`
180 Arguments to the Butler.
181 kwargs: `dict`
182 Keyword arguments to pass to the Butler
183 that are the same in all bands.
184
185 Returns
186 -------
187 result: `MultibandExposure`
188 The new `MultibandExposure` created by combining all of the
189 single band exposures.
190 """
191 # Load the Exposure in each band
192 exposures = []
193 for band in bands:
194 exposures.append(butler.get(*args, band=band, **kwargs))
195 return MultibandExposure.fromExposures(bands, exposures)
196

◆ fromExposures()

def lsst.afw.image.exposure._multiband.MultibandExposure.fromExposures (   filters,
  singles 
)
static
Construct a MultibandImage from a collection of single band images

see `tripleFromExposures` for a description of parameters

Definition at line 106 of file _multiband.py.

106 def fromExposures(filters, singles):
107 """Construct a MultibandImage from a collection of single band images
108
109 see `tripleFromExposures` for a description of parameters
110 """
111 psfs = [s.getPsf() for s in singles]
112 return tripleFromSingles(MultibandExposure, filters, singles, psfs=psfs)
113

◆ fromKwargs()

def lsst.afw.image.exposure._multiband.MultibandExposure.fromKwargs (   filters,
  filterKwargs,
  singleType = ExposureF,
**  kwargs 
)
static
Build a MultibandImage from a set of keyword arguments

see `makeTripleFromKwargs` for a description of parameters

Definition at line 123 of file _multiband.py.

123 def fromKwargs(filters, filterKwargs, singleType=ExposureF, **kwargs):
124 """Build a MultibandImage from a set of keyword arguments
125
126 see `makeTripleFromKwargs` for a description of parameters
127 """
128 return makeTripleFromKwargs(MultibandExposure, filters, filterKwargs, singleType, **kwargs)
129

◆ getPsfs()

def lsst.afw.image.exposure._multiband.MultibandExposure.getPsfs (   self)
Extract the PSF model in each band

Returns
-------
psfs : `list` of `lsst.afw.detection.Psf`
    The PSF in each band

Definition at line 252 of file _multiband.py.

252 def getPsfs(self):
253 """Extract the PSF model in each band
254
255 Returns
256 -------
257 psfs : `list` of `lsst.afw.detection.Psf`
258 The PSF in each band
259 """
260 return [s.getPsf() for s in self]
261
A polymorphic base class for representing an image's Point Spread Function.
Definition: Psf.h:76

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