knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = NULL )
{.pkgdown-devel} {.pkgdown-release} {.pkgdown-release} {.pkgdown-release}
gamma is intended to process in-situ gamma-ray spectrometry measurements for luminescence dating. This package allows to import, inspect and (automatically) correct the energy scale of the spectrum. It provides methods for estimating the gamma dose rate by the use of a calibration curve. This package only supports Canberra CNF and TKA files.
The gammaShiny package provides an enhanced graphical user interface for the main applications of gamma.
cite <- utils::citation("gamma") print(cite, bibtex = FALSE)
You can install the released version of gamma from CRAN with:
install.packages("gamma")
And the development version from GitHub with:
# install.packages("remotes") remotes::install_github("crp2a/gamma")
## A minimal example library(gamma) ## Find the full path to the spectrum file spc_file <- system.file("extdata/LaBr.CNF", package = "gamma") ## Import the spectrum spectrum <- read(spc_file) ## Set the expected channel/energy peaks for the energy scale calibration ## Spectrum pre-processing and peak detection peaks <- spectrum |> signal_slice() |> signal_stabilize(f = sqrt) |> signal_smooth(method = "savitzky", m = 21) |> signal_correct(method = "SNIP", n = 100) |> peaks_find() ## Set the energy values (in keV) set_energy(peaks) <- c(238, NA, NA, NA, 1461, NA, NA, 2615) ## Calibrate the energy scale calib <- energy_calibrate(spectrum, peaks) ## Inspect peaks plot(calib, peaks)
## Estimate the gamma dose rate of a set of spectra ## You may want to give extra attention to the energy calibration step spc_file <- system.file("extdata/BDX_LaBr_1/test", package = "gamma") spectra <- read(spc_file) ## Load the calibration curve for the dose rate estimation ## As this curve is instrument specific, you will have to build your own ## See help(fit_dose) data("BDX_LaBr_1", package = "gamma") plot(BDX_LaBr_1) ## Estimate the gamma dose rate (doses <- dose_predict(BDX_LaBr_1, spectra))
Please note that the gamma project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
This work received a state financial support managed by the Agence Nationale de la Recherche (France) through the program Investissements d'avenir (ref. 10-LABX-0052 and 11-IDEX-0001).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.