|
lsst.ip.diffim
17.0.1-7-gfe850ae+4
|
Classes | |
| class | NbasisEvaluator |
Functions | |
| def | makeFlatNoiseImage (mi, seedStat=afwMath.MAX) |
| Add noise. More... | |
| def | makePoissonNoiseImage (im) |
| def | fakeCoeffs () |
| Make fake images for testing; one is a delta function (or narrow gaussian) and the other is a convolution of this with a spatially varying kernel. More... | |
| def | makeFakeKernelSet (sizeCell=128, nCell=3, deltaFunctionCounts=1.e4, tGaussianWidth=1.0, addNoise=True, bgValue=100., display=False) |
| def | backgroundSubtract (config, maskedImages) |
| Background subtraction for ip_diffim. More... | |
| def | writeKernelCellSet (kernelCellSet, psfMatchingKernel, backgroundModel, outdir) |
| More coarse debugging. More... | |
| def | sourceToFootprintList (candidateInList, templateExposure, scienceExposure, kernelSize, config, log) |
| Converting types. More... | |
| def | sourceTableToCandidateList (sourceTable, templateExposure, scienceExposure, kConfig, dConfig, log, basisList, doBuild=False) |
| def lsst.ip.diffim.diffimTools.backgroundSubtract | ( | config, | |
| maskedImages | |||
| ) |
Background subtraction for ip_diffim.
Subtract the background from masked images.
Parameters
----------
config : TODO: DM-17458
TODO: DM-17458
maskedImages : `list` of `lsst.afw.image.MaskedImage`
TODO: DM-17458
Returns
-------
TODO: DM-17458
TODO: DM-17458
Definition at line 263 of file diffimTools.py.
| def lsst.ip.diffim.diffimTools.fakeCoeffs | ( | ) |
Make fake images for testing; one is a delta function (or narrow gaussian) and the other is a convolution of this with a spatially varying kernel.
Definition at line 99 of file diffimTools.py.
| def lsst.ip.diffim.diffimTools.makeFakeKernelSet | ( | sizeCell = 128, |
|
nCell = 3, |
|||
deltaFunctionCounts = 1.e4, |
|||
tGaussianWidth = 1.0, |
|||
addNoise = True, |
|||
bgValue = 100., |
|||
display = False |
|||
| ) |
TODO: DM-17458
Parameters
----------
sizeCell : `int`, optional
TODO: DM-17458
nCell : `int`, optional
TODO: DM-17458
deltaFunctionCounts : `float`, optional
TODO: DM-17458
tGaussianWidth : `float`, optional
TODO: DM-17458
addNoise : `bool`, optional
TODO: DM-17458
bgValue : `float`, optional
TODO: DM-17458
display : `bool`, optional
TODO: DM-17458
Returns
-------
TODO: DM-17458
TODO: DM-17458
Definition at line 111 of file diffimTools.py.
| def lsst.ip.diffim.diffimTools.makeFlatNoiseImage | ( | mi, | |
seedStat = afwMath.MAX |
|||
| ) |
Add noise.
Definition at line 51 of file diffimTools.py.
| def lsst.ip.diffim.diffimTools.makePoissonNoiseImage | ( | im | ) |
Return a Poisson noise image based on im
Parameters
----------
im : `lsst.afw.image.Image`
image; the output image has the same dimensions and shape
and its expectation value is the value of ``im`` at each pixel
Returns
-------
noiseIm : `lsst.afw.image.Image`
TODO: DM-17458
Notes
-----
- Warning: This uses an undocumented numpy API (the documented API
uses a single float expectation value instead of an array).
- Uses numpy.random; you may wish to call numpy.random.seed first.
Definition at line 60 of file diffimTools.py.
| def lsst.ip.diffim.diffimTools.sourceTableToCandidateList | ( | sourceTable, | |
| templateExposure, | |||
| scienceExposure, | |||
| kConfig, | |||
| dConfig, | |||
| log, | |||
| basisList, | |||
doBuild = False |
|||
| ) |
Convert a list of Sources into KernelCandidates.
The KernelCandidates are used for fitting the Psf-matching kernel.
Parameters
----------
sourceTable : TODO: DM-17458
TODO: DM-17458
templateExposure : TODO: DM-17458
TODO: DM-17458
scienceExposure : TODO: DM-17458
TODO: DM-17458
kConfig : TODO: DM-17458
TODO: DM-17458
dConfig : TODO: DM-17458
TODO: DM-17458
log : TODO: DM-17458
TODO: DM-17458
basisList : TODO: DM-17458
TODO: DM-17458
doBuild : `bool`, optional
TODO: DM-17458
Returns
-------
TODO: DM-17458
TODO: DM-17458
Definition at line 447 of file diffimTools.py.
| def lsst.ip.diffim.diffimTools.sourceToFootprintList | ( | candidateInList, | |
| templateExposure, | |||
| scienceExposure, | |||
| kernelSize, | |||
| config, | |||
| log | |||
| ) |
Converting types.
Convert a list of sources for the PSF-matching Kernel to Footprints.
Parameters
----------
candidateInList : TODO: DM-17458
Input list of Sources
templateExposure : TODO: DM-17458
Template image, to be checked for Mask bits in Source Footprint
scienceExposure : TODO: DM-17458
Science image, to be checked for Mask bits in Source Footprint
kernelSize : TODO: DM-17458
TODO: DM-17458
config : TODO: DM-17458
Config that defines the Mask planes that indicate an invalid Source and Bbox grow radius
log : TODO: DM-17458
Log for output
Returns
-------
candidateOutList : `list`
a list of dicts having a "source" and "footprint" field, to be used for Psf-matching
Raises
------
RuntimeError
TODO: DM-17458
Notes
-----
Takes an input list of Sources that were selected to constrain
the Psf-matching Kernel and turns them into a List of Footprints,
which are used to seed a set of KernelCandidates. The function
checks both the template and science image for masked pixels,
rejecting the Source if certain Mask bits (defined in config) are
set within the Footprint.
Definition at line 346 of file diffimTools.py.
| def lsst.ip.diffim.diffimTools.writeKernelCellSet | ( | kernelCellSet, | |
| psfMatchingKernel, | |||
| backgroundModel, | |||
| outdir | |||
| ) |
More coarse debugging.
TODO: DM-17458
Parameters
----------
kernelCellSet : TODO: DM-17458
TODO: DM-17458
psfMatchingKernel : TODO: DM-17458
TODO: DM-17458
backgroundModel : TODO: DM-17458
TODO: DM-17458
outdir : TODO: DM-17458
TODO: DM-17458
Definition at line 305 of file diffimTools.py.
1.8.13