From 52112b99d5f59f81f4f683d1572ba574ce898030 Mon Sep 17 00:00:00 2001 From: "arnaud.bore" Date: Fri, 24 Mar 2023 13:47:01 -0400 Subject: [PATCH] fix is --- scilpy/preprocessing/distortion_correction.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scilpy/preprocessing/distortion_correction.py b/scilpy/preprocessing/distortion_correction.py index 3e1819d39..0996c6a3f 100644 --- a/scilpy/preprocessing/distortion_correction.py +++ b/scilpy/preprocessing/distortion_correction.py @@ -99,11 +99,11 @@ def create_multi_topup_index(bvals, mean, n_rev, b0_thr=0): dw_clumps = dw_clumps[1:] for s1, s2 in zip(b0_clumps[:len(dw_clumps)], dw_clumps): - if mean is "none": + if mean == "none": index[s1] = np.arange(cnt, cnt + s1.stop - s1.start) index[s2] = index[s1.stop - 1] cnt += s1.stop - s1.start - elif mean is "cluster": + elif mean == "cluster": index[s1] = index[s2] = cnt cnt += 1 else: @@ -111,11 +111,11 @@ def create_multi_topup_index(bvals, mean, n_rev, b0_thr=0): 'index determination : {}'.format(mean)) if len(b0_clumps) > len(dw_clumps): - if mean is "none": + if mean == "none": index[b0_clumps[-1]] = np.arange( cnt, cnt + b0_clumps[-1].stop - b0_clumps[-1].start) cnt += b0_clumps[-1].stop - b0_clumps[-1].start - elif mean is "cluster": + elif mean == "cluster": index[b0_clumps[-1]] = cnt cnt += 1 else: