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