Skip to content

Commit

Permalink
Merge pull request #873 from darikoneil/main
Browse files Browse the repository at this point in the history
Two Bug Fixes
  • Loading branch information
carsen-stringer authored Sep 9, 2022
2 parents d0a454d + b29f89e commit d7915fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion suite2p/gui/rungui.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ def create_buttons(self):
'input average diameter of ROIs in recording (can give a list e.g. 6,9 if aspect not equal), if set to 0 auto-determination run by Cellpose',
'cellprob_threshold for cellpose',
'flow_threshold for cellpose (throws out masks, if getting too few masks, set to 0)',
'high-pass image spatially by a multiple of the diameter (if field is non-uniform, a value of ~2 is recommended',
'model type string from Cellpose (can be a built-in model or a user model that is added to the Cellpose GUI)',
'high-pass image spatially by a multiple of the diameter (if field is non-uniform, a value of ~2 is recommended',
'whether or not to extract neuropil; if 0, Fneu is set to 0',
'allow shared pixels to be used for fluorescence extraction from overlapping ROIs (otherwise excluded from both ROIs)',
'number of pixels between ROI and neuropil donut',
Expand Down
10 changes: 8 additions & 2 deletions suite2p/registration/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,12 @@ def registration_wrapper(f_reg, f_raw=None, f_reg_chan2=None, f_raw_chan2=None,
outputs = compute_reference_and_register_frames(f_align_in, f_align_out=f_align_out, refImg=refImg, ops=ops)
refImg, rmin, rmax, mean_img, rigid_offsets, nonrigid_offsets, zest = outputs
yoff, xoff, corrXY = rigid_offsets
yoff1, xoff1, corrXY1 = nonrigid_offsets


if ops['nonrigid']:
yoff1, xoff1, corrXY1 = nonrigid_offsets
else:
yoff1, xoff1, corryXY1 = None, None, None

if nchannels > 1:
mean_img_alt = shift_frames_and_write(f_alt_in, f_alt_out, yoff, xoff, yoff1, xoff1, ops)
Expand Down Expand Up @@ -750,7 +755,8 @@ def save_registration_outputs_to_ops(registration_outputs, ops):
# assign rigid offsets to ops
ops['yoff'], ops['xoff'], ops['corrXY'] = rigid_offsets
# assign nonrigid offsets to ops
ops['yoff1'], ops['xoff1'], ops['corrXY1'] = nonrigid_offsets
if ops['nonrigid']:
ops['yoff1'], ops['xoff1'], ops['corrXY1'] = nonrigid_offsets
# assign mean images
ops['meanImg'] = meanImg
if meanImg_chan2 is not None:
Expand Down

0 comments on commit d7915fa

Please sign in to comment.