Remove 'universal_' prefix from CSV column names in multi-branch mode

Universal components (Fermi, Screening, etc.) are exported under their
plain names — no redundant prefix needed.
This commit is contained in:
2026-05-08 15:54:13 +03:00
parent a5144f2c33
commit c404d83418
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1582,10 +1582,10 @@ class BetaSpectrumAnalyzer:
for comp_name, values in branch_comps.items():
data[f"branch_{i+1}_{comp_name}"] = values
# Universal components only (skip per-branch keys)
# Universal components (same for all branches — no prefix needed)
for name, values in components.items():
if not name.startswith("branch_"):
data[f"universal_{name}"] = values
data[name] = values
else:
# Single-branch mode: standard export
for name, values in components.items():
+1 -1
View File
@@ -479,7 +479,7 @@ class TestMultiBranchCSVExport:
assert "branch_2_transition" not in df.columns
# Should have universal columns
assert "universal_Fermi" in df.columns
assert "Fermi" in df.columns
def test_single_branch_csv_columns(self, tmp_path):
"""Single-branch CSV should have standard columns."""