diff --git a/suite2p/gui/rungui.py b/suite2p/gui/rungui.py index 30d8d8c0..61f0b891 100644 --- a/suite2p/gui/rungui.py +++ b/suite2p/gui/rungui.py @@ -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', diff --git a/suite2p/registration/register.py b/suite2p/registration/register.py index 7ce18584..c5df52bf 100644 --- a/suite2p/registration/register.py +++ b/suite2p/registration/register.py @@ -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) @@ -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: