lsst.ip.diffim

The lsst.ip.diffim module provides algorithms for astronomical image differencing.

Contributing

lsst.ip.diffim is developed at https://github.com/lsst/ip_diffim. You can find Jira issues for this module under the ip_diffim component.

Task reference

Pipeline tasks

FractionDiaSourcesToSciSourcesMetricTask
Task that computes the ratio of difference image sources to science sources in an image, visit, etc.
NumberSciSourcesMetricTask
Task that computes the number of cataloged non-primary science sources.

Tasks

No topics.

Configurations

No topics.

Python API reference

lsst.ip.diffim Package

Functions

applyDcr(image, dcr[, useInverse, …]) Shift an image along the X and Y directions.
backgroundSubtract(config, maskedImages) Subtract the background from masked images.
calculateDcr(visitInfo, wcs, …[, …]) Calculate the shift in pixels of an exposure due to DCR.
calculateImageParallacticAngle(visitInfo, wcs) Calculate the total sky rotation angle of an exposure.
convolveAndSubtract(*args, **kwargs) Overloaded function.
generateAlardLuptonBasisList(config[, …]) Generate an Alard-Lupton kernel basis list based upon the Config and the input FWHM of the science and template images.
makeAlardLuptonBasisList(halfWidth, nGauss, …)
makeAssessSpatialKernelVisitor(…)
makeBuildSingleKernelVisitor(*args, **kwargs) Overloaded function.
makeBuildSpatialKernelVisitor(basisList, …)
makeCentralDifferenceMatrix(width, height, …)
makeDeltaFunctionBasisList(width, height)
makeForwardDifferenceMatrix(width, height, …)
makeKernelBasisList(config[, targetFwhmPix, …]) Generate the delta function or Alard-Lupton kernel bases depending on the Config.
makeKernelCandidate(*args, **kwargs) Overloaded function.
makeKernelPcaVisitor(imagePca)
makeKernelSumVisitor(ps)
makeRegularizationMatrix(ps)
renormalizeKernelList(kernelListIn)
sourceToFootprintList(candidateInList, …) Convert a list of sources for the PSF-matching Kernel to Footprints.
writeKernelCellSet(kernelCellSet, …) TODO: DM-17458

Classes

