Learn R Programming

gamma

Overview

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 and Kromek SPE files.

The gammaShiny package provides an enhanced graphical user interface for the main applications of gamma.

To cite gamma in publications use:

  Lebrun B, Frerebeau N, Paradol G, Guérin G, Mercier N, Tribolo C,
  Lahaye C, Rizza M (2020). "gamma: An R Package for Dose Rate
  Estimation from In-Situ Gamma-Ray Spectrometry Measurements."
  _Ancient TL_, *38*(2), 1-5.

  Frerebeau N, Lebrun B, Paradol G, Kreutzer S (2024). _gamma: Dose
  Rate Estimation from in-Situ Gamma-Ray Spectrometry_. Université
  Bordeaux Montaigne, Pessac, France. doi:10.5281/zenodo.2652393
  <https://doi.org/10.5281/zenodo.2652393>, R package version 1.1.0.

Installation

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")

Usage

## 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
data("BDX_LaBr_1", package = "gamma")
plot(BDX_LaBr_1)
## Estimate the gamma dose rate
(doses <- dose_predict(BDX_LaBr_1, spectra))
namesignal_Nisignal_err_Nidose_Nidose_err_Nisignal_NiEisignal_err_NiEidose_NiEidose_err_NiEidose_finaldose_err_final
201105232040088.6046660.2691316252.286610.3725007626.4938.747617220.67475.495079236.480611.366900
201105232100088.7750920.2166075257.33169.3542747577.3027.021326219.13035.454610238.230910.495729
201105272053168.4459760.1546491247.58908.0126807064.4495.009961203.02885.052359225.30899.198048
2013080917245130.2184790.2549754892.100324.96728827667.4738.089989849.881721.142124870.991032.614162
2013081318163936.0623140.28532861065.089929.64478533243.0509.0280971024.932525.4965441045.011239.010062
2016071717575719.1902500.3635398565.641818.51089516419.87311.495584496.751812.361511531.196821.838611
2016071718105216.3036590.2837191480.192815.29786914033.8319.033011421.839610.496701451.016218.231817
2016071718260116.8964410.2557337497.740315.26985014493.4958.131459436.271210.854933467.005818.446627

Contributing

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.

Acknowledgements

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

Copy Link

Version

Install

install.packages('gamma')

Monthly Downloads

248

Version

1.1.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Archéosciences Bordeaux

Last Published

September 23rd, 2024

Functions in gamma (1.1.0)

read

Data Input
signal_stabilize

Transform Intensities
summarise

Summarize
gamma-package

gamma: Dose Rate Estimation from in-Situ Gamma-Ray Spectrometry Measurements
plot

Plot
peaks_search

Search Peaks
subset

Extract or Replace Parts of an Object
signal_slice

Choose channels by Position
smooth

Smooth
signal_split

Split
Baseline-class

An S4 Class to Represent a Spectrum Baseline
AIX_NaI_1

CEREGE Calibration Curve (NaI)
PeakPosition-class

An S4 Class to Represent a Set of Peaks
baseline

Baseline Estimation and Removal
clermont_2024

Clermont Reference Data 2024
clermont

Clermont Reference Data
coerce

Coerce
energy

Energy Scale Calibration
CalibrationCurve-class

An S4 class to Represent a Dose Rate Calibration Curve
BDX_LaBr_1

CRP2A Calibration Curve (LaBr)
decay_La

Lanthanum Decay Data
GammaSpectra-class

An S4 Class to Represent a Collection of Gamma Sectra
doserate

Dose Rate Estimation
operator

Common Operations on GammaSpectrum Objects
decay

Nuclear Decay Data
GammaSpectrum-class

An S4 Class to Represent a Gamma Spectrum
peaks_find

Find Peaks
signal_integrate

Signal Integration
mutator

Get or Set Parts of an Object