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):
def __init__(self):
super.__init__(
super().__init__(
name="Cs-137",
E=661.66,
b=0.851

View File

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