Skip to content

Commit b29f89e

Browse files
committed
Updated register.py
1 parent d53fe68 commit b29f89e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

suite2p/registration/register.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -611,8 +611,9 @@ def registration_wrapper(f_reg, f_raw=None, f_reg_chan2=None, f_raw_chan2=None,
611611

612612
outputs = compute_reference_and_register_frames(f_align_in, f_align_out=f_align_out, refImg=refImg, ops=ops)
613613
refImg, rmin, rmax, mean_img, rigid_offsets, nonrigid_offsets, zest = outputs
614-
if len(rigid_offsets) > 1:
615-
yoff, xoff, corrXY = rigid_offsets
614+
yoff, xoff, corrXY = rigid_offsets
615+
616+
616617
if ops['nonrigid']:
617618
yoff1, xoff1, corrXY1 = nonrigid_offsets
618619
else:
@@ -752,10 +753,9 @@ def save_registration_outputs_to_ops(registration_outputs, ops):
752753
ops['refImg'] = refImg
753754
ops['rmin'], ops['rmax'] = rmin, rmax
754755
# assign rigid offsets to ops
755-
if len(rigid_offsets>1):
756-
ops['yoff'], ops['xoff'], ops['corrXY'] = rigid_offsets
756+
ops['yoff'], ops['xoff'], ops['corrXY'] = rigid_offsets
757757
# assign nonrigid offsets to ops
758-
if len(nonrigid_offsets>1):
758+
if ops['nonrigid']:
759759
ops['yoff1'], ops['xoff1'], ops['corrXY1'] = nonrigid_offsets
760760
# assign mean images
761761
ops['meanImg'] = meanImg

0 commit comments

Comments
 (0)