Skip to content

index

The clearance index itself, and the result it returns.

index

The clearance index itself: a sum of activity-to-limit ratios.

Every regulation here uses the same arithmetic. Each radionuclide's activity is divided by its tabulated limit and the ratios are summed; a total below one means the material meets the limits. The German regulation calls it the Summenformel, the UK calls it the summation rule, the NRC calls it the sum of fractions rule and Fetter calls the result a waste disposal rating. This module implements it once.

What differs between regulations, and what ClearanceResult therefore records, is what happens to a nuclide that is not simply looked up: one whose parent already accounts for it, one the table does not list, and one the regulation places outside its scope entirely.

Classes:

  • ClearanceResult –

    The outcome of assessing one material against one limit set.

Functions:

Attributes:

EQUILIBRIUM_TOLERANCE module-attribute

EQUILIBRIUM_TOLERANCE: float = 0.1

Convert a string or number to a floating-point number, if possible.

ClearanceResult

The outcome of assessing one material against one limit set.

The per-nuclide dicts are ordered as a report reads them, largest first.

Methods:

  • __repr__ –

    Return repr(self).

  • __str__ –

    Return str(self).

  • assessed_activity –

    The activity actually charged against the limit for one nuclide.

  • dominant –

    The nuclides contributing most to the index.

  • to_dict –

    A JSON-serialisable copy of the result.

Attributes:

__doc__ class-attribute

__doc__ = 'The outcome of assessing one material against one limit set.\n\nThe per-nuclide dicts are ordered as a report reads them, largest first.'

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'.

activities property

activities: dict[str, float]

Each nuclide's activity in units, largest first.

by_nuclide property

by_nuclide: dict[str, float]

Each nuclide's contribution to the index, largest first.

clearable property

clearable: bool

Whether the material meets this set's limits.

credited property

credited: dict[str, float]

Nuclide to the activity a parent accounted for, where the parent could only support part of it. The remainder was assessed against the nuclide's own limit, so for these the ratio in by_nuclide is computed from activities[name] - credited[name]. assessed_activity returns that residual directly.

defaulted property

defaulted: tuple[str, ...]

Nuclides that took the set's catch-all limit because the table does not list them.

excluded property

excluded: dict[str, str]

Nuclide to the reason its activity was left out, which is always that a parent's limit already accounts for it in full.

index property

index: float

The sum of activity-to-limit ratios.

limit_set property

limit_set: str

Name of the set assessed against.

limits_used property

limits_used: dict[str, float]

The limit applied to each nuclide, after any metal, per-gram, dynamic or secular equilibrium adjustment.

material_name property

material_name: str

The material's label, carried through for reporting.

out_of_scope property

out_of_scope: bool

Whether the regulation excludes this material outright, which for the UK sets means every radionuclide present is shorter lived than 100 seconds.

threshold property

threshold: float

The value the index must stay below, normally 1.

uncovered property

uncovered: dict[str, float]

Activity present with no limit and no catch-all, so absent from the index entirely. The number to check before trusting a comfortable index.

uncovered_activity property

uncovered_activity: float

Total activity with no limit, in this result's units.

uncovered_fraction property

uncovered_fraction: float

Share of total activity that falls outside the sum, from 0 to 1.

A large value means the index understates the inventory: activity is present that no limit in this set applies to. Zero means every radionuclide present was either limited or explicitly unlimited.

units property

units: str

Activity units the comparison was made in.

unlimited property

unlimited: tuple[str, ...]

Nuclides the source explicitly places no limit on.

__repr__ method descriptor

__repr__()

Return repr(self).

__str__ method descriptor

__str__()

Return str(self).

assessed_activity method descriptor

assessed_activity(nuclide: str) -> float

The activity actually charged against the limit for one nuclide.

The same as its total activity, except where a parent accounted for part of it, in which case the remainder is what the ratio was computed from.

Parameters:

  • nuclide
    (str) –

    Canonical nuclide name.

dominant method descriptor

dominant(count: int = 10) -> list[tuple[str, float]]

The nuclides contributing most to the index.

Parameters:

  • count
    (int, default: 10 ) –

    How many to return.

to_dict method descriptor

to_dict() -> dict[str, object]

A JSON-serialisable copy of the result.

clearable_routes builtin

clearable_routes(material: Material, names: Sequence[str] | None = None, *, metal: bool = False, apply_default_limit: bool = True, exclude_daughters: bool = True) -> list[str]

The limit sets this material already meets, best margin first.

Parameters:

  • material

    (Material) –

    The inventory to assess.

  • names

    (Sequence[str] | None, default: None ) –

    Limit set names, defaulting to every registered set.

  • metal

    (bool, default: False ) –

    As for clearance_index.

  • apply_default_limit

    (bool, default: True ) –

    As for clearance_index.

  • exclude_daughters

    (bool, default: True ) –

    As for clearance_index.

Returns:

  • list[str] –

    Names of the sets whose index is below their threshold.

clearance_index builtin

Assess a material against one set of clearance limits.

Parameters:

  • material

    (Material) –

    The inventory to assess.

  • limit_set

    (str | LimitSet) –

    A registered limit set name, or a LimitSet.

  • metal

    (bool, default: False ) –

    Whether the material is activated metal, which changes some NRC limits and adds others.

  • apply_default_limit

    (bool, default: True ) –

    Whether to apply the set's catch-all limit to nuclides the table does not list. The UK regulations define one, so leaving this on is what the regulation says; turning it off shows what the listed nuclides alone contribute.

  • exclude_daughters

    (bool, default: True ) –

    Whether to leave out daughters whose parent's limit already covers them, per the regulation's own table. Turning this off double counts them, which is conservative but not what the regulation intends.

Returns:

  • ClearanceResult –

    A ClearanceResult carrying the index and everything needed to judge

  • ClearanceResult –

    it, including any activity that fell outside the sum.

Raises:

  • KeyError –

    If the limit set name is not registered.

  • InsufficientDataError –

    If a volumetric set is used and the material has no density.

clearance_indices builtin

clearance_indices(material: Material, names: Sequence[str] | None = None, *, metal: bool = False, apply_default_limit: bool = True, exclude_daughters: bool = True) -> dict[str, ClearanceResult]

Assess a material against many limit sets at once.

Sets whose units the material cannot supply, such as a volumetric set for a material with no density, are skipped rather than raising, so one missing density does not hide every result that does not need it.

Parameters:

  • material

    (Material) –

    The inventory to assess.

  • names

    (Sequence[str] | None, default: None ) –

    Limit set names, defaulting to every registered set.

  • metal

    (bool, default: False ) –

    As for clearance_index.

  • apply_default_limit

    (bool, default: True ) –

    As for clearance_index.

  • exclude_daughters

    (bool, default: True ) –

    As for clearance_index.

Returns: