Skip to content

Material

The nuclide inventory being assessed, and its five constructors.

Material

Material(atoms: Mapping[str, float] | None = None, *, density: float | None = None, volume: float | None = None, name: str = '', decay_data: DecayData | None = None)

A nuclide inventory to assess for clearance.

The primary input is a mapping of nuclide name to atom count, which is what an activation or depletion calculation produces:

>>> mat = Material({"Fe56": 8.4e22, "Co60": 1.2e12})

Specific activity in Bq/g is scale invariant, so atom counts, atom densities and atom fractions all give the same answer for the Bq/g limit sets and no density is needed. Volumetric limit sets (Ci/m3) do need one, supplied as density or derived from atom densities.

Warning

The Bq/g denominator is the mass of everything in the mapping, so stable isotopes must be included. Passing only the radioactive nuclides of an activated steel gives a mass thousands of times too small and a specific activity thousands of times too high. An inventory with more than one nuclide and no stable ones warns for that reason.

Parameters:

  • atoms

    (Mapping[str, float] | None, default: None ) –

    Nuclide name to atom count. Names may be spelled in any form normalise accepts, and duplicates after normalising are summed.

  • density

    (float | None, default: None ) –

    Mass density in g/cm3. Only needed for volumetric limit sets.

  • volume

    (float | None, default: None ) –

    Volume in cm3. Only needed for total activity in Bq or Ci.

  • name

    (str, default: '' ) –

    A label carried through to results, for reporting.

  • decay_data

    (DecayData | None, default: None ) –

    Half-life and mass tables. Defaults to the vendored ENDF/B-VIII.0 and AME2020 values.

Methods:

Attributes:

__doc__ class-attribute

__doc__ = 'A nuclide inventory to assess for clearance.\n\nThe primary input is a mapping of nuclide name to atom count, which is what\nan activation or depletion calculation produces:\n\n    >>> mat = Material({"Fe56": 8.4e22, "Co60": 1.2e12})\n\nSpecific activity in Bq/g is scale invariant, so atom counts, atom\ndensities and atom fractions all give the same answer for the Bq/g limit\nsets and no density is needed. Volumetric limit sets (Ci/m3) do need one,\nsupplied as ``density`` or derived from atom densities.\n\nWarning:\n    The Bq/g denominator is the mass of **everything** in the mapping, so\n    stable isotopes must be included. Passing only the radioactive nuclides\n    of an activated steel gives a mass thousands of times too small and a\n    specific activity thousands of times too high. An inventory with more\n    than one nuclide and no stable ones warns for that reason.\n\nArgs:\n    atoms: Nuclide name to atom count. Names may be spelled in any form\n        `normalise` accepts, and duplicates after normalising are summed.\n    density: Mass density in g/cm3. Only needed for volumetric limit sets.\n    volume: Volume in cm3. Only needed for total activity in Bq or Ci.\n    name: A label carried through to results, for reporting.\n    decay_data: Half-life and mass tables. Defaults to the vendored\n        ENDF/B-VIII.0 and AME2020 values.'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

__module__ class-attribute

__module__ = 'radiological_material_clearance_finder._core'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

atoms property

atoms: dict[str, float]

Atom amounts, keyed by canonical name.

Raises:

  • InsufficientDataError –

    If the material was built from specific activities, which do not determine atom counts.

decay_data property

decay_data: DecayData

The half-life and mass tables this material uses.

density property

density: float

Mass density in g/cm3.

Raises:

  • InsufficientDataError –

    If no density was supplied and none can be derived, naming what to pass.

mass property

mass: float

Total mass in grams.

Raises:

  • InsufficientDataError –

    If the material carries only relative amounts, such as atom densities or mass fractions, with no volume to scale them by.

  • ValueError –

    If the atom amounts and density times volume disagree by more than one percent.

name property

name: str

A label carried through to results, for reporting.

nuclides property

nuclides: tuple[str, ...]

The nuclides present, in canonical form, sorted.

volume property

volume: float | None

Volume in cm3, or None.

__new__ builtin

__new__(*args, **kwargs)

Create and return a new object. See help(type) for accurate signature.

__repr__ method descriptor

__repr__()

Return repr(self).

activity method descriptor

activity(units: str = 'Bq/g', by_nuclide: Literal[False] = False) -> float
activity(units: str, by_nuclide: Literal[True]) -> dict[str, float]
activity(units: str = 'Bq/g', by_nuclide: Literal[False] | Literal[True] = False) -> float | dict[str, float]

Activity in the requested units.

Parameters:

  • units

    (str, default: 'Bq/g' ) –

    One of ACTIVITY_UNITS.

  • by_nuclide

    (Literal[False] | Literal[True], default: False ) –

    Return a dict keyed by nuclide rather than the total.

