LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
Image-based Psf-matching of two subsequent snaps from the same visit. More...
Public Member Functions | |
def | subtractExposures |
Static Public Attributes | |
ConfigClass = SnapPsfMatchConfig | |
Image-based Psf-matching of two subsequent snaps from the same visit.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This Task differs from ImagePsfMatchTask in that it matches two Exposures assuming that the images have been acquired very closely in time. Under this assumption, the astrometric misalignments and/or relative distortions should be within a pixel, and the Psf-shapes should be very similar. As a consequence, the default configurations for this class assume a very simple solution.
. The spatial variation in the kernel (SnapPsfMatchConfig.spatialKernelOrder) is assumed to be zero
. With no spatial variation, we turn of the spatial clipping loops (SnapPsfMatchConfig.spatialKernelClipping)
. The differential background is not fit for (SnapPsfMatchConfig.fitForBackground)
. The kernel is expected to be appx. a delta function, and has a small size (SnapPsfMatchConfig.kernelSize)
The sub-configurations for the Alard-Lupton (SnapPsfMatchConfigAL) and delta-function (SnapPsfMatchConfigDF) bases also are designed to generate a small, simple kernel.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Initialization is the same as base class ImagePsfMatch.__init__, with the difference being that the Task's ConfigClass is SnapPsfMatchConfig.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The Task is only configured to have a subtractExposures method, which in turn calls ImagePsfMatchTask.subtractExposures.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
See SnapPsfMatchConfig, which uses either SnapPsfMatchConfigDF and SnapPsfMatchConfigAL as its active configuration.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
See PsfMatchTask
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The command line task interface supports a flag -d/–debug
to import debug.py from your PYTHONPATH
. The relevant contents of debug.py for this Task include:
Note that if you want addional logging info, you may add to your scripts:
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This code is snapPsfMatchTask.py in the examples directory, and can be run as e.g.
And allow the user the freedom to either run the script in default mode, or point to their own images on disk. Note that these images must be readable as an lsst.afw.image.Exposure:
We have enabled some minor display debugging in this script via the –debug option. However, if you have an lsstDebug debug.py in your PYTHONPATH you will get additional debugging displays. The following block checks for this script:
Make sure the images (if any) that were sent to the script exist on disk and are readable. If no images are sent, make some fake data up for the sake of this example script (have a look at the code if you want more details on generateFakeImages; as a detail of how the fake images were made, you do have to fit for a differential background):
Display the two images if –debug:
Create and run the Task:
And finally provide optional debugging display of the Psf-matched (via the Psf models) science image:
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Definition at line 87 of file snapPsfMatch.py.
def lsst.ip.diffim.snapPsfMatch.SnapPsfMatchTask.subtractExposures | ( | self, | |
templateExposure, | |||
scienceExposure, | |||
templateFwhmPix = None , |
|||
scienceFwhmPix = None , |
|||
candidateList = None |
|||
) |
Definition at line 257 of file snapPsfMatch.py.
|
static |
Definition at line 252 of file snapPsfMatch.py.