Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Story Points:0.5
-
Epic Link:
-
Sprint:DRP S19-4
-
Team:Data Release Production
Description
CoaddPsf.getWcs( i ) segfaults on i=getComponentCount() because the range check is index > getComponentCount() instead of index >= getComponentCount().
To reproduce:
import lsst.daf.persistence as dafPersist
butler = dafPersist.Butler('/datasets/hsc/repo/rerun/RC/w_2019_02/DM-16110/')
coadd = butler.get("deepCoadd_calexp", dataId=\{"tract": 9813, "patch": '2,5', 'filter': 'HSC-I'})
psf = coadd.getPsf()
numcomp = psf.getComponentCount()
for comp in [0, numcomp+1, numcomp]:
try:
print(psf.getWcs(comp).getPixelScale().asArcseconds())
except Exception as err:
print(err)
Output:
0.16879569053877114
File "src/CoaddPsf.cc", line 293, in lsst::afw::geom::SkyWcs lsst::meas::algorithms::CoaddPsf::getWcs(int)
index of CoaddPsf component out of range {0}
lsst::pex::exceptions::RangeError: 'index of CoaddPsf component out of range'
Caught signal 11, backtrace follows:
/software/lsstsw/stack_20181012/stack/miniconda3-4.5.4-fcd27eb/Linux64/utils/16.0-18-g0a50484+1/lib/libutils.so(+0x13864) [0x7fc703b9d864]
/usr/lib64/libc.so.6(+0x36280) [0x7fc757871280]
... etc ...