AlardLuptonSubtractConfig
AlardLuptonSubtractTask(**kwargs) Compute the image difference of a science and template image using the Alard & Lupton (1998) algorithm.
AssessSpatialKernelVisitorF
BuildSingleKernelVisitorF
BuildSpatialKernelVisitorF
ClassificationDipoleConfig Configuration for classification of detected diaSources as dipole or not
ClassificationDipolePlugin(config, name, …) A plugin to classify whether a diaSource is a dipole.
DcrModel(modelImages, effectiveWavelength, …) A model of the true sky after correcting chromatic effects.
DecorrelateALKernelConfig Configuration parameters for the DecorrelateALKernelTask
DecorrelateALKernelMapReduceConfig Configuration parameters for the ImageMapReduceTask to direct it to use DecorrelateALKernelMapper as its mapper for A&L decorrelation.
DecorrelateALKernelMapper(*args, **kwargs) Task to be used as an ImageMapper for performing A&L decorrelation on subimages on a grid across a A&L difference image.
DecorrelateALKernelSpatialConfig Configuration parameters for the DecorrelateALKernelSpatialTask.
DecorrelateALKernelSpatialTask(*args, **kwargs) Decorrelate the effect of convolution by Alard-Lupton matching kernel in image difference
DecorrelateALKernelTask(*args, **kwargs) Decorrelate the effect of convolution by Alard-Lupton matching kernel in image difference
DetectAndMeasureConfig Config for DetectAndMeasureTask
DetectAndMeasureTask(**kwargs) Detect and measure sources on a difference image.
DetectionConfig Configuration for detecting sources on images for building a PSF-matching kernel
DiaCatalogSourceSelectorConfig
DiaCatalogSourceSelectorTask(**kwargs) A task that selects sources for Kernel candidates.
DipoleAnalysis() Functor class that provides (S/N, position, orientation) of measured dipoles
DipoleCentroidControl
DipoleDeblender() Functor to deblend a source as a dipole, and return a new source with deblended footprints.
DipoleFitAlgorithm(diffim[, posImage, negImage]) Fit a dipole model using an image difference.
DipoleFitPlugin(config, name, schema, metadata) A single frame measurement plugin that fits dipoles to all merged (two-peak) diaSources.
DipoleFitPluginConfig Configuration for DipoleFitPlugin
DipoleFitTask(schema[, algMetadata]) A task that fits a dipole to a difference image, with an optional separate detection image.
DipoleFitTaskConfig Measurement of detected diaSources as dipoles
DipoleFluxControl
DipoleMeasurementConfig Measurement of detected diaSources as dipoles
DipoleMeasurementTask(schema[, algMetadata]) Measurement of Sources, specifically ones from difference images, for characterization as dipoles
FindSetBitsU
GetCoaddAsTemplateConfig
GetCoaddAsTemplateTask(config, name, …) Subtask to retrieve coadd for use as an image difference template.
GetDcrTemplateConfig
GetDcrTemplateTask(*args, **kwargs)
GetMultiTractCoaddTemplateConfig
GetMultiTractCoaddTemplateTask(*args, **kwargs)
GetTemplateConfig
GetTemplateTask(*args, **kwargs)
ImageMapReduceConfig Configuration parameters for the ImageMapReduceTask
ImageMapReduceTask(*args, **kwargs) Split an Exposure into subExposures (optionally on a grid) and perform the same operation on each.
ImageMapper(config, name, parentTask, log, …) Abstract base class for any task that is to be used as ImageMapReduceConfig.mapper.
ImageMapperConfig Configuration parameters for ImageMapper
ImagePsfMatchConfig Configuration for image-to-image Psf matching.
ImagePsfMatchTask(*args, **kwargs) Psf-match two MaskedImages or Exposures using the sources in the images.
ImageReducer(config, name, parentTask, log, …) Base class for any ‘reduce’ task that is to be used as ImageMapReduceConfig.reducer.
ImageReducerConfig Configuration parameters for the ImageReducer
ImageStatisticsD
ImageStatisticsF
ImageStatisticsI
KernelCandidateDetectionF
KernelCandidateF
KernelCandidateQa(nKernelSpatial) Quality Assessment class for Kernel Candidates
KernelPcaD
KernelPcaVisitorF
KernelSolution
KernelSumVisitorF
MakeKernelConfig
MakeKernelTask(*args, **kwargs) Construct a kernel for PSF matching two exposures.
MaskedKernelSolutionF
ModelPsfMatchConfig Configuration for model-to-model Psf matching
ModelPsfMatchTask(*args, **kwargs) Matching of two model Psfs, and application of the Psf-matching kernel to an input Exposure
NaiveDipoleCentroid
NaiveDipoleFlux
NbasisEvaluator(psfMatchConfig, …) A functor to evaluate the Bayesian Information Criterion for the number of basis sets going into the kernel fitting
PsfDipoleFlux
PsfDipoleFluxControl
PsfMatchConfig Base configuration for Psf-matching
PsfMatchConfigAL The parameters specific to the “Alard-Lupton” (sum-of-Gaussian) Psf-matching basis
PsfMatchConfigDF The parameters specific to the delta-function (one basis per-pixel) Psf-matching basis
PsfMatchTask(*args, **kwargs) Base class for Psf Matching; should not be called directly
RegularizedKernelSolutionF
SnapPsfMatchConfig
SnapPsfMatchConfigAL Sum-of-Gaussian (Alard-Lupton) Psf-matching config optimized for snap subtraction
SnapPsfMatchConfigDF Delta-function Psf-matching config optimized for snap subtraction
SnapPsfMatchTask(*args, **kwargs) Image-based Psf-matching of two subsequent snaps from the same visit
SourceFlagChecker(sources[, badFlags]) Functor class to check whether a diaSource has flags set that should cause it to be labeled bad.
SpatialKernelSolution
StaticKernelSolutionF
ZogyConfig Configuration parameters for the ZogyTask
ZogyImagePsfMatchConfig Config for the ZogyImagePsfMatchTask
ZogyImagePsfMatchTask(*args, **kwargs) Task to perform Zogy PSF matching and image subtraction.
ZogyTask(config, name, parentTask, log, …) Task to perform ZOGY proper image subtraction.

Class Inheritance Diagram

