Module Contents

This documentation is a listing of the ZapMeNot classes that are useful to the shielding practitioner. Each class description includes the parameters necessary to create an object of that class as well as the methods (i.e. functions) that the class provides.

Note that some classes are based on other ZapMeNot classes. The base classes may be selected to show additional methods available from the base class. For example. the BoxSource class is based on both the Source and shield.Box classes. An instance of the BoxSource class includes all of the methods available from the Source and shield.Box classes.

ZapMeNot Isotope

class zapmenot.isotope.Isotope(name)[source]

Bases: object

Encapsulates isotope data from the IsotopeLibrary.yml file.

The object is intended to make available the half life and photon intensities of the requested isotope.

Parameters:

name (str) – The isotope to be extracted from the isotope library.

class Atom

Bases: TypedDict

property photons: List[List[float]] | None

A list of photon energies (in MeV) and intensities per decay.

property name: str

The name of the isotope.

property half_life: float

The half life of the isotope in seconds.

property key_progeny: Dict[str, float] | None

The list of progeny that can be in secular or transient equilibrium.

ZapMeNot Material

class zapmenot.material.Material(name)[source]

Bases: object

Encapsulates the data in the MaterialLibrary.yml file.

Makes available the mean free path, mass energy absorption coefficient, the mass attenuation coefficient, and the exposure buildup factor of the requested material.

Parameters:

name (str) – The material to be extracted from the material library

class Material_Specification

Bases: TypedDict

property name: str

The name of the material

property density: float

The density of the material in g/cm3

get_mfp(energy, distance)[source]

Calculates the mean free path for a given distance and photon energy

Parameters:
  • energy (float) – The photon energy in MeV

  • distance (float) – The distance through the material in cm

Return type:

float

Returns:

The mean free path in the material

get_mass_atten_coeff(energy)[source]

Calculates the mass attenuation coefficient at the given energy

Parameters:

energy (float) – The photon energy in MeV

Raises:

ValueError – Photon energy is out of range

Return type:

float

Returns:

The mass attenuation coefficient in cm2/g

get_mass_energy_abs_coeff(energy)[source]

Calculates the mass energy absorption coefficient at the given energy

Parameters:

energy (float) – The photon energy in MeV

Raises:

ValueError – Photon energy is out of range

Return type:

float

Returns:

The mass energy absorption coefficient in cm2/g

get_buildup_factor(energy, mfps, formula='GP')[source]

Calculates the photon buildup factor at the given energy and mfp

Parameters:
  • energy (float) – The photon energy in MeV

  • mfps (Union[float, ndarray]) – One or more mean free path values through the material

  • formula (str) – The format of the buildup factor (only ‘GP’ is currently supported)

Raises:
  • ValueError – Photon energy is out of range

  • ValueError – Only GP buildup factors are currently supported

Return type:

Union[float, ndarray]

Returns:

A vector of photon exposure buildup factors in air, one for each specified mfp

ZapMeNot Ray

class zapmenot.ray.FiniteLengthRay(start, end)[source]

Bases: object

Represents a ray in three-space.

The FiniteLengthRay object has a defined starting point, a defined end, and a resulting direction.

Parameters:
  • start (Sequence[float]) – Defines the starting point of the ray in cartesian coordinates.

  • end (Sequence[float]) – Defines the ending point of the ray in cartesian coordinates.

property start: Sequence[float]

A list defining the starting point of the ray in cartesian coordinates.

property end: Sequence[float]

A list defining the ending point of the ray in cartesian coordinates.

ZapMeNot Detector

class zapmenot.detector.Detector(x, y, z)[source]

Bases: object

A location used to calculate exposure

Parameters:
  • x (float) – X coordinate of detector location in cartesian coordinates

  • y (float) – Y coordinate of detector location in cartesian coordinates

  • z (float) – Z coordinate of detector location in cartesian coordinates

property location: Tuple[float, float, float]

The detector location in cartesian coordinates

draw()[source]

Creates a display object

Return type:

Optional[Any]

Returns:

A degenerate line object representing the detector.

ZapMeNot Shield

