From 92eb5f2b6de49b7d0badddaa835bafe59c187d7c Mon Sep 17 00:00:00 2001 From: "Moorehead, Jude" Date: Tue, 10 Feb 2026 09:39:26 +0000 Subject: [PATCH 1/3] The mass factor is already included in the scale factor, so this was giving the wrong result. --- .../default_cfg/benchmarks_pp/raw/openmc/FNG-HCPB.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/jade/resources/default_cfg/benchmarks_pp/raw/openmc/FNG-HCPB.yaml b/src/jade/resources/default_cfg/benchmarks_pp/raw/openmc/FNG-HCPB.yaml index 5e0774e9..77a7a61b 100644 --- a/src/jade/resources/default_cfg/benchmarks_pp/raw/openmc/FNG-HCPB.yaml +++ b/src/jade/resources/default_cfg/benchmarks_pp/raw/openmc/FNG-HCPB.yaml @@ -126,14 +126,12 @@ Reaction rate: Tritium activity: concat_option: no_action 84: - - [mass, {}] - [scale, {'factor': 2.57042574E+07}] - [replace, {'column': 'Cells', 'values': *depth_h3}] Tritium activity Pellet: concat_option: no_action 84: - - [mass, {}] - [scale, {'factor': 2.57042574E+07}] - [add_column_with_dict, {'ref_column': 'Cells', 'values': *depth_h3d, new_columns: [ 'Distance','Pellet']}] - [replace, {'column': 'Cells', 'values': *depth_h3}] \ No newline at end of file From 205302f996f0ba5cb5bb4b17194aa75d137ec187 Mon Sep 17 00:00:00 2001 From: "Moorehead, Jude" Date: Mon, 16 Feb 2026 16:18:16 +0000 Subject: [PATCH 2/3] trying change to make code compatible with pandas 3.0.0 --- src/jade/post/manipulate_tally.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/jade/post/manipulate_tally.py b/src/jade/post/manipulate_tally.py index 7c36e01a..638ef308 100644 --- a/src/jade/post/manipulate_tally.py +++ b/src/jade/post/manipulate_tally.py @@ -68,10 +68,22 @@ def condense_groups( """ tally["abs err"] = tally["Error"] * tally["Value"] # this divides the entries in coarse energy bins + tally["coarse_bin"] = pd.cut(tally[group_column], bins=bins, right=False) + tally = tally.drop(columns=[group_column]) tally[group_column] = tally["coarse_bin"].apply( - lambda x: f"{x.left:g} - {x.right:g}" + lambda x: f"{x.left:g} - {x.right:g}" if pd.notna(x) else "NaN" + ) + ''' + labels = [f"{bins[i]:g} - {bins[i+1]:g}" for i in range(len(bins) - 1)] + + tally[group_column] = pd.cut( + tally[group_column], + bins=bins, + right=False, + labels=labels, ) + ''' del tally["coarse_bin"] grouped = tally.groupby(group_column, observed=False).agg( {"Value": "sum", "abs err": lambda x: math.sqrt((x**2).sum())} From 90a89273361b4a9251ba6f8d07c3ed74200b8aed Mon Sep 17 00:00:00 2001 From: "Moorehead, Jude" Date: Mon, 16 Feb 2026 16:27:10 +0000 Subject: [PATCH 3/3] trying change to make code compatible with pandas 3.0.0, manually adding nan --- src/jade/post/manipulate_tally.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jade/post/manipulate_tally.py b/src/jade/post/manipulate_tally.py index 638ef308..fcd5e756 100644 --- a/src/jade/post/manipulate_tally.py +++ b/src/jade/post/manipulate_tally.py @@ -72,7 +72,7 @@ def condense_groups( tally["coarse_bin"] = pd.cut(tally[group_column], bins=bins, right=False) tally = tally.drop(columns=[group_column]) tally[group_column] = tally["coarse_bin"].apply( - lambda x: f"{x.left:g} - {x.right:g}" if pd.notna(x) else "NaN" + lambda x: f"{x.left:g} - {x.right:g}" if pd.notna(x) else np.nan ) ''' labels = [f"{bins[i]:g} - {bins[i+1]:g}" for i in range(len(bins) - 1)]