Provides functions for radiation safety, also known as "radiation protection" and "radiological control". The science of radiation protection is called "health physics" and its engineering functions are called "radiological engineering". Functions in this package cover many of the computations needed by radiation safety professionals. Examples include: obtaining updated calibration and source check values for radiation monitors to account for radioactive decay in a reference source, simulating instrument readings to better understand measurement uncertainty, correcting instrument readings for geometry and ambient atmospheric conditions. Many of these functions are described in Johnson and Kirby (2011, ISBN-13: 978-1609134198). Utilities are also included for developing inputs and processing outputs with radiation transport codes, such as MCNP, a general-purpose Monte Carlo N-Particle code that can be used for neutron, photon, electron, or coupled neutron/photon/electron transport (Werner et. al. (2018)
The goal of radsafer is to provide functions that are useful for radiation safety professionals.
You can install the released version of radsafer from CRAN with:
Or install the development version from GitHub:
To start using the installed package:
Radsafer includes several functions to manage radioactive decay corrections:
dk_cf provides a correction factor. Revise a calibration or source check value to today’s date (the default) or a date and time of your choosing.
dk_cf(half_life = 5.27, date1 = "2010-12-01", date2 = "2018-12-01", time_unit = "y")#>  0.3491632
Use this function to correct for the value needed today. Say, a disk source originally had a target count rate of 3000 cpm:
3000 * dk_cf(half_life = 5.27, date1 = "2010-12-01", date2 = "2018-12-01", time_unit = "y")#>  1047.49
Other decay functions answer the following questions: * What is the decayed activity? dk_activity, Given a percentage reduction in activity, how many half-lives have passed.dk_pct_to_num_half_life
How long will it take to reach the target radioactivity? dk_time
Given the radioactivity at one time, what was the radioactivity at an earlier time? dk_reverse
Given two data points, estimate the half-life: half_life_2pt
air_dens_cf Correct vented ion chamber readings based on difference in air pressure (readings in degrees Celsius and mm Hg):
air_dens_cf(T.actual = 30, P.actual = 760, T.ref = 20, P.ref = 760)#>  1.034112
Let’s try it out combined with the instrument reading:
rdg <- 100(rdg_corrected <- rdg * air_dens_cf(T.actual = 30, P.actual = 760, T.ref = 20, P.ref = 760))#>  103.4112
Correct for geometry when reading a close neutron source. Example: neutron rem detector with a radius of 11 cm and source near surface:
neutron_geom_cf(11.1, 11)#>  0.7236467
Correct for a mismatch between the source calibration of a counting system and the item being measured. A significant factor in the counting efficiency is the solid angle from the source to the detector. You can also check for the impact of an item not being centered with the detector.
Example: You are counting an air sample with an active collection diameter of 45 mm, your detector has a radius of 25 mm and there is a gap between the two of 5 mm. (The function is based on radius, not diameter so be sure to divide the diameter by two.) The relative solid angle is:
(as_rel_solid_angle <- as.numeric(disk_to_disk_solid_angle(r.source = 45/2, gap = 20, r.detector = 12.5, runs = 1e4, plot.opt = "n")))#> mean_eff SEM#> 0.04806641 0.002132889#>  0.048066408 0.002132889
An optional plot is available in 2D or 3D:
(as_rel_solid_angle <- as.numeric(disk_to_disk_solid_angle(r.source = 45/2, gap = 20, r.detector = 12.5, runs = 1e4, plot.opt = "3d")))
#> mean_eff SEM #> 0.04965531 0.00217145 #>  0.04965531 0.00217145
Continuing the example: the only calibration source you had available with the appropriate isotope has an active diameter of 20 mm. Is this a big deal? Let’s estimate the relative solid angle of the calibration, then take a ratio of the two.
(cal_rel_solid_angle <- disk_to_disk_solid_angle(r.source = 20, gap = 20, r.detector = 12.5, runs = 1e4, plot.opt = "n"))#> mean_eff SEM#> 0.05137294 0.002206029#> mean_eff SEM#> 1 0.05137294 0.002206029
Correct for the mismatch:
(cf <- cal_rel_solid_angle / as_rel_solid_angle)#> mean_eff SEM#> 1 1.034591 1.015924
This makes sense - the air sample has particles originating outside the source radius, so more of them will be lost, thus an adjustment is needed for the activity measurement.
Scaler counts: obtain quick distributions for parameters of interest:
scaler_sim(true_bkg = 50, true_samp = 10, ct_time = 20, trials = 1e5)
Rate meters: In the ratemeter simulation, readings are plotted once per second for a default time of 600 seconds. The meter starts with a reading of zero and builds up based on the time constant. Resolution uncertainty is established to express the uncertainty from reading an analog scale, including the instability of its readings. Many standard references identify the precision or resolution uncertainty of analog readings as half of the smallest increment. This should be considered the single coverage uncertainty for a very stable reading. When a reading is not very stable, evaluation of the reading fluctuation is evaluated in terms of numbers of scale increments covered by meter indication over a reasonable evaluation period. Example with default time constant:
rate_meter_sim(cpm_equilibrium = 270, meter_scale_increments = seq(100, 1000, 20))
To estimate time constant, use
Given a dose rate, dose allowed, and a safety margin (default = 20%),
calculate stay time with:
stay_time(dose_rate = 120, dose_allowed = 100, margin = 20)#>  "Time allowed is 40 minutes"#>  40
If you create MCNP inputs, these functions may be helpful:
mcnp_si_sp_RD Obtain emission data from the RadData package and write to a file for use with the radiation transport code, MCNP.
mcnp_si_hist and mcnp_sp_hist
sp_hist(Load the data into R first using copy and paste with
scanor reading from an external table with, for example,
For MCNP outputs, plot the results of a tally with energy bins.
Either first save your data to a text file, or copy and paste it using
mcnp_scan2spec.df. Then plot it using your favorite method, or do a
quick plot with
mcnp_plot_out_spec(photons_cs137_hist, 'example Cs-137 well irradiator')
Search by alpha, beta, photon or use the general screen option.
search_phot_by_E allows screening based on energy, half-life, and
minimum probability. Also available are
limiting searhes to radionuclides with emissions in an energy bin of
interest with additional filters for not having photons in other
specified energy bins. Results for all these search functions may be
Here’s a search for photon energy between 0.99 and 1.01 MeV, half-life between 13 and 15 minutes, and probability at least 1e-4
search_results <- search_phot_by_E(0.99, 1.01, 13 * 60, 15 * 60, 1e-4)
RN_index_screen function helps find a radionuclide of interest
based on decay mode, half-life, and total emission energy.
In this example, we search for radionuclides decaying by spontaneous fission with half-lives between 6 months and 2 years.
RNs_selected <- RN_index_screen(dk_mode = "SF", min_half_life_seconds = 0.5 * 3.153e7, max_half_life_seconds = 2 * 3.153e7)
Other radionuclides family functions provide specific activity and short tables of decay data.