From 60a85575124906b1300da01cabfb7c0be84b41a3 Mon Sep 17 00:00:00 2001 From: "Moorehead, Jude" Date: Thu, 15 Jan 2026 14:02:53 +0000 Subject: [PATCH 1/3] Fixing error handling bug outlined in issue 479 --- src/jade/post/manipulate_tally.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/jade/post/manipulate_tally.py b/src/jade/post/manipulate_tally.py index 5edf8d86..7c36e01a 100644 --- a/src/jade/post/manipulate_tally.py +++ b/src/jade/post/manipulate_tally.py @@ -342,11 +342,6 @@ def volume(tally: pd.DataFrame, volumes: dict[int, float]) -> pd.DataFrame: tally["Value"] / volumes[cell], tally["Value"], ) - tally["Error"] = np.where( - (tally["Cells"] == cell), - tally["Error"] / volumes[cell], - tally["Error"], - ) return tally @@ -373,11 +368,6 @@ def mass(tally: pd.DataFrame, masses: dict[int, float]) -> pd.DataFrame: tally["Value"] / masses[cell], tally["Value"], ) - tally["Error"] = np.where( - (tally["Cells"] == cell), - tally["Error"] / masses[cell], - tally["Error"], - ) return tally From f96e8653a4ddc644f754c8c6f25a64b46861650e Mon Sep 17 00:00:00 2001 From: "Moorehead, Jude" Date: Thu, 15 Jan 2026 15:48:29 +0000 Subject: [PATCH 2/3] Fixing the previous unit test for issue 479 --- tests/post/test_manipulate_tally.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/post/test_manipulate_tally.py b/tests/post/test_manipulate_tally.py index 114a46c9..8da35f40 100644 --- a/tests/post/test_manipulate_tally.py +++ b/tests/post/test_manipulate_tally.py @@ -390,7 +390,7 @@ def test_volume(): volumes = {1: 2.0, 2: 2.0, 3: 2.0, 4: 2.0, 5: 2.0} result = volume(df, volumes) assert 3.65062e-06 == pytest.approx(result["Value"][0], rel=1e-5) - assert 0.05 == pytest.approx(result["Error"][0], rel=1e-5) + assert 0.1 == pytest.approx(result["Error"][0], rel=1e-5) def test_mass(): From ef3321f21a8af3e9e0e280b36c5724091fb11897 Mon Sep 17 00:00:00 2001 From: "Moorehead, Jude" Date: Thu, 15 Jan 2026 15:49:31 +0000 Subject: [PATCH 3/3] Fixing the previous unit test for issue 479 --- tests/post/test_manipulate_tally.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/post/test_manipulate_tally.py b/tests/post/test_manipulate_tally.py index 8da35f40..0ce0fc83 100644 --- a/tests/post/test_manipulate_tally.py +++ b/tests/post/test_manipulate_tally.py @@ -403,4 +403,4 @@ def test_mass(): masses = {1: 2.0, 2: 2.0, 3: 2.0, 4: 2.0, 5: 2.0} result = mass(df, masses) assert 3.65062e-06 == pytest.approx(result["Value"][0], rel=1e-5) - assert 0.05 == pytest.approx(result["Error"][0], rel=1e-5) + assert 0.1 == pytest.approx(result["Error"][0], rel=1e-5)