Returns:

Raises:

  • ValueError –

    If the units are not recognised.

  • InsufficientDataError –

    If the units need a density or volume the material does not have.

from_atom_counts staticmethod

from_atom_counts(atoms: Mapping[str, float], *, density: float | None = None, volume: float | None = None, name: str = Ellipsis, decay_data: DecayData | None = None) -> Material

Build from absolute atom counts. Identical to the constructor.

Parameters:

  • atoms

    (Mapping[str, float]) –

    Nuclide name to atom count.

  • density

    (float | None, default: None ) –

    Mass density in g/cm3, only needed for volumetric sets.

  • volume

    (float | None, default: None ) –

    Volume in cm3, only needed for total activity.

  • name

    (str, default: Ellipsis ) –

    A label carried through to results.

  • decay_data

    (DecayData | None, default: None ) –

    Half-life and mass tables to use instead of the defaults.

from_atom_densities staticmethod

from_atom_densities(densities: Mapping[str, float], *, volume: float | None = None, density: None = None, name: str = Ellipsis, decay_data: DecayData | None = None) -> Material

Build from atom densities in atoms per barn-cm, OpenMC's unit.

The mass density follows from the atom densities and the atomic masses, so no density argument is accepted or needed: supplying one could only contradict the inventory.

Parameters:

  • densities

    (Mapping[str, float]) –

    Nuclide name to atoms/barn-cm.

  • volume

    (float | None, default: None ) –

    Volume in cm3, only needed for total activity.

  • density

    (None, default: None ) –

    Not accepted. Present only so that passing it raises rather than being swallowed and ignored.

  • name

    (str, default: Ellipsis ) –

    A label carried through to results.

  • decay_data

    (DecayData | None, default: None ) –

    Half-life and mass tables to use instead of the defaults.

Raises:

from_mass_fractions staticmethod

from_mass_fractions(fractions: Mapping[str, float], *, density: float | None = None, volume: float | None = None, name: str = Ellipsis, decay_data: DecayData | None = None) -> Material

Build from mass fractions, which need not sum to one.

Parameters:

  • fractions

    (Mapping[str, float]) –

    Nuclide name to mass fraction or weight percent.

  • density

    (float | None, default: None ) –

    Mass density in g/cm3, only needed for volumetric sets.

  • volume

    (float | None, default: None ) –

    Volume in cm3, only needed for total activity.

  • name

    (str, default: Ellipsis ) –

    A label carried through to results.

  • decay_data

    (DecayData | None, default: None ) –

    Half-life and mass tables to use instead of the defaults.

from_masses staticmethod

from_masses(masses: Mapping[str, float], *, density: float | None = None, volume: float | None = None, name: str = Ellipsis, decay_data: DecayData | None = None) -> Material

Build from a mass in grams per nuclide.

Parameters:

  • masses

    (Mapping[str, float]) –

    Nuclide name to mass in grams.

  • density

    (float | None, default: None ) –

    Mass density in g/cm3, only needed for volumetric sets.

  • volume

    (float | None, default: None ) –

    Volume in cm3. The masses already fix the total mass, so a volume that disagrees with density times volume is an error.

  • name

    (str, default: Ellipsis ) –

    A label carried through to results.

  • decay_data

    (DecayData | None, default: None ) –

    Half-life and mass tables to use instead of the defaults.

from_specific_activities staticmethod

from_specific_activities(activities: Mapping[str, float], *, density: float | None = None, volume: float | None = None, name: str = Ellipsis, decay_data: DecayData | None = None) -> Material

Build from specific activities in Bq/g, as an assay reports them.

No half-life or atomic mass data is used, since the specific activity is the direct input to the index. Volumetric limit sets then need an explicit density, because activity alone does not imply a mass.

Parameters:

  • activities

    (Mapping[str, float]) –

    Nuclide name to specific activity in Bq/g.

  • density

    (float | None, default: None ) –

    Mass density in g/cm3, only needed for volumetric sets.

  • volume

    (float | None, default: None ) –

    Volume in cm3, only needed for total activity.

  • name

    (str, default: Ellipsis ) –

    A label carried through to results.

  • decay_data

    (DecayData | None, default: None ) –

    Half-life tables, used by the scope and dynamic rules.

specific_activity method descriptor

specific_activity(by_nuclide: Literal[False] = False) -> float
specific_activity(by_nuclide: Literal[True]) -> dict[str, float]
specific_activity(by_nuclide: Literal[False] | Literal[True] = False) -> float | dict[str, float]

Specific activity in Bq/g.

Scale invariant, so this works from atom counts, atom densities or atom fractions alike.

Parameters:

  • by_nuclide

    (Literal[False] | Literal[True], default: False ) –

    Return a dict keyed by nuclide rather than the total.

Returns: