lsst.pipe.tasks  19.0.0-29-g47457369+2
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.pipe.tasks.imageDifference.Winter2013ImageDifferenceTask Class Reference

Image difference Task used in the Winter 2013 data challege. More...

Inheritance diagram for lsst.pipe.tasks.imageDifference.Winter2013ImageDifferenceTask:
lsst.pipe.tasks.imageDifference.ImageDifferenceTask

Public Member Functions

def __init__ (self, kwargs)
 
def fitAstrometry (self, templateSources, templateExposure, selectSources)
 
def runDataRef (self, sensorRef, templateIdList=None)
 
def run (self, exposure=None, selectSources=None, templateExposure=None, templateSources=None, idFactory=None, calexpBackgroundExposure=None, subtractedExposure=None)
 
def runDebug (self, exposure, subtractRes, selectSources, kernelSources, diaSources)
 
def getSchemaCatalogs (self)
 

Static Public Member Functions

def makeIdFactory (expId, expBits)
 

Public Attributes

 schema
 
 algMetadata
 

Static Public Attributes

 ConfigClass
 
 RunnerClass
 

Detailed Description

Image difference Task used in the Winter 2013 data challege.

Enables testing the effects of registration shifts and scatter.

For use with winter 2013 simulated images: Use –templateId visit=88868666 for sparse data –templateId visit=22222200 for dense data (g) –templateId visit=11111100 for dense data (i)

Definition at line 1016 of file imageDifference.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pipe.tasks.imageDifference.Winter2013ImageDifferenceTask.__init__ (   self,
  kwargs 
)

Definition at line 1028 of file imageDifference.py.

Member Function Documentation

◆ fitAstrometry()

def lsst.pipe.tasks.imageDifference.Winter2013ImageDifferenceTask.fitAstrometry (   self,
  templateSources,
  templateExposure,
  selectSources 
)
Fit the relative astrometry between templateSources and selectSources

Definition at line 1031 of file imageDifference.py.

◆ getSchemaCatalogs()

def lsst.pipe.tasks.imageDifference.ImageDifferenceTask.getSchemaCatalogs (   self)
inherited
Return a dict of empty catalogs for each catalog dataset produced by this task.

Definition at line 987 of file imageDifference.py.

◆ makeIdFactory()

def lsst.pipe.tasks.imageDifference.ImageDifferenceTask.makeIdFactory (   expId,
  expBits 
)
staticinherited
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 318 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 
)
inherited
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 419 of file imageDifference.py.

◆ runDataRef()

def lsst.pipe.tasks.imageDifference.ImageDifferenceTask.runDataRef (   self,
  sensorRef,
  templateIdList = None 
)
inherited
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 342 of file imageDifference.py.

◆ runDebug()

def lsst.pipe.tasks.imageDifference.ImageDifferenceTask.runDebug (   self,
  exposure,
  subtractRes,
  selectSources,
  kernelSources,
  diaSources 
)
inherited
Make debug plots and displays.

Todo
----
Test and update for current debug display and slot names

Definition at line 899 of file imageDifference.py.

Member Data Documentation

◆ algMetadata

lsst.pipe.tasks.imageDifference.ImageDifferenceTask.algMetadata
inherited

Definition at line 286 of file imageDifference.py.

◆ ConfigClass

lsst.pipe.tasks.imageDifference.Winter2013ImageDifferenceTask.ConfigClass
static

Definition at line 1025 of file imageDifference.py.

◆ RunnerClass

lsst.pipe.tasks.imageDifference.ImageDifferenceTask.RunnerClass
staticinherited

Definition at line 257 of file imageDifference.py.

◆ schema

lsst.pipe.tasks.imageDifference.ImageDifferenceTask.schema
inherited

Definition at line 278 of file imageDifference.py.


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