|
def | __init__ (self, butler=None, kwargs) |
| Construct an ImageDifference Task. More...
|
|
def | runDataRef (self, sensorRef, templateIdList=None) |
|
def | run (self, exposure=None, selectSources=None, templateExposure=None, templateSources=None, idFactory=None, calexpBackgroundExposure=None, subtractedExposure=None) |
|
def | fitAstrometry (self, templateSources, templateExposure, selectSources) |
|
def | runDebug (self, exposure, subtractRes, selectSources, kernelSources, diaSources) |
|
def | getSchemaCatalogs (self) |
|
Subtract an image from a template and measure the result
Definition at line 261 of file imageDifference.py.
◆ __init__()
def lsst.pipe.tasks.imageDifference.ImageDifferenceTask.__init__ |
( |
|
self, |
|
|
|
butler = None , |
|
|
|
kwargs |
|
) |
| |
Construct an ImageDifference Task.
- Parameters
-
[in] | butler | Butler object to use in constructing reference object loaders |
Definition at line 268 of file imageDifference.py.
◆ fitAstrometry()
def lsst.pipe.tasks.imageDifference.ImageDifferenceTask.fitAstrometry |
( |
|
self, |
|
|
|
templateSources, |
|
|
|
templateExposure, |
|
|
|
selectSources |
|
) |
| |
Fit the relative astrometry between templateSources and selectSources
Todo
----
Remove this method. It originally fit a new WCS to the template before calling register.run
because our TAN-SIP fitter behaved badly for points far from CRPIX, but that's been fixed.
It remains because a subtask overrides it.
Definition at line 898 of file imageDifference.py.
◆ getSchemaCatalogs()
def lsst.pipe.tasks.imageDifference.ImageDifferenceTask.getSchemaCatalogs |
( |
|
self | ) |
|
Return a dict of empty catalogs for each catalog dataset produced by this task.
Definition at line 1000 of file imageDifference.py.
◆ makeIdFactory()
def lsst.pipe.tasks.imageDifference.ImageDifferenceTask.makeIdFactory |
( |
|
expId, |
|
|
|
expBits |
|
) |
| |
|
static |
Create IdFactory instance for unique 64 bit diaSource id-s.
Parameters
----------
expId : `int`
Exposure id.
expBits: `int`
Number of used bits in ``expId``.
Note
----
The diasource id-s consists of the ``expId`` stored fixed in the highest value
``expBits`` of the 64-bit integer plus (bitwise or) a generated sequence number in the
low value end of the integer.
Returns
-------
idFactory: `lsst.afw.table.IdFactory`
Definition at line 328 of file imageDifference.py.
◆ run()
def lsst.pipe.tasks.imageDifference.ImageDifferenceTask.run |
( |
|
self, |
|
|
|
exposure = None , |
|
|
|
selectSources = None , |
|
|
|
templateExposure = None , |
|
|
|
templateSources = None , |
|
|
|
idFactory = None , |
|
|
|
calexpBackgroundExposure = None , |
|
|
|
subtractedExposure = None |
|
) |
| |
PSF matches, subtract two images and perform detection on the difference image.
Parameters
----------
exposure : `lsst.afw.image.ExposureF`, optional
The science exposure, the minuend in the image subtraction.
Can be None only if ``config.doSubtract==False``.
selectSources : `lsst.afw.table.SourceCatalog`, optional
Identified sources on the science exposure. This catalog is used to
select sources in order to perform the AL PSF matching on stamp images
around them. The selection steps depend on config options and whether
``templateSources`` and ``matchingSources`` specified.
templateExposure : `lsst.afw.image.ExposureF`, optional
The template to be subtracted from ``exposure`` in the image subtraction.
The template exposure should cover the same sky area as the science exposure.
It is either a stich of patches of a coadd skymap image or a calexp
of the same pointing as the science exposure. Can be None only
if ``config.doSubtract==False`` and ``subtractedExposure`` is not None.
templateSources : `lsst.afw.table.SourceCatalog`, optional
Identified sources on the template exposure.
idFactory : `lsst.afw.table.IdFactory`
Generator object to assign ids to detected sources in the difference image.
calexpBackgroundExposure : `lsst.afw.image.ExposureF`, optional
Background exposure to be added back to the science exposure
if ``config.doAddCalexpBackground==True``
subtractedExposure : `lsst.afw.image.ExposureF`, optional
If ``config.doSubtract==False`` and ``config.doDetection==True``,
performs the post subtraction source detection only on this exposure.
Otherwise should be None.
Returns
-------
results : `lsst.pipe.base.Struct`
``subtractedExposure`` : `lsst.afw.image.ExposureF`
Difference image.
``matchedExposure`` : `lsst.afw.image.ExposureF`
The matched PSF exposure.
``subtractRes`` : `lsst.pipe.base.Struct`
The returned result structure of the ImagePsfMatchTask subtask.
``diaSources`` : `lsst.afw.table.SourceCatalog`
The catalog of detected sources.
``selectSources`` : `lsst.afw.table.SourceCatalog`
The input source catalog with optionally added Qa information.
Notes
-----
The following major steps are included:
- warp template coadd to match WCS of image
- PSF match image to warped template
- subtract image from PSF-matched, warped template
- detect sources
- measure sources
For details about the image subtraction configuration modes
see `lsst.ip.diffim`.
Definition at line 429 of file imageDifference.py.
◆ runDataRef()
def lsst.pipe.tasks.imageDifference.ImageDifferenceTask.runDataRef |
( |
|
self, |
|
|
|
sensorRef, |
|
|
|
templateIdList = None |
|
) |
| |
Subtract an image from a template coadd and measure the result.
Data I/O wrapper around `run` using the butler in Gen2.
Parameters
----------
sensorRef : `lsst.daf.persistence.ButlerDataRef`
Sensor-level butler data reference, used for the following data products:
Input only:
- calexp
- psf
- ccdExposureId
- ccdExposureId_bits
- self.config.coaddName + "Coadd_skyMap"
- self.config.coaddName + "Coadd"
Input or output, depending on config:
- self.config.coaddName + "Diff_subtractedExp"
Output, depending on config:
- self.config.coaddName + "Diff_matchedExp"
- self.config.coaddName + "Diff_src"
Returns
-------
results : `lsst.pipe.base.Struct`
Returns the Struct by `run`.
Definition at line 352 of file imageDifference.py.
◆ runDebug()
def lsst.pipe.tasks.imageDifference.ImageDifferenceTask.runDebug |
( |
|
self, |
|
|
|
exposure, |
|
|
|
subtractRes, |
|
|
|
selectSources, |
|
|
|
kernelSources, |
|
|
|
diaSources |
|
) |
| |
Make debug plots and displays.
Todo
----
Test and update for current debug display and slot names
Definition at line 912 of file imageDifference.py.
◆ algMetadata
lsst.pipe.tasks.imageDifference.ImageDifferenceTask.algMetadata |
◆ ConfigClass
lsst.pipe.tasks.imageDifference.ImageDifferenceTask.ConfigClass |
|
static |
◆ RunnerClass
lsst.pipe.tasks.imageDifference.ImageDifferenceTask.RunnerClass |
|
static |
◆ schema
lsst.pipe.tasks.imageDifference.ImageDifferenceTask.schema |
The documentation for this class was generated from the following file: