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

ZapMeNot - a point kernel photon shielding library Copyright (C) 2019-2025 C. Alan Ford

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

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.

property half_life

The half life of the isotope in seconds.

Type:

str

property key_progeny

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

Type:

dict

property name

The name of the isotope.

Type:

str

property photons

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

Type:

list of list

ZapMeNot Material

ZapMeNot - a point kernel photon shielding library Copyright (C) 2019-2025 C. Alan Ford

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

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 – The material to be extracted from the material library

property density

The density of the material in g/cm3

Type:

float

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 (float, list, or numpy.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

Returns:

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

Return type:

float or numpy.ndarray

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

Returns:

The mass attenuation coefficient in cm2/g

Return type:

float

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

Returns:

The mass energy absorption coefficient in cm2/g

Return type:

float

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

Returns:

The mean free path in the material

Return type:

float

property name

The name of the material

Type:

str

ZapMeNot Ray

ZapMeNot - a point kernel photon shielding library Copyright (C) 2019-2025 C. Alan Ford

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

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 (list or tuple) – Defines the starting point of the ray in cartesian coordinates.

  • end (list or tuple) – Defines the ending point of the ray in cartesian coordinates.

property end

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

Type:

list

property start

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

Type:

list

ZapMeNot Detector

ZapMeNot - a point kernel photon shielding library Copyright (C) 2019-2025 C. Alan Ford

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

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

draw()[source]

Creates a display object

Returns:

A degenerate line object representing the detector.

Return type:

pyvista.PolyData

property location

The detector location in cartesian coordinates

Type:

tuple

ZapMeNot Shield

ZapMeNot - a point kernel photon shielding library Copyright (C) 2019-2025 C. Alan Ford

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

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 (material.Material) – Shield material type

  • box_center (list) – X, Y, and Z coordinates of the box center.

  • box_dimensions (list) – X, Y, and Z dimensions of the box.

  • density (float, optional) – Material density in g/cm3.

draw()[source]

Creates a display object

Returns:

A box object representing the box shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

is_hollow()[source]

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

is_infinite()[source]

Returns true if any dimension is infinite, false otherwise

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 (material.Material) – Shield material type

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

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

  • cylinder_radius (float) – Radius of the cylinder.

  • density (float, optional) – Material density in g/cm3.

draw()[source]

Creates a display object

Returns:

A cylinder object representing the capped cylinder shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

is_hollow()[source]

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

is_infinite()[source]

Returns true if any dimension is infinite, false otherwise

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

Bases: Shield

An annular shield of infinite length

Parameters:
  • material_name (material.Material) – Shield material type

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

  • cylinder_axis (list) – 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 (float, optional) – Material density in g/cm3.

draw()[source]

Creates a display object

Returns:

A boolean object representing the annular cylinder shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

is_hollow()[source]

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

is_infinite()[source]

Returns true if any dimension is infinite, false otherwise

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

Bases: Shield

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

Parameters:
  • material_name (material.Material) – Shield material type

  • 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 (float, optional) – Material density in g/cm3.

draw()[source]

Creates a display object

Returns:

A box object representing the slab shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

is_hollow()[source]

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

is_infinite()[source]

Returns true if any dimension is infinite, false otherwise

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

Bases: Shield

A shell that surrounds a spherical shield or source

contains(point)[source]

Returns true if the point is contained within the shell, otherwise false

draw()[source]

Creates a display object

Returns:

A Sphere object representing the sphere shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)[source]

returns the crossing mfp

is_hollow()[source]

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

is_infinite()[source]

Returns true if any dimension is infinite, false otherwise

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

Bases: ABC

Abtract class to model a photon shield.

Parameters:
  • material_name (material.Material, optional) – Shield material type

  • density (float, optional) – Material density in g/cm3

  • **kwargs – Arbitrary keyword arguments.

abstractmethod get_crossing_mfp(a_ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

abstractmethod is_hollow()[source]

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

abstractmethod is_infinite()[source]

Returns true if any dimension is infinite, false otherwise

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

Bases: Shield

A spherical shield.

Parameters:
  • material_name (material.Material) – Shield material type

  • sphere_center (list) – list of floats (x, y, and z coordinates).

  • sphere_radius (float) – radius of the shield.

  • density (float, optional) – Material density in g/cm3.

contains(point)[source]

Returns true if the point is contained within the sphere, otherwise false

draw()[source]

Creates a display object

Returns:

A Sphere object representing the sphere shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)[source]

