dirac-institute / kbmod

KBMOD (Kernel-Based Moving Object Detection)
BSD 2-Clause "Simplified" License
46 stars 14 forks source link

Fix segfault in weighted variance stamps #722

Closed jeremykubica closed 1 month ago

jeremykubica commented 1 month ago

The weighted variance stamps were causing a segfault when the number of returned stamps was less than the number of images. This could happen because of use_index which is set by the sigma-G filtering. The fix is to set num_images to the number of returned stamps.

This PR includes a few cleanups found during the debugging, including adding some docstring comments and fixing a numpy conversion error on old (v0.5) data.