diff --git a/python/lsst/summit/utils/guiders/detection.py b/python/lsst/summit/utils/guiders/detection.py index 4f17b3c2..feb34c83 100644 --- a/python/lsst/summit/utils/guiders/detection.py +++ b/python/lsst/summit/utils/guiders/detection.py @@ -373,8 +373,13 @@ def measureStarOnStamp( star.runAperturePhotometry(dataBkgSub, apertureRadius, gain=gain, bkgStd=bkgStd) # 4) Add centroid and shape in amplifier roi coordinates - star.xroi += cutout.xmin_original - star.yroi += cutout.ymin_original + # GalSim uses 1-based indexing where (1,1) is the + # center of pixel [0,0].Matplotlib's imshow with + # extent=(0,w,0,h) places pixel centers at half-integers. + # To align: subtract 0.5 to convert GalSim coords to + # matplotlib pixel-center coords. + star.xroi += cutout.xmin_original - 0.5 + star.yroi += cutout.ymin_original - 0.5 return star diff --git a/python/lsst/summit/utils/guiders/metrics.py b/python/lsst/summit/utils/guiders/metrics.py index e57d6078..ec41e9dd 100644 --- a/python/lsst/summit/utils/guiders/metrics.py +++ b/python/lsst/summit/utils/guiders/metrics.py @@ -297,7 +297,7 @@ def computeTrendMetrics( global_std = float(mad_std(y)) fitter = RobustFitter() - fit_res = fitter.fit(x, y) + fit_res = fitter.fit(x, y, residualThreshold=3.0) return GuiderDriftResult( fit=fit_res,