returns the crossing mfp

is_hollow()[source]

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

is_infinite()[source]

Returns true if any dimension is infinite, false otherwise

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 (material.Material) – Shield material type

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

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

  • cylinder_radius (float) – Radius of the cylinder.

  • density (float, optional) – Material density in g/cm3.

draw()

Creates a display object

Returns:

A cylinder object representing the capped cylinder shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

is_hollow()

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

is_infinite()

Returns true if any dimension is infinite, false otherwise

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 (material.Material) – Shield material type

  • cylinder_center (list) – 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 (float, optional) – Material density in g/cm3.

draw()

Creates a display object

Returns:

A boolean object representing the annular cylinder shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

is_hollow()

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

is_infinite()

Returns true if any dimension is infinite, false otherwise

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 (material.Material) – Shield material type

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

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

  • cylinder_radius (float) – Radius of the cylinder.

  • density (float, optional) – Material density in g/cm3.

draw()

Creates a display object

Returns:

A cylinder object representing the capped cylinder shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

is_hollow()

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

is_infinite()

Returns true if any dimension is infinite, false otherwise

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 (material.Material) – Shield material type

  • cylinder_center (list) – 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 (float, optional) – Material density in g/cm3.

draw()

Creates a display object

Returns:

A boolean object representing the annular cylinder shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

is_hollow()

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

is_infinite()

Returns true if any dimension is infinite, false otherwise

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 (material.Material) – Shield material type

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

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

  • cylinder_radius (float) – Radius of the cylinder.

  • density (float, optional) – Material density in g/cm3.

draw()

Creates a display object

Returns:

A cylinder object representing the capped cylinder shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

is_hollow()

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

is_infinite()

Returns true if any dimension is infinite, false otherwise

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 (material.Material) – Shield material type

  • cylinder_center (list) – 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 (float, optional) – Material density in g/cm3.

draw()

Creates a display object

Returns:

A boolean object representing the annular cylinder shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

is_hollow()

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

is_infinite()

Returns true if any dimension is infinite, false otherwise

ZapMeNot Source

ZapMeNot - a point kernel photon shielding library Copyright (C) 2019-2025 C. Alan Ford

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

class zapmenot.source.BoxSource(**kwargs)[source]

Bases: Source, Box

Models a Axis-Aligned rectangular box source

Parameters:
  • material_name (zapmenot.material.Material) – Shield material type

  • box_center (list) – X, Y, and Z coordinates of the box center.

  • box_dimensions (list) – X, Y, and Z dimensions of the box.

  • density (float, optional) – Material density in g/cm3.

add_isotope_bq(new_isotope, becquerels)

Adds an isotope and activity in becquerels to the isotope list

Parameters:
add_isotope_curies(new_isotope, curies)

Adds an isotope and activity in curies to the isotope list

Parameters:
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.

draw()

Creates a display object

Returns:

A box object representing the box shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

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.

Returns:

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

Return type:

list of tuple

property grouping

State defining the photon energy group option.

Type:

GroupOption

property include_key_progeny

State defining if key progeny should be included.

Type:

bool

is_hollow()

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

is_infinite()

Returns true if any dimension is infinite, false otherwise

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.

Returns:

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

Return type:

list of tuple

list_isotopes()

Returns a list of isotopes in the source

Returns:

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

Return type:

list of tuple

property points_per_dimension

Number of source points per dimension.

Type:

list of integers

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

Bases: Enum

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

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

Bases: Source, Shield

Models a line radiation source

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

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

add_isotope_bq(new_isotope, becquerels)

Adds an isotope and activity in becquerels to the isotope list

Parameters:
add_isotope_curies(new_isotope, curies)

Adds an isotope and activity in curies to the isotope list

Parameters:
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.

draw()[source]

Creates a display object

Returns:

A line object representing the line source.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
Returns:

Always returns 0

Return type:

int

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.

Returns:

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

Return type:

list of tuple

property grouping

State defining the photon energy group option.

Type:

GroupOption

property include_key_progeny

State defining if key progeny should be included.

Type:

bool

is_hollow()[source]

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

is_infinite()[source]

Returns true if any dimension is infinite, false otherwise

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.

Returns:

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

Return type:

list of tuple

list_isotopes()

Returns a list of isotopes in the source

Returns:

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

Return type:

list of tuple

property points_per_dimension

Number of source points per dimension.

Type:

list of integers

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

Bases: Source, Shield

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.

add_isotope_bq(new_isotope, becquerels)

Adds an isotope and activity in becquerels to the isotope list

Parameters:
add_isotope_curies(new_isotope, curies)

Adds an isotope and activity in curies to the isotope list

Parameters:
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.

draw()[source]

Creates a display object

Returns:

A degenerate line object representing the point source.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)[source]

Calculates the mfp equivalent if a ray intersects the shield

Parameters:
  • ray (zapmenot.ray.FiniteLengthRay) – The finite length ray that is checked for intersections with the shield. Always returns 0 for the Point source.

  • photon_energy (float) – The photon energy in MeV

Returns:

Always returns 0

Return type:

int

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.

Returns:

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

Return type:

list of tuple

property grouping

State defining the photon energy group option.

Type:

GroupOption

property include_key_progeny

State defining if key progeny should be included.

Type:

bool

is_hollow()[source]

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

is_infinite()[source]

Returns true if any dimension is infinite, false otherwise

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.

Returns:

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

Return type:

list of tuple

list_isotopes()

Returns a list of isotopes in the source

Returns:

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

Return type:

list of tuple

property points_per_dimension

Number of source points per dimension.

Type:

list of integers

class zapmenot.source.Source(**kwargs)[source]

Bases: ABC

Abtract class to model a radiation source.

Maintains a list of isotopes and can return a list of point source locations within the body of the Source.

Parameters:

**kwargs – Arbitrary keyword arguments.

add_isotope_bq(new_isotope, becquerels)[source]

Adds an isotope and activity in becquerels to the isotope list

Parameters:
add_isotope_curies(new_isotope, curies)[source]

Adds an isotope and activity in curies to the isotope list

Parameters:
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.

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.

Returns:

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

Return type:

list of tuple

property grouping

State defining the photon energy group option.

Type:

GroupOption

property include_key_progeny

State defining if key progeny should be included.

Type:

bool

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.

Returns:

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

Return type:

list of tuple

list_isotopes()[source]

Returns a list of isotopes in the source

Returns:

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

Return type:

list of tuple

property points_per_dimension

Number of source points per dimension.

Type:

list of integers

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

Bases: Source, Sphere

Models a Spherical source :param material_name: Shield material type :type material_name: material.Material :param sphere_center: list of floats (x, y, and z coordinates). :type sphere_center: list :param sphere_radius: radius of the shield. :type sphere_radius: float :param density: Material density in g/cm3. :type density: float, optional

Variables:
  • material – Material properties of the shield

  • center (list) – list of floats (x, y, and z coordinates).

  • radius (float) – radius of the sphere.

add_isotope_bq(new_isotope, becquerels)

Adds an isotope and activity in becquerels to the isotope list

Parameters:
add_isotope_curies(new_isotope, curies)

Adds an isotope and activity in curies to the isotope list

Parameters:
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.

contains(point)

Returns true if the point is contained within the sphere, otherwise false

draw()

Creates a display object

Returns:

A Sphere object representing the sphere shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)

returns the crossing mfp

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.

Returns:

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

Return type:

list of tuple

property grouping

State defining the photon energy group option.

Type:

GroupOption

property include_key_progeny

State defining if key progeny should be included.

Type:

bool

is_hollow()

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

is_infinite()

Returns true if any dimension is infinite, false otherwise

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.

Returns:

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

Return type:

list of tuple

list_isotopes()

Returns a list of isotopes in the source

Returns:

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

Return type:

list of tuple

property points_per_dimension

Number of source points per dimension.

Type:

list of integers

class zapmenot.source.XAlignedCylinderSource(**kwargs)[source]

Bases: Source, XAlignedCylinder

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

Parameters:
  • material_name (material.Material) – Shield material type

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

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

  • cylinder_radius (float) – Radius of the cylinder.

  • density (float, optional) – Material density in g/cm3.

add_isotope_bq(new_isotope, becquerels)

Adds an isotope and activity in becquerels to the isotope list

Parameters:
add_isotope_curies(new_isotope, curies)

Adds an isotope and activity in curies to the isotope list

Parameters:
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.

draw()

Creates a display object

Returns:

A cylinder object representing the capped cylinder shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

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.

Returns:

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

Return type:

list of tuple

property grouping

State defining the photon energy group option.

Type:

GroupOption

property include_key_progeny

State defining if key progeny should be included.

Type:

bool

is_hollow()

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

is_infinite()

Returns true if any dimension is infinite, false otherwise

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.

Returns:

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

Return type:

list of tuple

list_isotopes()

Returns a list of isotopes in the source

Returns:

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

Return type:

list of tuple

property points_per_dimension

Number of source points per dimension.

Type:

list of integers

class zapmenot.source.YAlignedCylinderSource(**kwargs)[source]

Bases: Source, YAlignedCylinder

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

Parameters:
  • material_name (material.Material) – Shield material type

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

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

  • cylinder_radius (float) – Radius of the cylinder.

  • density (float, optional) – Material density in g/cm3.

add_isotope_bq(new_isotope, becquerels)

Adds an isotope and activity in becquerels to the isotope list

Parameters:
add_isotope_curies(new_isotope, curies)

Adds an isotope and activity in curies to the isotope list

Parameters:
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.

draw()

Creates a display object

Returns:

A cylinder object representing the capped cylinder shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

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.

Returns:

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

Return type:

list of tuple

property grouping

State defining the photon energy group option.

Type:

GroupOption

property include_key_progeny

State defining if key progeny should be included.

Type:

bool

is_hollow()

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

is_infinite()

Returns true if any dimension is infinite, false otherwise

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.

Returns:

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

Return type:

list of tuple

list_isotopes()

Returns a list of isotopes in the source

Returns:

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

Return type:

list of tuple

property points_per_dimension

Number of source points per dimension.

Type:

list of integers

class zapmenot.source.ZAlignedCylinderSource(**kwargs)[source]

Bases: Source, ZAlignedCylinder

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

Parameters:
  • material_name (material.Material) – Shield material type

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

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

  • cylinder_radius (float) – Radius of the cylinder.

  • density (float, optional) – Material density in g/cm3.

add_isotope_bq(new_isotope, becquerels)

Adds an isotope and activity in becquerels to the isotope list

Parameters:
add_isotope_curies(new_isotope, curies)

Adds an isotope and activity in curies to the isotope list

Parameters:
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.

draw()

Creates a display object

Returns:

A cylinder object representing the capped cylinder shield.

Return type:

pyvista.PolyData

get_crossing_mfp(ray, photon_energy)

Calculates the mfp equivalent if a ray intersects the shield

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

  • photon_energy (float) – The photon energy in MeV

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.

Returns:

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

Return type:

list of tuple

property grouping

State defining the photon energy group option.

Type:

GroupOption

property include_key_progeny

State defining if key progeny should be included.

Type:

bool

is_hollow()

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

is_infinite()

Returns true if any dimension is infinite, false otherwise

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.

Returns:

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

Return type:

list of tuple

list_isotopes()

Returns a list of isotopes in the source

Returns:

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

Return type:

list of tuple

property points_per_dimension

Number of source points per dimension.

Type:

list of integers

ZapMeNot Model

ZapMeNot - a point kernel photon shielding library Copyright (C) 2019-2025 C. Alan Ford

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

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.

add_detector(new_detector)[source]

Set the detector used by the model.

Parameters:

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

add_shield(new_shield)[source]

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

Parameters:

new_shield (zapmenot.shield.Shield) – The shield to be added.

add_source(new_source)[source]

Set the source used by the model.

Parameters:

new_source (zapmenot.source.Source) – The source to be used.

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.

Returns:

The exposure in units of mR/hr.

Return type:

float

display()[source]

Produces a graphic display of the model.

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.

Returns:

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

Return type:

list of list

set_buildup_factor_material(new_material)[source]

Set the material used to calculation exposure buildup factors.

Parameters:

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

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 (float, optional) – The density of the material in g/cm3.