Skip to content

Commit e9b9b3f

Browse files
committed
Update docs and detection wrapper to fix #1232.
1 parent fe906cc commit e9b9b3f

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

suite2p/detection/detect.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ def detection_wrapper(f_reg, diameter=[12., 12.], tau=1., fs=30, meanImg_chan2=N
166166

167167
if mov is None:
168168
nbins = settings["nbins"]
169-
bin_size = int(max(1, n_frames // nbins, np.round(tau * fs)))
170-
#bin_size = int(max(1, np.round(tau * fs)))
169+
bin_size = settings.get("bin_size") or int(max(1, n_frames // nbins, np.round(tau * fs)))
171170
logger.info("Binning movie in chunks of %2.2d frames" % bin_size)
172171
mov = bin_movie(f_reg, bin_size, yrange=yrange, xrange=xrange,
173172
badframes=badframes, nbins=nbins)

suite2p/parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@
544544
"min": 1,
545545
"max": np.inf,
546546
"default": None,
547-
"description": "Size of bins for cell detection (default is tau * fs).",
547+
"description": "Size of bins for cell detection. If None, computed as max(1, nframes // nbins, round(tau * fs)), where nframes is the total number of frames in the registered movie.",
548548
},
549549
"highpass_time": {
550550
"gui_name": "Highpass time",

0 commit comments

Comments
 (0)