Improve isotopes and sources

This commit is contained in:
Pim Nelissen
2026-02-13 14:55:42 +01:00
parent 26f96b06fe
commit 49a0dcd301
2 changed files with 10 additions and 9 deletions

View File

@ -3,7 +3,7 @@ from .isotope import Isotope
class CS137(Isotope): class CS137(Isotope):
def __init__(self): def __init__(self):
super.__init__( super().__init__(
name="Cs-137", name="Cs-137",
E=661.66, E=661.66,
b=0.851 b=0.851

View File

@ -11,22 +11,23 @@ class PointSource(BaseObject):
def __init__( def __init__(
self, self,
pos: tuple,
activity: int, activity: int,
isotope: Isotope, isotope: Isotope,
pos: tuple[float, float, float] = (0, 0, 0),
name: str | None = None, name: str | None = None,
color: str = "red"): color: str = 'red'
):
"""A point source. """A point source.
Args: Args:
pos (tuple): a position vector of length 3 (x,y,z).
activity (int): Activity A in MBq. activity (int): Activity A in MBq.
isotope (Isotope): The isotope. isotope (Isotope): The isotope.
name (str | None, optional): Can give the source a unique name. pos (tuple[float, float, float], optional):
Defaults to None, making the name sequential. Position of the PointSource.
(Source-1, Source-2, etc.). name (str, optional): Can give the source a unique name.
color (str, optional): Matplotlib compatible color string. If not provided, point sources are sequentially
Defaults to "red". named: Source1, Source2, ...
color (str, optional): Matplotlib compatible color string
""" """
self.id = PointSource._id_counter self.id = PointSource._id_counter