## 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 files.

## Installation

Install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("crp2a/gamma")

## Usage

# See the package manual
utils::vignette("gamma", package = "gamma")
# A minimal example
# You may want to give extra attention to the energy calibration step

## Set the expected chanel/energy peaks for the energy scale calibration
calib_lines <- list(
Pb212 = c(chanel = 86, energy = 238),
K40 = c(chanel = 496, energy = 1461),
Tl208 = c(chanel = 876, energy = 2615)
)

## 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)
data(BDX1, package = "gamma")

## Find the full path to the spectrum file
spectrum <- system.file("extdata/test_CNF.cnf", package = "gamma")

## Estimate the gamma dose rate
spectrum %>%
#> test_CNF 3971.7 129.7577
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.