feat: add CLI options for custom CSV separator and normalize-to-one branch normalization

This commit is contained in:
2026-07-06 17:32:56 +03:00
parent 1b4d418b5f
commit 6dc1e3924d
5 changed files with 78 additions and 11 deletions
+6
View File
@@ -87,6 +87,10 @@ class SpectrumConfig:
intensity_cutoff: float = (
0.0 # Ignore branches below this fraction (default: 0.0 = all)
)
# CSV output options
csv_separator: str = ',' # Default separator for CSV output
normalize_to_one: bool = False # If True, normalize each branch to 1, ignoring intensity
class BetaSpectrum:
@@ -321,6 +325,8 @@ class BetaSpectrum:
# Create per-branch calculators
branch_spectra: List[BetaSpectrum] = []
if config.branches is None:
raise ValueError("branches must be provided for multi-branch mode")
for i, branch in enumerate(config.branches):
if logger:
logger.info(