From 2cbdef4bb27b94e126a499ff9f98fbd6235f9195 Mon Sep 17 00:00:00 2001 From: Gregor Thalhammer Date: Sun, 13 May 2012 23:45:38 +0200 Subject: [PATCH] unwrap: 3d tested ok --- unwrap2D/test_unwrap.py | 2 +- unwrap2D/unwrap3D.pyx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unwrap2D/test_unwrap.py b/unwrap2D/test_unwrap.py index e297f1ce..eb2c3ee1 100644 --- a/unwrap2D/test_unwrap.py +++ b/unwrap2D/test_unwrap.py @@ -25,7 +25,7 @@ def test_unwrap2D(): phi_w_ma/(np.pi*2), phi_ma/(np.pi*2),) def test_unwrap3D(): - x, y, z = np.ogrid[:8, :8, :4] + x, y, z = np.ogrid[:8, :12, :4] phi = 2*np.pi*(x*0.2 + y*0.1 + z*0.05) phi_wrapped = np.angle(np.exp(1j*phi)) diff --git a/unwrap2D/unwrap3D.pyx b/unwrap2D/unwrap3D.pyx index 6d5507d1..7a0aee9b 100644 --- a/unwrap2D/unwrap3D.pyx +++ b/unwrap2D/unwrap3D.pyx @@ -11,7 +11,7 @@ def _unwrap3D(float[:,:,::1] array, unwrap3D(&array[0,0,0], &unwrapped_array[0,0,0], &mask[0,0,0], - array.shape[0], array.shape[1], array.shape[2], #TODO: check!!! + array.shape[2], array.shape[1], array.shape[0], #TODO: check!!! wrap_around_x, wrap_around_y, wrap_around_z, )