Hi,
I am running suite2p with max_overlap = .75. Many detected ROIs are discarded based on overlap. When stats['overlap'] is computed for each ROI it seems to me that this is currently done by comparing it to the overlap image of all ROIs (before discarding) as opposed to being recalculated on the overlap image of kept ROIs. Would it make more sense to compute it with respect to only the rois that are kept? I think switching the order of lines 269 and 270 would do the trick.
Reproduce the code example:
if max_overlap is not None and max_overlap < 1.0:
keep_rois = ROI.filter_overlappers(rois=rois, overlap_image=n_overlaps,
max_overlap=max_overlap)
stat = stat[keep_rois]
n_overlaps = ROI.get_overlap_count_image(rois=rois, Ly=Ly, Lx=Lx)
rois = [
ROI(ypix=s["ypix"], xpix=s["xpix"], lam=s["lam"], med=s["med"],
do_crop=do_crop) for s in stat
]
for roi, s in zip(rois, stat):
s["overlap"] = roi.get_overlap_image(n_overlaps)
Describe the issue:
Hi, I am running suite2p with max_overlap = .75. Many detected ROIs are discarded based on overlap. When stats['overlap'] is computed for each ROI it seems to me that this is currently done by comparing it to the overlap image of all ROIs (before discarding) as opposed to being recalculated on the overlap image of kept ROIs. Would it make more sense to compute it with respect to only the rois that are kept? I think switching the order of lines 269 and 270 would do the trick.
Reproduce the code example:
Error message:
No response
Version information:
'suite2p_version': '0.13.1'
Context for the issue:
No response