|
def | __init__ (self, args, kwargs) |
|
def | subtractExposures (self, templateExposure, scienceExposure, doWarping=True, spatiallyVarying=True, inImageSpace=False, doPreConvolve=False) |
|
def | subtractMaskedImages (self, templateExposure, scienceExposure, doWarping=True, spatiallyVarying=True, inImageSpace=False, doPreConvolve=False) |
|
def | getFwhmPix (self, psf) |
| Return the FWHM in pixels of a Psf. More...
|
|
def | matchExposures (self, templateExposure, scienceExposure, templateFwhmPix=None, scienceFwhmPix=None, candidateList=None, doWarping=True, convolveTemplate=True) |
| Warp and PSF-match an exposure to the reference. More...
|
|
def | matchMaskedImages (self, templateMaskedImage, scienceMaskedImage, candidateList, templateFwhmPix=None, scienceFwhmPix=None) |
| PSF-match a MaskedImage (templateMaskedImage) to a reference MaskedImage (scienceMaskedImage) More...
|
|
def | subtractExposures (self, templateExposure, scienceExposure, templateFwhmPix=None, scienceFwhmPix=None, candidateList=None, doWarping=True, convolveTemplate=True) |
| Register, Psf-match and subtract two Exposures. More...
|
|
def | subtractMaskedImages (self, templateMaskedImage, scienceMaskedImage, candidateList, templateFwhmPix=None, scienceFwhmPix=None) |
| Psf-match and subtract two MaskedImages. More...
|
|
def | getSelectSources (self, exposure, sigma=None, doSmooth=True, idFactory=None) |
| Get sources to use for Psf-matching. More...
|
|
def | makeCandidateList (self, templateExposure, scienceExposure, kernelSize, candidateList=None) |
| Make a list of acceptable KernelCandidates. More...
|
|
Task to perform Zogy PSF matching and image subtraction.
This class inherits from ImagePsfMatchTask to contain the _warper
subtask and related methods.
Definition at line 1044 of file zogy.py.
def lsst.ip.diffim.imagePsfMatch.ImagePsfMatchTask.matchExposures |
( |
|
self, |
|
|
|
templateExposure, |
|
|
|
scienceExposure, |
|
|
|
templateFwhmPix = None , |
|
|
|
scienceFwhmPix = None , |
|
|
|
candidateList = None , |
|
|
|
doWarping = True , |
|
|
|
convolveTemplate = True |
|
) |
| |
|
inherited |
Warp and PSF-match an exposure to the reference.
Do the following, in order:
- Warp templateExposure to match scienceExposure, if doWarping True and their WCSs do not already match
- Determine a PSF matching kernel and differential background model that matches templateExposure to scienceExposure
- Convolve templateExposure by PSF matching kernel
- Parameters
-
templateExposure | Exposure to warp and PSF-match to the reference masked image |
scienceExposure | Exposure whose WCS and PSF are to be matched to |
templateFwhmPix | FWHM (in pixels) of the Psf in the template image (image to convolve) |
scienceFwhmPix | FWHM (in pixels) of the Psf in the science image |
candidateList | a list of footprints/maskedImages for kernel candidates; if None then source detection is run.
- Currently supported: list of Footprints or measAlg.PsfCandidateF
|
doWarping | what to do if templateExposure's and scienceExposure's WCSs do not match:
- if True then warp templateExposure to match scienceExposure
- if False then raise an Exception
|
convolveTemplate | convolve the template image or the science image
- if True, templateExposure is warped if doWarping, templateExposure is convolved
- if False, templateExposure is warped if doWarping, scienceExposure is convolved
|
- Returns
- a pipeBase.Struct containing these fields:
- matchedImage: the PSF-matched exposure = warped templateExposure convolved by psfMatchingKernel. This has:
- the same parent bbox, Wcs and Calib as scienceExposure
- the same filter as templateExposure
- no Psf (because the PSF-matching process does not compute one)
- psfMatchingKernel: the PSF matching kernel
- backgroundModel: differential background model
- kernelCellSet: SpatialCellSet used to solve for the PSF matching kernel
Raise a RuntimeError if doWarping is False and templateExposure's and scienceExposure's WCSs do not match
Definition at line 304 of file imagePsfMatch.py.
def lsst.ip.diffim.imagePsfMatch.ImagePsfMatchTask.matchMaskedImages |
( |
|
self, |
|
|
|
templateMaskedImage, |
|
|
|
scienceMaskedImage, |
|
|
|
candidateList, |
|
|
|
templateFwhmPix = None , |
|
|
|
scienceFwhmPix = None |
|
) |
| |
|
inherited |
PSF-match a MaskedImage (templateMaskedImage) to a reference MaskedImage (scienceMaskedImage)
Do the following, in order:
- Determine a PSF matching kernel and differential background model that matches templateMaskedImage to scienceMaskedImage
- Convolve templateMaskedImage by the PSF matching kernel
- Parameters
-
templateMaskedImage | masked image to PSF-match to the reference masked image; must be warped to match the reference masked image |
scienceMaskedImage | maskedImage whose PSF is to be matched to |
templateFwhmPix | FWHM (in pixels) of the Psf in the template image (image to convolve) |
scienceFwhmPix | FWHM (in pixels) of the Psf in the science image |
candidateList | a list of footprints/maskedImages for kernel candidates; if None then source detection is run.
- Currently supported: list of Footprints or measAlg.PsfCandidateF
|
- Returns
- a pipeBase.Struct containing these fields:
- psfMatchedMaskedImage: the PSF-matched masked image = templateMaskedImage convolved with psfMatchingKernel. This has the same xy0, dimensions and wcs as scienceMaskedImage.
- psfMatchingKernel: the PSF matching kernel
- backgroundModel: differential background model
- kernelCellSet: SpatialCellSet used to solve for the PSF matching kernel
Raise a RuntimeError if input images have different dimensions
Definition at line 388 of file imagePsfMatch.py.
def lsst.ip.diffim.zogy.ZogyImagePsfMatchTask.subtractExposures |
( |
|
self, |
|
|
|
templateExposure, |
|
|
|
scienceExposure, |
|
|
|
doWarping = True , |
|
|
|
spatiallyVarying = True , |
|
|
|
inImageSpace = False , |
|
|
|
doPreConvolve = False |
|
) |
| |
Register, PSF-match, and subtract two Exposures using the ZOGY algorithm.
Do the following, in order:
- Warp templateExposure to match scienceExposure, if their WCSs do not already match
- Compute subtracted exposure ZOGY image subtraction algorithm on the two exposures
Parameters
----------
templateExposure : `lsst.afw.image.Exposure`
exposure to PSF-match to scienceExposure. The exposure's mean value is subtracted
in-place.
scienceExposure : `lsst.afw.image.Exposure`
reference Exposure. The exposure's mean value is subtracted in-place.
doWarping : `bool`
what to do if templateExposure's and scienceExposure's WCSs do not match:
- if True then warp templateExposure to match scienceExposure
- if False then raise an Exception
spatiallyVarying : bool
If True, perform the operation over a grid of patches across the two exposures
inImageSpace : `bool`
If True, perform the Zogy convolutions in image space rather than in frequency space.
doPreConvolve : `bool`
***Currently not implemented.*** If True assume we are to compute the match filter-convolved
exposure which can be thresholded for detection. In the case of Zogy this would mean
we compute the Scorr image.
Returns
-------
A `lsst.pipe.base.Struct` containing these fields:
- subtractedExposure: subtracted Exposure
- warpedExposure: templateExposure after warping to match scienceExposure (if doWarping true)
Definition at line 1073 of file zogy.py.