From f87c9bb520fb3388590e12aa0c807372477d8e2d Mon Sep 17 00:00:00 2001 From: paugier Date: Fri, 19 Apr 2024 17:22:01 +0200 Subject: [PATCH] Fix NameError in fix --- src/fluidimage/works/piv/fix.py | 2 +- src/fluidimage/works/piv/test_piv.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/fluidimage/works/piv/fix.py b/src/fluidimage/works/piv/fix.py index 6457dc10..8867d647 100644 --- a/src/fluidimage/works/piv/fix.py +++ b/src/fluidimage/works/piv/fix.py @@ -167,7 +167,7 @@ def put_to_nan(inds, explanation): continue diff_neighbours = np.empty(len(other_peaks_good) + 1) - diff_neighbours[0] = sqrt(differences_2[ivec]) + diff_neighbours[0] = sqrt(differences2[ivec]) for i, (dx, dy, corr) in enumerate(other_peaks_good): diff_neighbours[i + 1] = np.sqrt( diff --git a/src/fluidimage/works/piv/test_piv.py b/src/fluidimage/works/piv/test_piv.py index 7e3db013..d7397b45 100644 --- a/src/fluidimage/works/piv/test_piv.py +++ b/src/fluidimage/works/piv/test_piv.py @@ -20,8 +20,7 @@ def test_minimal_piv(tmp_path): params.piv0.shape_crop_im0 = 32 params.piv0.grid.overlap = -3 - # still buggy - # params.piv0.nb_peaks_to_search = 2 + params.piv0.nb_peaks_to_search = 2 params.multipass.number = 2