- Fix chi2 calculation bug in calibration.py (remove incorrect coeffs[::-1] reversal in np.polyval) - Fix broken beta_spectrum/cli.py (remove orphaned detector response add_argument calls and unused imports) - Add ExpSpectrum.apply_calibration() and EnergyCalibrator.from_am241_spectrum() - Add LivetimeDetermination class for pulser-based livetime - Add SpectrumPipeline orchestration (read→subtract→calibrate→livetime→validate) - Add ROOT I/O with PyROOT primary + uproot fallback - Add bs_exp CLI with process, livetime, export subcommands - Add exp_calibration notebook with pre-calibration visualization - Add comprehensive tests (73 passing) - Add bs_exp console script and [root] extra to pyproject.toml - Remove obsolete detector_response module and unused notebooks
43 lines
1.0 KiB
Python
43 lines
1.0 KiB
Python
"""
|
|
Experimental data handling for beta spectrometry.
|
|
|
|
Provides tools for loading, calibrating, and pre-processing
|
|
experimental spectra from detector readouts.
|
|
"""
|
|
|
|
from .spectrum import ExpSpectrum
|
|
from .calibration import EnergyCalibrator, CalibrationResult
|
|
from .fitters import GaussianFitter, PeakFitter
|
|
from .corrections import (
|
|
DeadTimeCorrection,
|
|
PileUpCorrection,
|
|
BackgroundSubtractor,
|
|
)
|
|
from .livetime import LivetimeDetermination, LivetimeResult
|
|
from .pipeline import (
|
|
SpectrumPipeline,
|
|
PipelineResult,
|
|
process_spectrum,
|
|
process_run_sequence,
|
|
)
|
|
from .root_io import write_spectrum, read_spectrum
|
|
|
|
__all__ = [
|
|
"ExpSpectrum",
|
|
"EnergyCalibrator",
|
|
"CalibrationResult",
|
|
"GaussianFitter",
|
|
"PeakFitter",
|
|
"DeadTimeCorrection",
|
|
"PileUpCorrection",
|
|
"BackgroundSubtractor",
|
|
"LivetimeDetermination",
|
|
"LivetimeResult",
|
|
"SpectrumPipeline",
|
|
"PipelineResult",
|
|
"process_spectrum",
|
|
"process_run_sequence",
|
|
"write_spectrum",
|
|
"read_spectrum",
|
|
]
|