fitPsfs¶
-
lsst.meas.deblender.fitPsfs(debResult, log, psfChisqCut1=1.5, psfChisqCut2=1.5, psfChisqCut2b=1.5, tinyFootprintSize=2)¶ Fit a PSF + smooth background model (linear) to a small region around each peak.
This function will iterate over all filters in deblender result but does not compare results across filters. DeblendedPeaks that pass the cuts have their templates modified to the PSF + background model and their
deblendedAsPsfproperty set toTrue.This will likely be replaced in the future with a function that compares the psf chi-squared cuts so that peaks flagged as point sources will be considered point sources in all bands.
Parameters: - debResult: `lsst.meas.deblender.baseline.DeblenderResult`
Container for the final deblender results.
- log: `log.Log`
LSST logger for logging purposes.
- psfChisqCut*: `float`, optional
psfChisqCut1is the maximum chi-squared-per-degree-of-freedom allowed for a peak to be considered a PSF match without recentering. A fit is also made that includes terms to recenter the PSF.psfChisqCut2is the same aspsfChisqCut1except it determines the restriction on the fit that includes recentering terms. If the peak is a match for a re-centered PSF, the PSF is repositioned at the new center and the peak footprint is fit again, this time to the new PSF. If the resulting chi-squared-per-degree-of-freedom is less thanpsfChisqCut2bthen it passes the re-centering algorithm. If the peak passes both the re-centered and fixed position cuts, the better of the two is accepted, but parameters for all three psf fits are stored in theDebldendedPeak. The default forpsfChisqCut1,psfChisqCut2, andpsfChisqCut2bis1.5.- tinyFootprintSize: `float`, optional
The PSF model is shrunk to the size that contains the original footprint. If the bbox of the clipped PSF model for a peak is smaller than
max(tinyFootprintSize,2)thentinyFootprintfor the peak is set toTrueand the peak is not fit. The default is 2.
Returns: - modified:
bool If any templates have been assigned to PSF point sources then
modifiedisTrue, otherwise it isFalse.