class zapmenot.shield.Shield(material_name=None, density=None)[source]

Bases: ABC

Abtract class to model a photon shield.

Parameters:
  • material_name (str | None)

  • density (float | None)

abstractmethod is_hollow()[source]

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

abstractmethod get_crossing_mfp(a_ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • a_ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

abstractmethod draw()[source]

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

class zapmenot.shield.SemiInfiniteShield(material_name=None, density=None)[source]

Bases: Shield

Abtract class to model a photon shield.

Parameters:
  • material_name (str | None)

  • density (float | None)

abstractmethod draw()

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

abstractmethod get_crossing_mfp(a_ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • a_ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

abstractmethod is_hollow()

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

class zapmenot.shield.SemiInfiniteXSlab(material_name, x_start, x_end, density=None)[source]

Bases: SemiInfiniteShield

A semi-infinite slab shield perpendicular to the X axis.

Parameters:
  • material_name (str) – Name of the material composing the shield.

  • x_start (float) – X axis location of the inner edge of the shield.

  • x_end (float) – X axis location of the outer edge of the shield.

  • density (Optional[float]) – Material density in g/cm3.

is_hollow()[source]

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

get_crossing_mfp(ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • a_ray – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

  • ray (FiniteLengthRay)

Return type:

float

draw()[source]

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

class zapmenot.shield.Sphere(material_name, sphere_center, sphere_radius, density=None)[source]

Bases: Shield

A spherical shield.

Parameters:
  • material_name (str) – Name of the material composing the shield.

  • sphere_center (List[float]) – Vector location of the center of the sphere in cartesian coordinates.

  • sphere_radius (float) – Radius of the shield.

  • density (Optional[float]) – Material density in g/cm3.

is_hollow()[source]

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

get_crossing_mfp(ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

draw()[source]

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

class zapmenot.shield.Shell(material_name, sphere, thickness, density=None)[source]

Bases: Shield

A shell that surrounds a spherical shield or source.

Parameters:
  • material_name (str) – Name of the material composing the shield.

  • sphere (Sphere) – The spherical shield or source that defines the inner boundary of the shell.

  • thickness (float) – The thickness of the shell.

  • density (Optional[float]) – Material density in g/cm3.

is_hollow()[source]

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

get_crossing_mfp(ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

draw()[source]

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

class zapmenot.shield.Box(material_name, box_center, box_dimensions, density=None)[source]

Bases: Shield

A rectangular polyhedron shield.

All sides of the box shield must be axis-aligned.

Parameters:
  • material_name (str) – Name of the material composing the shield.

  • box_center (list[float]) – Vector location of the center of the box in cartesian coordiantes.

  • box_dimensions (list[float]) – Vector holding the dimensions of the box.

  • density (Optional[float]) – Material density in g/cm3.

is_hollow()[source]

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

get_crossing_mfp(ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

draw()[source]

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

class zapmenot.shield.InfiniteAnnulus(material_name, cylinder_origin, cylinder_axis, cylinder_inner_radius, cylinder_outer_radius, density=None)[source]

Bases: SemiInfiniteShield

An annular shield of infinite length

Parameters:
  • material_name (str) – Name of the material composing the shield.

  • cylinder_origin (list[float]) – X, Y, and Z coordinates of the point on the cylinder centerline.

  • cylinder_axis (list[float]) – X, Y, and Z vector components of the cylinder axis.

  • cylinder_inner_radius (float) – Radius of the annulus inner surface.

  • cylinder_outer_radius (float) – Radius of the annulus outer surface.

  • density (Optional[float]) – Material density in g/cm3.

is_hollow()[source]

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

get_crossing_mfp(ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

draw()[source]

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

class zapmenot.shield.YAlignedInfiniteAnnulus(material_name, cylinder_center, cylinder_inner_radius, cylinder_outer_radius, density=None)[source]

Bases: InfiniteAnnulus

An annular shield of infinite length aligned with the Y axis

Parameters:
  • material_name (str) – Name of the material composing the shield.

  • cylinder_center (list[float]) – X, Y, and Z coordinates of the point on the cylinder centerline.

  • cylinder_inner_radius (float) – Radius of the annulus inner surface.

  • cylinder_outer_radius (float) – Radius of the annulus outer surface.

  • density (Optional[float]) – Material density in g/cm3.

draw()

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

is_hollow()

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

class zapmenot.shield.XAlignedInfiniteAnnulus(material_name, cylinder_center, cylinder_inner_radius, cylinder_outer_radius, density=None)[source]

Bases: InfiniteAnnulus

An annular shield of infinite length aligned with the X axis

Parameters:
  • material_name (str) – Name of the material composing the shield.

  • cylinder_center (list[float]) – X, Y, and Z coordinates of the point on the cylinder centerline.

  • cylinder_inner_radius (float) – Radius of the annulus inner surface.

  • cylinder_outer_radius (float) – Radius of the annulus outer surface.

  • density (Optional[float]) – Material density in g/cm3.

draw()

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

is_hollow()

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

class zapmenot.shield.ZAlignedInfiniteAnnulus(material_name, cylinder_center, cylinder_inner_radius, cylinder_outer_radius, density=None)[source]

Bases: InfiniteAnnulus

An annular shield of infinite length aligned with the Z axis

Parameters:
  • material_name (str) – Name of the material composing the shield.

  • cylinder_center (list[float]) – X, Y, and Z coordinates of the point on the cylinder centerline.

  • cylinder_inner_radius (float) – Radius of the annulus inner surface.

  • cylinder_outer_radius (float) – Radius of the annulus outer surface.

  • density (Optional[float]) – Material density in g/cm3.

draw()

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

is_hollow()

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

class zapmenot.shield.CappedCylinder(material_name, cylinder_start, cylinder_end, cylinder_radius, density=None)[source]

Bases: Shield

A cylindrical shield of finite length

Parameters:
  • material_name (str) – Name of the material composing the shield.

  • cylinder_start (list[float]) – X, Y, and Z coordinates of the center of one cylinder end.

  • cylinder_end (list[float]) – X, Y, and Z coordinates of the center of another cylinder end.

  • cylinder_radius (float) – Radius of the cylinder.

  • density (Optional[float]) – Material density in g/cm3.

is_hollow()[source]

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

get_crossing_mfp(ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

draw()[source]

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

class zapmenot.shield.YAlignedCylinder(material_name, cylinder_center, cylinder_length, cylinder_radius, density=None)[source]

Bases: CappedCylinder

A cylindrical shield of finite length aligned with the Y axis

Parameters:
  • material_name (str) – Name of the material composing the shield.

  • cylinder_center (list[float]) – X, Y, and Z coordinates of the center of the cylinder.

  • cylinder_length (float) – The length of the cylinder.

  • cylinder_radius (float) – The radius of the cylinder.

  • density (Optional[float]) – Material density in g/cm3.

draw()

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

is_hollow()

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

class zapmenot.shield.XAlignedCylinder(material_name, cylinder_center, cylinder_length, cylinder_radius, density=None)[source]

Bases: CappedCylinder

A cylindrical shield of finite length aligned with the X axis

Parameters:
  • material_name (str) – Name of the material composing the shield.

  • cylinder_center (list[float]) – X, Y, and Z coordinates of the center of the cylinder.

  • cylinder_length (float) – The length of the cylinder.

  • cylinder_radius (float) – The radius of the cylinder.

  • density (Optional[float]) – Material density in g/cm3.

draw()

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

is_hollow()

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

class zapmenot.shield.ZAlignedCylinder(material_name, cylinder_center, cylinder_length, cylinder_radius, density=None)[source]

Bases: CappedCylinder

A cylindrical shield of finite length aligned with the Z axis

Parameters:
  • material_name (str) – Name of the material composing the shield.

  • cylinder_center (list[float]) – X, Y, and Z coordinates of the center of the cylinder.

  • cylinder_length (float) – The length of the cylinder.

  • cylinder_radius (float) – The radius of the cylinder.

  • density (Optional[float]) – Material density in g/cm3.

draw()

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

is_hollow()

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

ZapMeNot Source

class zapmenot.source.GroupOption(*values)[source]

Bases: Enum

Set of possible energy group options. The options include ‘group’, ‘discrete’, and ‘hybrid’.

class zapmenot.source.Source[source]

Bases: ABC

Abtract class to model a radiation source.

property grouping: GroupOption

State defining the photon energy group option.

property include_key_progeny: bool

State defining if key progeny should be included.

add_isotope_curies(new_isotope, curies)[source]

Adds an isotope and activity in curies to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • curies (float) – The activity in curies.

Return type:

None

add_isotope_bq(new_isotope, becquerels)[source]

Adds an isotope and activity in becquerels to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • becquerels (float) – The activity in becquerels.

Return type:

None

add_photon(energy, intensity)[source]

Adds a photon and intensity to the photon list

Parameters:
  • energy (float) – The photon energy in MeV.

  • intensity (float) – The intensity in photons/sec.

Return type:

None

list_isotopes()[source]

Returns a list of isotopes in the source.

Return type:

List[Tuple[str, float]]

Returns:

List of isotope tuples, each tuple containing a Isotope object and an activity in Bq.

list_discrete_photons()[source]

Returns a list of individual photons in the source.

The list includes only those photons that have been added individually to the source. It does not include the photons that result from the isotopes added to the source.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

get_photon_source_list()[source]

Returns a list of photons in the source

This list of photons combines the Isotopes and the unique_photons specified in the Source definition. The photon intensities are scaled to an integral over the source volume.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

property points_per_dimension: List[int]

Number of source points per dimension.

class zapmenot.source.LineSource(start, end)[source]

Bases: Shield, Source

Models a line radiation source

Parameters:
  • start (list[float]) – Cartiesian X, Y, and Z coordinates of the starting point of the line source.

  • end (list[float]) – Cartiesian X, Y, and Z coordinates of the ending point of the line source.

is_hollow()[source]

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

get_crossing_mfp(ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the source

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

int

Returns:

Mean free path in centimeters.

draw()[source]

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

add_isotope_bq(new_isotope, becquerels)

Adds an isotope and activity in becquerels to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • becquerels (float) – The activity in becquerels.

Return type:

None

add_isotope_curies(new_isotope, curies)

Adds an isotope and activity in curies to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • curies (float) – The activity in curies.

Return type:

None

add_photon(energy, intensity)

Adds a photon and intensity to the photon list

Parameters:
  • energy (float) – The photon energy in MeV.

  • intensity (float) – The intensity in photons/sec.

Return type:

None

get_photon_source_list()

Returns a list of photons in the source

This list of photons combines the Isotopes and the unique_photons specified in the Source definition. The photon intensities are scaled to an integral over the source volume.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

property grouping: GroupOption

State defining the photon energy group option.

property include_key_progeny: bool

State defining if key progeny should be included.

list_discrete_photons()

Returns a list of individual photons in the source.

The list includes only those photons that have been added individually to the source. It does not include the photons that result from the isotopes added to the source.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

list_isotopes()

Returns a list of isotopes in the source.

Return type:

List[Tuple[str, float]]

Returns:

List of isotope tuples, each tuple containing a Isotope object and an activity in Bq.

property points_per_dimension: List[int]

Number of source points per dimension.

class zapmenot.source.PointSource(x, y, z)[source]

Bases: Shield, Source

Models a point radiation source

Parameters:
  • x (float) – Cartesian X coordinate of the point source.

  • y (float) – Cartesian Y coordinate of the point source.

  • z (float) – Cartesian Z coordinate of the point source.

is_hollow()[source]

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

get_crossing_mfp(ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the source

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

int

Returns:

Mean free path in centimeters.

draw()[source]

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

add_isotope_bq(new_isotope, becquerels)

Adds an isotope and activity in becquerels to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • becquerels (float) – The activity in becquerels.

Return type:

None

add_isotope_curies(new_isotope, curies)

Adds an isotope and activity in curies to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • curies (float) – The activity in curies.

Return type:

None

add_photon(energy, intensity)

Adds a photon and intensity to the photon list

Parameters:
  • energy (float) – The photon energy in MeV.

  • intensity (float) – The intensity in photons/sec.

Return type:

None

get_photon_source_list()

Returns a list of photons in the source

This list of photons combines the Isotopes and the unique_photons specified in the Source definition. The photon intensities are scaled to an integral over the source volume.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

property grouping: GroupOption

State defining the photon energy group option.

property include_key_progeny: bool

State defining if key progeny should be included.

list_discrete_photons()

Returns a list of individual photons in the source.

The list includes only those photons that have been added individually to the source. It does not include the photons that result from the isotopes added to the source.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

list_isotopes()

Returns a list of isotopes in the source.

Return type:

List[Tuple[str, float]]

Returns:

List of isotope tuples, each tuple containing a Isotope object and an activity in Bq.

property points_per_dimension: List[int]

Number of source points per dimension.

class zapmenot.source.SphereSource(material_name, sphere_center, sphere_radius, density=None)[source]

Bases: Sphere, Source

Models a Spherical source.

Parameters:
  • material_name (str) – Name of the material composing the source.

  • sphere_center (list[float]) – x, y, and z coordinates of the sphere’s center.

  • sphere_radius (float) – radius of the sphere.

  • density (Optional[float]) – Material density in g/cm3.

property points_per_dimension: List[int]

Number of source points per dimension.

add_isotope_bq(new_isotope, becquerels)

Adds an isotope and activity in becquerels to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • becquerels (float) – The activity in becquerels.

Return type:

None

add_isotope_curies(new_isotope, curies)

Adds an isotope and activity in curies to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • curies (float) – The activity in curies.

Return type:

None

add_photon(energy, intensity)

Adds a photon and intensity to the photon list

Parameters:
  • energy (float) – The photon energy in MeV.

  • intensity (float) – The intensity in photons/sec.

Return type:

None

draw()

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

get_photon_source_list()

Returns a list of photons in the source

This list of photons combines the Isotopes and the unique_photons specified in the Source definition. The photon intensities are scaled to an integral over the source volume.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

property grouping: GroupOption

State defining the photon energy group option.

property include_key_progeny: bool

State defining if key progeny should be included.

is_hollow()

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

list_discrete_photons()

Returns a list of individual photons in the source.

The list includes only those photons that have been added individually to the source. It does not include the photons that result from the isotopes added to the source.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

list_isotopes()

Returns a list of isotopes in the source.

Return type:

List[Tuple[str, float]]

Returns:

List of isotope tuples, each tuple containing a Isotope object and an activity in Bq.

class zapmenot.source.BoxSource(material_name, box_center, box_dimensions, density=None)[source]

Bases: Box, Source

Models a Axis-Aligned rectangular box source

Parameters:
  • material_name (str) – Name of the material composing the source.

  • box_center (list[float]) – Vector location of the center of the box in cartesian coordiantes.

  • box_dimensions (list[float]) – Vector holding the dimensions of the box.

  • density (Optional[float]) – Material density in g/cm3.

add_isotope_bq(new_isotope, becquerels)

Adds an isotope and activity in becquerels to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • becquerels (float) – The activity in becquerels.

Return type:

None

add_isotope_curies(new_isotope, curies)

Adds an isotope and activity in curies to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • curies (float) – The activity in curies.

Return type:

None

add_photon(energy, intensity)

Adds a photon and intensity to the photon list

Parameters:
  • energy (float) – The photon energy in MeV.

  • intensity (float) – The intensity in photons/sec.

Return type:

None

draw()

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

get_photon_source_list()

Returns a list of photons in the source

This list of photons combines the Isotopes and the unique_photons specified in the Source definition. The photon intensities are scaled to an integral over the source volume.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

property grouping: GroupOption

State defining the photon energy group option.

property include_key_progeny: bool

State defining if key progeny should be included.

is_hollow()

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

list_discrete_photons()

Returns a list of individual photons in the source.

The list includes only those photons that have been added individually to the source. It does not include the photons that result from the isotopes added to the source.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

list_isotopes()

Returns a list of isotopes in the source.

Return type:

List[Tuple[str, float]]

Returns:

List of isotope tuples, each tuple containing a Isotope object and an activity in Bq.

property points_per_dimension: List[int]

Number of source points per dimension.

class zapmenot.source.ZAlignedCylinderSource(material_name, cylinder_center, cylinder_length, cylinder_radius, density=None)[source]

Bases: ZAlignedCylinder, Source

Models a cylindrical source axis-aligned with the Z axis.

Parameters:
  • material_name (str) – Name of the material composing the source.

  • cylinder_center (list[float]) – X, Y, and Z coordinates of the center of the cylinder.

  • cylinder_length (float) – The length of the cylinder.

  • cylinder_radius (float) – The radius of the cylinder.

  • density (Optional[float]) – Material density in g/cm3.

add_isotope_bq(new_isotope, becquerels)

Adds an isotope and activity in becquerels to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • becquerels (float) – The activity in becquerels.

Return type:

None

add_isotope_curies(new_isotope, curies)

Adds an isotope and activity in curies to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • curies (float) – The activity in curies.

Return type:

None

add_photon(energy, intensity)

Adds a photon and intensity to the photon list

Parameters:
  • energy (float) – The photon energy in MeV.

  • intensity (float) – The intensity in photons/sec.

Return type:

None

draw()

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

get_photon_source_list()

Returns a list of photons in the source

This list of photons combines the Isotopes and the unique_photons specified in the Source definition. The photon intensities are scaled to an integral over the source volume.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

property grouping: GroupOption

State defining the photon energy group option.

property include_key_progeny: bool

State defining if key progeny should be included.

is_hollow()

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

list_discrete_photons()

Returns a list of individual photons in the source.

The list includes only those photons that have been added individually to the source. It does not include the photons that result from the isotopes added to the source.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

list_isotopes()

Returns a list of isotopes in the source.

Return type:

List[Tuple[str, float]]

Returns:

List of isotope tuples, each tuple containing a Isotope object and an activity in Bq.

property points_per_dimension: List[int]

Number of source points per dimension.

class zapmenot.source.YAlignedCylinderSource(material_name, cylinder_center, cylinder_length, cylinder_radius, density=None)[source]

Bases: YAlignedCylinder, Source

Models a cylindrical source axis-aligned with the Y axis.

Parameters:
  • material_name (str) – Name of the material composing the source.

  • cylinder_center (list[float]) – X, Y, and Z coordinates of the center of the cylinder.

  • cylinder_length (float) – The length of the cylinder.

  • cylinder_radius (float) – The radius of the cylinder.

  • density (Optional[float]) – Material density in g/cm3.

add_isotope_bq(new_isotope, becquerels)

Adds an isotope and activity in becquerels to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • becquerels (float) – The activity in becquerels.

Return type:

None

add_isotope_curies(new_isotope, curies)

Adds an isotope and activity in curies to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • curies (float) – The activity in curies.

Return type:

None

add_photon(energy, intensity)

Adds a photon and intensity to the photon list

Parameters:
  • energy (float) – The photon energy in MeV.

  • intensity (float) – The intensity in photons/sec.

Return type:

None

draw()

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

get_photon_source_list()

Returns a list of photons in the source

This list of photons combines the Isotopes and the unique_photons specified in the Source definition. The photon intensities are scaled to an integral over the source volume.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

property grouping: GroupOption

State defining the photon energy group option.

property include_key_progeny: bool

State defining if key progeny should be included.

is_hollow()

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

list_discrete_photons()

Returns a list of individual photons in the source.

The list includes only those photons that have been added individually to the source. It does not include the photons that result from the isotopes added to the source.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

list_isotopes()

Returns a list of isotopes in the source.

Return type:

List[Tuple[str, float]]

Returns:

List of isotope tuples, each tuple containing a Isotope object and an activity in Bq.

property points_per_dimension: List[int]

Number of source points per dimension.

class zapmenot.source.XAlignedCylinderSource(material_name, cylinder_center, cylinder_length, cylinder_radius, density=None)[source]

Bases: XAlignedCylinder, Source

Models a cylindrical source axis-aligned with the X axis.

Parameters:
  • material_name (str) – Name of the material composing the source.

  • cylinder_center (list[float]) – X, Y, and Z coordinates of the center of the cylinder.

  • cylinder_length (float) – The length of the cylinder.

  • cylinder_radius (float) – The radius of the cylinder.

  • density (Optional[float]) – Material density in g/cm3.

add_isotope_bq(new_isotope, becquerels)

Adds an isotope and activity in becquerels to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • becquerels (float) – The activity in becquerels.

Return type:

None

add_isotope_curies(new_isotope, curies)

Adds an isotope and activity in curies to the isotope list

Parameters:
  • new_isotope (str) – The isotope to be added to the source.

  • curies (float) – The activity in curies.

Return type:

None

add_photon(energy, intensity)

Adds a photon and intensity to the photon list

Parameters:
  • energy (float) – The photon energy in MeV.

  • intensity (float) – The intensity in photons/sec.

Return type:

None

draw()

Creates a display object

Return type:

PolyData | None

Returns:

A display object representing the shield.

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (FiniteLengthRay) – The finite length ray that is checked for intersections with the shield.

  • photon_energy (float) – The photon energy in MeV

Return type:

float

Returns:

Mean free path in centimeters.

get_photon_source_list()

Returns a list of photons in the source

This list of photons combines the Isotopes and the unique_photons specified in the Source definition. The photon intensities are scaled to an integral over the source volume.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

property grouping: GroupOption

State defining the photon energy group option.

property include_key_progeny: bool

State defining if key progeny should be included.

is_hollow()

Returns true if the body is annular or hollow, false otherwise

Return type:

bool

list_discrete_photons()

Returns a list of individual photons in the source.

The list includes only those photons that have been added individually to the source. It does not include the photons that result from the isotopes added to the source.

Return type:

List[Tuple[float, float]]

Returns:

List of photon tuples, each tuple containing a photon energy in MeV and an activity in Bq.

list_isotopes()

Returns a list of isotopes in the source.

Return type:

List[Tuple[str, float]]

Returns:

List of isotope tuples, each tuple containing a Isotope object and an activity in Bq.

property points_per_dimension: List[int]

Number of source points per dimension.

ZapMeNot Model

class zapmenot.model.Model[source]

Bases: object

Performs point-kernel shielding analysis.

The Model class combines various shielding elements to perform the point-kernel photon shielding analysis. These elements include sources, shields, and detectors.

set_filler_material(filler_material, density=None)[source]

Set the filler material used by the model

Parameters:
  • filler_material (str) – The material to be used.

  • density (Optional[float]) – The density of the material in g/cm3.

Return type:

None

add_source(new_source)[source]

Set the source used by the model. Only one source instance is allowed per model. Source can be replaced by calling this method.

Parameters:

new_source (Source) – The source to be used.

Return type:

None

add_shield(new_shield)[source]

Add a shield to the collection of shields used by the model.

Parameters:

new_shield (Shield) – The shield to be added.

Return type:

None

add_detector(new_detector)[source]

Set the detector used by the model. Only one detector instance is allowed per model. Detector can be replaced by calling this method.

Parameters:

new_detector (Detector) – The detector to be used in the model.

Return type:

None

set_buildup_factor_material(new_material)[source]

Set the material used to calculation exposure buildup factors.

Parameters:

new_material (Material) – The material to be used in buildup factor calculations.

Return type:

None

calculate_exposure()[source]

Calculates the exposure at the detector location.

Note: Significant use of Numpy arrays to speed up evaluating the dose from each source point. A “for loop” is used to loop through photon energies, but many of the iterations through all source points is performed using matrix math.

Return type:

float

Returns:

The exposure in units of mR/hr.

generate_summary()[source]

Calculates the energy flux and exposure at the detector location.

Note: Significant use of Numpy arrays to speed up evaluating the dose from each source point. A “for loop” is used to loop through photon energies, but many of the iterations through all source points is performed using matrix math.

Return type:

List[List[float]]

Returns:

List, by photon energy, of photon energy, photon emmission rate, uncollided energy flux, uncollided exposure, and total exposure

display()[source]

Produces a graphic display of the model.

Return type:

None