LSST Applications
21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
|
Public Member Functions | |
def | __init__ (self, diffim, posImage=None, negImage=None) |
def | fitDipoleImpl (self, source, tol=1e-7, rel_weight=0.5, fitBackground=1, bgGradientOrder=1, maxSepInSigma=5., separateNegParams=True, verbose=False) |
def | fitDipole (self, source, tol=1e-7, rel_weight=0.1, fitBackground=1, maxSepInSigma=5., separateNegParams=True, bgGradientOrder=1, verbose=False, display=False) |
def | displayFitResults (self, footprint, result) |
Public Attributes | |
diffim | |
posImage | |
negImage | |
psfSigma | |
log | |
debug | |
Fit a dipole model using an image difference. See also: `DMTN-007: Dipole characterization for image differencing <https://dmtn-007.lsst.io>`_.
Definition at line 484 of file dipoleFitTask.py.
def lsst.ip.diffim.dipoleFitTask.DipoleFitAlgorithm.__init__ | ( | self, | |
diffim, | |||
posImage = None , |
|||
negImage = None |
|||
) |
Algorithm to run dipole measurement on a diaSource Parameters ---------- diffim : `lsst.afw.image.Exposure` Exposure on which the diaSources were detected posImage : `lsst.afw.image.Exposure` "Positive" exposure from which the template was subtracted negImage : `lsst.afw.image.Exposure` "Negative" exposure which was subtracted from the posImage
Definition at line 510 of file dipoleFitTask.py.
def lsst.ip.diffim.dipoleFitTask.DipoleFitAlgorithm.displayFitResults | ( | self, | |
footprint, | |||
result | |||
) |
Display data, model fits and residuals (currently uses matplotlib display functions). Parameters ---------- footprint : TODO: DM-17458 Footprint containing the dipole that was fit result : `lmfit.MinimizerResult` `lmfit.MinimizerResult` object returned by `lmfit` optimizer Returns ------- fig : `matplotlib.pyplot.plot`
Definition at line 885 of file dipoleFitTask.py.
def lsst.ip.diffim.dipoleFitTask.DipoleFitAlgorithm.fitDipole | ( | self, | |
source, | |||
tol = 1e-7 , |
|||
rel_weight = 0.1 , |
|||
fitBackground = 1 , |
|||
maxSepInSigma = 5. , |
|||
separateNegParams = True , |
|||
bgGradientOrder = 1 , |
|||
verbose = False , |
|||
display = False |
|||
) |
Fit a dipole model to an input ``diaSource`` (wraps `fitDipoleImpl`). Actually, fits the subimage bounded by the input source's footprint) and optionally constrain the fit using the pre-subtraction images self.posImage (science) and self.negImage (template). Wraps the output into a `pipeBase.Struct` named tuple after computing additional statistics such as orientation and SNR. Parameters ---------- source : `lsst.afw.table.SourceRecord` Record containing the (merged) dipole source footprint detected on the diffim tol : `float`, optional Tolerance parameter for scipy.leastsq() optimization rel_weight : `float`, optional Weighting of posImage/negImage relative to the diffim in the fit fitBackground : `int`, {0, 1, 2}, optional How to fit linear background gradient in posImage/negImage - 0: do not fit background at all - 1 (default): pre-fit the background using linear least squares and then do not fit it as part of the dipole fitting optimization - 2: pre-fit the background using linear least squares (as in 1), and use the parameter estimates from that fit as starting parameters for an integrated "re-fit" of the background as part of the overall dipole fitting optimization. maxSepInSigma : `float`, optional Allowed window of centroid parameters relative to peak in input source footprint separateNegParams : `bool`, optional Fit separate parameters to the flux and background gradient in bgGradientOrder : `int`, {0, 1, 2}, optional Desired polynomial order of background gradient verbose: `bool`, optional Be verbose display Display input data, best fit model(s) and residuals in a matplotlib window. Returns ------- result : `struct` `pipeBase.Struct` object containing the fit parameters and other information. result : `callable` `lmfit.MinimizerResult` object for debugging and error estimation, etc. Notes ----- Parameter `fitBackground` has three options, thus it is an integer:
Definition at line 772 of file dipoleFitTask.py.
def lsst.ip.diffim.dipoleFitTask.DipoleFitAlgorithm.fitDipoleImpl | ( | self, | |
source, | |||
tol = 1e-7 , |
|||
rel_weight = 0.5 , |
|||
fitBackground = 1 , |
|||
bgGradientOrder = 1 , |
|||
maxSepInSigma = 5. , |
|||
separateNegParams = True , |
|||
verbose = False |
|||
) |
Fit a dipole model to an input difference image. Actually, fits the subimage bounded by the input source's footprint) and optionally constrain the fit using the pre-subtraction images posImage and negImage. Parameters ---------- source : TODO: DM-17458 TODO: DM-17458 tol : float, optional TODO: DM-17458 rel_weight : `float`, optional TODO: DM-17458 fitBackground : `int`, optional TODO: DM-17458 bgGradientOrder : `int`, optional TODO: DM-17458 maxSepInSigma : `float`, optional TODO: DM-17458 separateNegParams : `bool`, optional TODO: DM-17458 verbose : `bool`, optional TODO: DM-17458 Returns ------- result : `lmfit.MinimizerResult` return `lmfit.MinimizerResult` object containing the fit parameters and other information.
Definition at line 535 of file dipoleFitTask.py.
lsst.ip.diffim.dipoleFitTask.DipoleFitAlgorithm.debug |
Definition at line 533 of file dipoleFitTask.py.
lsst.ip.diffim.dipoleFitTask.DipoleFitAlgorithm.diffim |
Definition at line 523 of file dipoleFitTask.py.
lsst.ip.diffim.dipoleFitTask.DipoleFitAlgorithm.log |
Definition at line 530 of file dipoleFitTask.py.
lsst.ip.diffim.dipoleFitTask.DipoleFitAlgorithm.negImage |
Definition at line 525 of file dipoleFitTask.py.
lsst.ip.diffim.dipoleFitTask.DipoleFitAlgorithm.posImage |
Definition at line 524 of file dipoleFitTask.py.
lsst.ip.diffim.dipoleFitTask.DipoleFitAlgorithm.psfSigma |
Definition at line 526 of file dipoleFitTask.py.