From b9f35d34b690d13ba242bb7de11115e1f410c269 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Thu, 25 Jan 2024 05:07:17 +0100 Subject: [PATCH] Fix more typos found by codespell (#209) --- nmrglue/analysis/tests/test_analysis_integration.py | 6 +++--- nmrglue/process/proc_base.py | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/nmrglue/analysis/tests/test_analysis_integration.py b/nmrglue/analysis/tests/test_analysis_integration.py index 81e1301f..4660e1ab 100644 --- a/nmrglue/analysis/tests/test_analysis_integration.py +++ b/nmrglue/analysis/tests/test_analysis_integration.py @@ -58,7 +58,7 @@ def test_1d_integrate(): assert_array_almost_equal(values_2, [0.5 * 3, 3.]) -def test_1d_integrate_withnoise(): +def test_1d_integrate_with_noise(): """ Test integration of synthetic 1D data with two peaks and noise""" # seed random number @@ -88,11 +88,11 @@ def test_1d_integrate_withnoise(): assert abs(integrate(data, uc, limits) - 1) <= max_error # Test renormalization of norms - resutls = integrate(data, uc, ((4, 6), (7, 9)), noise_limits=(1, 2), + results = integrate(data, uc, ((4, 6), (7, 9)), noise_limits=(1, 2), norm_to_range=1) # Test renormalization of values. - assert abs(resutls[0, 0] - 0.5) <= max_error + assert abs(results[0, 0] - 0.5) <= max_error def test_1d_ndintegrate(): diff --git a/nmrglue/process/proc_base.py b/nmrglue/process/proc_base.py index 43b79e64..d2bcfd6b 100644 --- a/nmrglue/process/proc_base.py +++ b/nmrglue/process/proc_base.py @@ -2667,18 +2667,18 @@ def expand_nus(data, shape, nuslist, aqorder=None, quadrature_order=None, allow_ aqorder : list | None the order in which indirect dimensions are acquired. defaults to [1, 0] for 3D and [2, 1, 0] for 4D datasets. - All other possibilites compatible with the dimension are + All other possibilities compatible with the dimension are allowed, for eg, [0, 1] for 3D, and [0, 1, 2], [0, 2, 1], [2, 0, 1], [1, 0, 2], [1, 2, 0] for 4D data. quadrature_order : list | None - ordering of quadrature points. by defualt, this uses + ordering of quadrature points. by default, this uses the order from itertools.product, which seems to be fine most of the common acquistions. For example, for a 2D dataset, this will be [(0,), (1,)], for 3D, this will be [(0, 0), (0, 1), (1, 0), (1, 1)] and for 4D [(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1), (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1)], where 0=real and 1=imag point allow_high_dims : bool - flag that allows datasets higher than 4D to be genereted. + flag that allows datasets higher than 4D to be generated. By default, this is not allowed to prevent generation of large datasets by mistake @@ -2693,11 +2693,11 @@ def expand_nus(data, shape, nuslist, aqorder=None, quadrature_order=None, allow_ ------ ValueError if shape of the final data is not compatible - with the expeted shape from nuslist + with the expected shape from nuslist ValueError if dataset dimension is less than 2 ValueError - if dataset dimension is greated than 4 and + if dataset dimension is greater than 4 and the flag to allow this is False """ @@ -2709,7 +2709,7 @@ def expand_nus(data, shape, nuslist, aqorder=None, quadrature_order=None, allow_ raise ValueError(f"expected {ndim}D data but got {ndim}D nuslist") if ndim < 2: - raise ValueError(f"Needs to be be atleast a 2D dataset (not {ndim}D)") + raise ValueError(f"Needs to be be at least a 2D dataset (not {ndim}D)") # protection against unintended generation of large datasets if (ndim > 4) and (allow_high_dims == False):