Crate iaea

Expand description

Query decay data directly from the IAEA chart of nuclides

Makes using decay data from the IAEA chart of nuclides API slightly less horrific.

Decay data are either:

  • Loaded from pre-fetched data (recommended)
  • Fetched directly from the API
    • Internet connection required
    • Requests for large numbers of nuclides are parallelised.

See the IAEA documentation for further information.

§Implementation

The structure remains relatively consistent with the CSV data returned from the IAEA. Every nuclide request returns a series of Records.

For example:

// Get all records for the Cobalt-60 nuclide
let cobalt_60 = load_nuclide("co60", RadType::Gamma).unwrap();

// Find the 1173 keV emission as an example
let example = cobalt_60
    .iter()
    .find(|record| record.energy.unwrap() == 1173.228)
    .unwrap();

// Print a summary of this record
println!("{example}");

This will contain all common decay data fields under the Record, and any special data unique to the radiation type. In this case, the Gamma data.

Record
  Energy           1173.228 +/- 0.003 keV
  Intensity        99.85 +/- 0.03 %
  Half life        166344200 +/- 12096 s
  Decay mode       B-
  Branching        100 +/- None %
  State            5+
  Q value          2822.81 +/- 21 keV
  Parent symbol    Co
  Parent z         27
  Parent n         33
  Parent energy    0 +/- None keV
  Daughter symbol  Ni
  Daughter z       28
  Daughter n       32
Gamma
  Start level      2505.748 keV
  End level        1332.508 keV
  Multipolarity    E2(+M3)
  Mixing ratio     -0.0025 +/- 22
  Conversion coef. 0.0001722 +/- None

Structs§

Alpha
Special data for alpha decay
BetaMinus
Special data for beta-minus decay
BetaPlus
Special data for beta-plus decay
Electron
Special data for Auger and Conversion electrons
Gamma
Special data for gamma decay
Nuclide
Definition for a particular nuclide
Record
Data for a single record from an IAEA fetch request
Xray
Special data for Xray emissions

Enums§

Error
The error type for ntools-iaea
IsomerState
Variants of excited states
RadType
Type of decay radiation
SpecialData
Collection of specialised data fields under one type

Functions§

fetch_all
Fetch all nuclides direct from IAEA
fetch_available
Fetch a list of known nuclides
fetch_csv
Fetch unmodified CSV data direct from IAEA
fetch_nuclide
Fetch single nuclide direct from IAEA
fetch_nuclides
Fetch multiple nuclides direct from IAEA
load_all
Load all nuclides from pre-fetched data
load_available
Load a list of nuclides available in pre-fetched data
load_nuclide
Load single nuclide from pre-fetched data
load_nuclides
Load multiple nuclides from pre-fetched data
prefetch_binary
Generate a binary file of pre-fetched data
prefetch_json
Generate a JSON file for pre-fetched data

Type Aliases§

RecordSet
Type alias for Vec<Record>