Files
beta_shape_pnpi/beta_spectrum/base.py
T

20 lines
404 B
Python

# base.py
from __future__ import annotations
from abc import ABC, abstractmethod
import numpy as np
ArrayLike = np.ndarray
class SpectrumComponent(ABC):
"""
Base class for multiplicative components of beta-spectrum
"""
@abstractmethod
def __call__(self, W: ArrayLike) -> ArrayLike:
"""
Evaluate component at total energy W (in m_e units)
"""
pass