Inheritance diagram of lsst.ip.diffim.subtractImages.AlardLuptonSubtractConfig, lsst.ip.diffim.subtractImages.AlardLuptonSubtractTask, lsst.ip.diffim.detail.assessSpatialKernelVisitor.AssessSpatialKernelVisitorF, lsst.ip.diffim.detail.buildSingleKernelVisitor.BuildSingleKernelVisitorF, lsst.ip.diffim.detail.buildSpatialKernelVisitor.BuildSpatialKernelVisitorF, lsst.ip.diffim.dipoleMeasurement.ClassificationDipoleConfig, lsst.ip.diffim.dipoleMeasurement.ClassificationDipolePlugin, lsst.ip.diffim.dcrModel.DcrModel, lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelConfig, lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelMapReduceConfig, lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelMapper, lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelSpatialConfig, lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelSpatialTask, lsst.ip.diffim.imageDecorrelation.DecorrelateALKernelTask, lsst.ip.diffim.detectAndMeasure.DetectAndMeasureConfig, lsst.ip.diffim.detectAndMeasure.DetectAndMeasureTask, lsst.ip.diffim.psfMatch.DetectionConfig, lsst.ip.diffim.diaCatalogSourceSelector.DiaCatalogSourceSelectorConfig, lsst.ip.diffim.diaCatalogSourceSelector.DiaCatalogSourceSelectorTask, lsst.ip.diffim.dipoleMeasurement.DipoleAnalysis, lsst.ip.diffim._dipoleAlgorithms.DipoleCentroidControl, lsst.ip.diffim.dipoleMeasurement.DipoleDeblender, lsst.ip.diffim.dipoleFitTask.DipoleFitAlgorithm, lsst.ip.diffim.dipoleFitTask.DipoleFitPlugin, lsst.ip.diffim.dipoleFitTask.DipoleFitPluginConfig, lsst.ip.diffim.dipoleFitTask.DipoleFitTask, lsst.ip.diffim.dipoleFitTask.DipoleFitTaskConfig, lsst.ip.diffim._dipoleAlgorithms.DipoleFluxControl, lsst.ip.diffim.dipoleMeasurement.DipoleMeasurementConfig, lsst.ip.diffim.dipoleMeasurement.DipoleMeasurementTask, lsst.ip.diffim.findSetBits.FindSetBitsU, lsst.ip.diffim.getTemplate.GetCoaddAsTemplateConfig, lsst.ip.diffim.getTemplate.GetCoaddAsTemplateTask, lsst.ip.diffim.getTemplate.GetDcrTemplateConfig, lsst.ip.diffim.getTemplate.GetDcrTemplateTask, lsst.ip.diffim.getTemplate.GetMultiTractCoaddTemplateConfig, lsst.ip.diffim.getTemplate.GetMultiTractCoaddTemplateTask, lsst.ip.diffim.getTemplate.GetTemplateConfig, lsst.ip.diffim.getTemplate.GetTemplateTask, lsst.ip.diffim.imageMapReduce.ImageMapReduceConfig, lsst.ip.diffim.imageMapReduce.ImageMapReduceTask, lsst.ip.diffim.imageMapReduce.ImageMapper, lsst.ip.diffim.imageMapReduce.ImageMapperConfig, lsst.ip.diffim.imagePsfMatch.ImagePsfMatchConfig, lsst.ip.diffim.imagePsfMatch.ImagePsfMatchTask, lsst.ip.diffim.imageMapReduce.ImageReducer, lsst.ip.diffim.imageMapReduce.ImageReducerConfig, lsst.ip.diffim.imageStatistics.ImageStatisticsD, lsst.ip.diffim.imageStatistics.ImageStatisticsF, lsst.ip.diffim.imageStatistics.ImageStatisticsI, lsst.ip.diffim.kernelCandidateDetection.KernelCandidateDetectionF, lsst.ip.diffim.kernelCandidate.KernelCandidateF, lsst.ip.diffim.kernelCandidateQa.KernelCandidateQa, lsst.ip.diffim.detail.kernelPca.KernelPcaD, lsst.ip.diffim.detail.kernelPca.KernelPcaVisitorF, lsst.ip.diffim.kernelSolution.KernelSolution, lsst.ip.diffim.detail.kernelSumVisitor.KernelSumVisitorF, lsst.ip.diffim.makeKernel.MakeKernelConfig, lsst.ip.diffim.makeKernel.MakeKernelTask, lsst.ip.diffim.kernelSolution.MaskedKernelSolutionF, lsst.ip.diffim.modelPsfMatch.ModelPsfMatchConfig, lsst.ip.diffim.modelPsfMatch.ModelPsfMatchTask, lsst.ip.diffim._dipoleAlgorithms.NaiveDipoleCentroid, lsst.ip.diffim._dipoleAlgorithms.NaiveDipoleFlux, lsst.ip.diffim.diffimTools.NbasisEvaluator, lsst.ip.diffim._dipoleAlgorithms.PsfDipoleFlux, lsst.ip.diffim._dipoleAlgorithms.PsfDipoleFluxControl, lsst.ip.diffim.psfMatch.PsfMatchConfig, lsst.ip.diffim.psfMatch.PsfMatchConfigAL, lsst.ip.diffim.psfMatch.PsfMatchConfigDF, lsst.ip.diffim.psfMatch.PsfMatchTask, lsst.ip.diffim.kernelSolution.RegularizedKernelSolutionF, lsst.ip.diffim.snapPsfMatch.SnapPsfMatchConfig, lsst.ip.diffim.snapPsfMatch.SnapPsfMatchConfigAL, lsst.ip.diffim.snapPsfMatch.SnapPsfMatchConfigDF, lsst.ip.diffim.snapPsfMatch.SnapPsfMatchTask, lsst.ip.diffim.dipoleMeasurement.SourceFlagChecker, lsst.ip.diffim.kernelSolution.SpatialKernelSolution, lsst.ip.diffim.kernelSolution.StaticKernelSolutionF, lsst.ip.diffim.zogy.ZogyConfig, lsst.ip.diffim.zogy.ZogyImagePsfMatchConfig, lsst.ip.diffim.zogy.ZogyImagePsfMatchTask, lsst.ip.diffim.zogy.ZogyTask

lsst.ip.diffim.metrics Module

Classes

NumberSciSourcesMetricTask(**kwargs) Task that computes the number of cataloged non-primary science sources.
NumberSciSourcesMetricConfig
FractionDiaSourcesToSciSourcesMetricTask(…) Task that computes the ratio of difference image sources to science sources in an image, visit, etc.
FractionDiaSourcesToSciSourcesMetricConfig