mirror of
https://github.com/pim-n/pg-rad
synced 2026-03-11 19:58:11 +01:00
Improve isotopes and sources
This commit is contained in:
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user