Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two Bug Fixes #873

Merged
merged 3 commits into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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