diff --git a/src/pg_rad/isotopes/presets.py b/src/pg_rad/isotopes/presets.py index 9d07a65..d8135d6 100644 --- a/src/pg_rad/isotopes/presets.py +++ b/src/pg_rad/isotopes/presets.py @@ -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 diff --git a/src/pg_rad/objects/sources.py b/src/pg_rad/objects/sources.py index ee47509..9361f1f 100644 --- a/src/pg_rad/objects/sources.py +++ b/src/pg_rad/objects/sources.py @@ -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