From f56831055d8222c1c2e74ca95176f8dd3d1a7c17 Mon Sep 17 00:00:00 2001 From: eftychios pnevmatikakis Date: Wed, 14 Aug 2019 14:55:52 -0400 Subject: [PATCH] fix bug that was flipping x-y dirs in pw_rigid --- caiman/motion_correction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/caiman/motion_correction.py b/caiman/motion_correction.py index e506883e2..d87a71866 100644 --- a/caiman/motion_correction.py +++ b/caiman/motion_correction.py @@ -2368,8 +2368,8 @@ def tile_and_correct_3d(img, template, strides, overlaps, max_shifts, newoverlap x_grid, y_grid, z_grid = np.meshgrid(np.arange(0., dims[1]).astype( np.float32), np.arange(0., dims[0]).astype(np.float32), np.arange(0., dims[2]).astype(np.float32)) - m_reg = warp_sk(img, np.stack((resize_sk(shift_img_y.astype(np.float32), dims) + x_grid, - resize_sk(shift_img_x.astype(np.float32), dims) + y_grid, + m_reg = warp_sk(img, np.stack((resize_sk(shift_img_y.astype(np.float32), dims) + y_grid, + resize_sk(shift_img_x.astype(np.float32), dims) + x_grid, resize_sk(shift_img_z.astype(np.float32), dims) + z_grid),axis=0), order=3, mode='constant') # borderValue=add_to_movie)