limits¶
Limit sets: the regulatory tables a material is measured against.
limits
¶
Limit sets: the regulatory tables a material is measured against.
Every limit set is data, compiled into the extension from the JSON in
crates/radiological-material-clearance-finder/data/limits. Adding a
jurisdiction means adding a file and a build script, never a branch in the
calculation. Only two things in these regulations cannot be expressed as a
table, and both are named explicitly rather than worked around:
- limits given per gram of material (the NRC's nCi/g transuranic entries), which need the material's density before they can be compared against Ci/m3, and
- limits that depend on the material's own nuclides (the NRC Class A rule that
anything with a half-life under five years takes a 700 Ci/m3 limit), named in
DYNAMIC_RULES.
Classes:
-
LimitSet–A named table of per-nuclide activity limits.
Functions:
-
get_limit_set–Look up a limit set by name.
-
limit_sets–Names of the available limit sets, sorted.
-
register_limit_set–Add a limit set at runtime, for a site-specific or draft table.
Attributes:
-
DYNAMIC_RULES(tuple[str, ...]) –Built-in immutable sequence.
DYNAMIC_RULES
module-attribute
¶
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable's items.
If the argument is a tuple, the return value is the same object.
LimitSet
¶
LimitSet(name: str, label: str, units: str, limits: Mapping[str, float], jurisdiction: str = '', default_limit: float | None = None, unlimited: Sequence[str] = (), secular_equilibrium: Mapping[str, Sequence[str]] = ..., secular_equilibrium_sec: Mapping[str, Sequence[str]] = ..., limits_secular_equilibrium: Mapping[str, float] = ..., metal_overrides: Mapping[str, float] = ..., limits_per_gram: Mapping[str, float] = ..., limits_upper: Mapping[str, float] = ..., dynamic_rule: str | None = None, min_half_life_scope: float | None = None, threshold: float = 1.0, source: str = '', url: str = '', retrieved: str = '', notes: str = '')
A named table of per-nuclide activity limits.
Every nuclide name is canonicalised on construction, so a hand-written
"Co-60" behaves exactly like a loaded "Co60", and values that cannot
mean anything (a zero, negative or infinite limit, unknown units, a
non-positive threshold) raise ValueError.
Parameters:
-
(name¶str) –Stable identifier, such as
UK_EPR16_out_of_scope. -
(label¶str) –Human readable description for reports.
-
(units¶str) –Activity units the limits are in:
Bq/g,Ci/m3, orBqfor a total activity limit, which needs the material's mass. -
(limits¶Mapping[str, float]) –Limit per nuclide name. A whole chain "sec" value goes under a
_seckey, such asU238_sec. -
(jurisdiction¶str, default:'') –Issuing authority, such as
UKorGermany. -
(default_limit¶float | None, default:None) –Limit applied to a nuclide absent from
limits, orNonewhere the regulation has no catch-all. Three UK sets define one: 0.01 Bq/g forUK_EPR16_out_of_scopeandUK_IRR17_notification, and 0.1 Bq/g forUK_IRR17_registration. -
(unlimited¶Sequence[str], default:()) –Nuclides the source explicitly places no limit on. They are covered, and contribute nothing, which is different from being absent.
-
(secular_equilibrium¶Mapping[str, Sequence[str]], default:...) –Parent to the daughters whose contribution the parent's limit already includes, the "+" rows.
-
(secular_equilibrium_sec¶Mapping[str, Sequence[str]], default:...) –Parent to the daughters covered by its whole chain "sec" value, usually a much longer list with a much stricter limit. UK EPR 2016 gives U-238 three progeny at 1 Bq/g under "U-238+" and fourteen at 0.01 Bq/g under "U-238sec".
-
(limits_secular_equilibrium¶Mapping[str, float], default:...) –The limit for a parent listed twice, plain and marked "+", when its daughters are actually present. StrlSchV gives Th-232 as 10 Bq/g plain and 0.01 Bq/g marked.
-
(metal_overrides¶Mapping[str, float], default:...) –Limits replacing or adding to
limitswhen the material is activated metal. -
(limits_per_gram¶Mapping[str, float], default:...) –Limits in nCi/g, converted using the material density.
-
(limits_upper¶Mapping[str, float], default:...) –Upper end of a limit given as a range in the source, kept for reference.
limitsholds the conservative lower end. -
(dynamic_rule¶str | None, default:None) –Name of a rule that depends on the material's own nuclides, one of
DYNAMIC_RULES. -
(min_half_life_scope¶float | None, default:None) –Half-life in seconds below which, if every radionuclide present falls under it, the material is outside the regulation altogether. A whole-material test, not a per-nuclide filter.
-
(threshold¶float, default:1.0) –Index value at or above which the material fails, normally 1.
-
(source¶str, default:'') –The regulation the set is taken from.
-
(url¶str, default:'') –Where the source was retrieved from.
-
(retrieved¶str, default:'') –When it was retrieved.
-
(notes¶str, default:'') –Anything else worth knowing.
Methods:
-
__eq__–Return self==value.
-
__ge__–Return self>=value.
-
__gt__–Return self>value.
-
__hash__–Return hash(self).
-
__le__–Return self<=value.
-
__len__–Return len(self).
-
__lt__–Return self<value.
-
__ne__–Return self!=value.
-
__new__–Create and return a new object. See help(type) for accurate signature.
-
__repr__–Return repr(self).
-
daughters_of–Daughters whose activity this set's limit for
parentalready covers.
Attributes:
-
__doc__–str(object='') -> str
-
__module__–str(object='') -> str
-
covered_nuclides(frozenset[str]) –Every nuclide this set names, whether limited or explicitly unlimited.
-
default_limit(float | None) –The catch-all limit for unlisted nuclides, or
None. -
dynamic_rule(str | None) –Name of the rule that depends on the material's own nuclides, or
None. -
jurisdiction(str) –Issuing authority.
-
label(str) –Human readable description for reports.
-
limits(dict[str, float]) –Limit per canonical nuclide name, with whole chain values under
_sec. -
limits_per_gram(dict[str, float]) –Limits in nCi/g.
-
limits_secular_equilibrium(dict[str, float]) –The limit for a parent listed twice, applied when its daughters are present.
-
limits_upper(dict[str, float]) –Upper end of limits the source gives as a range.
-
metal_overrides(dict[str, float]) –Limits replacing or adding to
limitsfor activated metal. -
min_half_life_scope(float | None) –The whole-material short half-life scope test, in seconds, or
None. -
name(str) –Stable identifier, such as
UK_EPR16_out_of_scope. -
notes(str) –Anything else worth knowing about the set.
-
retrieved(str) –When the source was retrieved.
-
secular_equilibrium(dict[str, tuple[str, ...]]) –The "+" rows: parent to the daughters its limit covers.
-
secular_equilibrium_sec(dict[str, tuple[str, ...]]) –The "sec" rows: parent to the daughters its whole chain value covers.
-
source(str) –The regulation this set is taken from.
-
threshold(float) –The index value at or above which a material fails.
-
units(str) –Activity units the limits are in.
-
unlimited(tuple[str, ...]) –Nuclides the source explicitly places no limit on.
-
url(str) –Where the source was retrieved from.
__doc__
class-attribute
¶
__doc__ = 'A named table of per-nuclide activity limits.\n\nEvery nuclide name is canonicalised on construction, so a hand-written\n``"Co-60"`` behaves exactly like a loaded ``"Co60"``, and values that cannot\nmean anything (a zero, negative or infinite limit, unknown units, a\nnon-positive threshold) raise ValueError.\n\nArgs:\n name: Stable identifier, such as ``UK_EPR16_out_of_scope``.\n label: Human readable description for reports.\n units: Activity units the limits are in: ``Bq/g``, ``Ci/m3``, or ``Bq``\n for a total activity limit, which needs the material\'s mass.\n limits: Limit per nuclide name. A whole chain "sec" value goes under a\n ``_sec`` key, such as ``U238_sec``.\n jurisdiction: Issuing authority, such as ``UK`` or ``Germany``.\n default_limit: Limit applied to a nuclide absent from ``limits``, or\n ``None`` where the regulation has no catch-all. Three UK sets define\n one: 0.01 Bq/g for ``UK_EPR16_out_of_scope`` and\n ``UK_IRR17_notification``, and 0.1 Bq/g for\n ``UK_IRR17_registration``.\n unlimited: Nuclides the source explicitly places no limit on. They are\n covered, and contribute nothing, which is different from being\n absent.\n secular_equilibrium: Parent to the daughters whose contribution the\n parent\'s limit already includes, the "+" rows.\n secular_equilibrium_sec: Parent to the daughters covered by its whole\n chain "sec" value, usually a much longer list with a much stricter\n limit. UK EPR 2016 gives U-238 three progeny at 1 Bq/g under\n "U-238+" and fourteen at 0.01 Bq/g under "U-238sec".\n limits_secular_equilibrium: The limit for a parent listed twice, plain\n and marked "+", when its daughters are actually present. StrlSchV\n gives Th-232 as 10 Bq/g plain and 0.01 Bq/g marked.\n metal_overrides: Limits replacing or adding to ``limits`` when the\n material is activated metal.\n limits_per_gram: Limits in nCi/g, converted using the material density.\n limits_upper: Upper end of a limit given as a range in the source, kept\n for reference. ``limits`` holds the conservative lower end.\n dynamic_rule: Name of a rule that depends on the material\'s own\n nuclides, one of `DYNAMIC_RULES`.\n min_half_life_scope: Half-life in seconds below which, if *every*\n radionuclide present falls under it, the material is outside the\n regulation altogether. A whole-material test, not a per-nuclide\n filter.\n threshold: Index value at or above which the material fails, normally 1.\n source: The regulation the set is taken from.\n url: Where the source was retrieved from.\n retrieved: When it was retrieved.\n notes: Anything else worth knowing.'
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
¶
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'.
covered_nuclides
property
¶
Every nuclide this set names, whether limited or explicitly unlimited.
The _sec keys are whole chain variants of a nuclide already counted,
not nuclides of their own, so they are not included.
default_limit
property
¶
default_limit: float | None
The catch-all limit for unlisted nuclides, or None.
dynamic_rule
property
¶
dynamic_rule: str | None
Name of the rule that depends on the material's own nuclides, or None.
limits
property
¶
Limit per canonical nuclide name, with whole chain values under _sec.
limits_secular_equilibrium
property
¶
The limit for a parent listed twice, applied when its daughters are present.
limits_upper
property
¶
Upper end of limits the source gives as a range.
metal_overrides
property
¶
Limits replacing or adding to limits for activated metal.
min_half_life_scope
property
¶
min_half_life_scope: float | None
The whole-material short half-life scope test, in seconds, or None.
secular_equilibrium
property
¶
The "+" rows: parent to the daughters its limit covers.
secular_equilibrium_sec
property
¶
The "sec" rows: parent to the daughters its whole chain value covers.
__new__
builtin
¶
Create and return a new object. See help(type) for accurate signature.
get_limit_set
builtin
¶
limit_sets
builtin
¶
limit_sets(jurisdiction: str | None = None) -> tuple[str, ...]
register_limit_set
builtin
¶
Add a limit set at runtime, for a site-specific or draft table.
Parameters: