refactor: refine CLI options and enhance debug logging

- Remove --mode, --transition-type, and --decay-index CLI flags
  (parameters now come from ENSDF data or custom JSON input)
- Clarify energy units in all CLI help text (MeV throughout, keV for detector params)
- Enhance logging verbosity:
  - -v (INFO): shows source, component initialization, workflow steps
  - -vv (DEBUG): shows detailed internals of all spectrum components
    (parameters, evaluation counts, input/output ranges)
- Improve CSV headers with element notation (e.g. Tc99 -> Ru99)
- Add CONVENTIONS.md documenting energy unit and logging conventions
- Update TODO.md with completion status
This commit is contained in:
2026-05-05 09:08:08 +03:00
parent eb52c3b918
commit 330ebddaef
14 changed files with 470 additions and 78 deletions
+8
View File
@@ -23,6 +23,14 @@ class SpectrumComponent(ABC):
def __init__(self, logger: Optional["logging.Logger"] = None) -> None:
self._logger = logger
self._log_component_info()
def _log_component_info(self) -> None:
"""Log component identification at INFO level."""
if self._logger is None:
return
class_name = self.__class__.__name__
self._logger.info("Component initialized: %s", class_name)
@abstractmethod
def __call__(self, W: ArrayLike) -> ArrayLike: