R package numOSL: numeric routines for optically stimulated luminescence dating

View Researcher's Other Codes

Disclaimer: The provided code links for this paper are external links. Science Nest has no responsibility for the accuracy, legality or content of these links. Also, by downloading this code(s), you agree to comply with the terms of use as set out by the author(s) of the code(s).

Authors Jun Peng, Zhibao Dong, Fengqing Han, Hao Long, Xiangjun Liu
Journal/Conference Name Ancient TL
Paper Category
Paper Abstract In luminescence dating, there are various software packages that can be used to do data analysis, such as Analyst, Java RadialPlotter, Sigmaplot TM and so on. There is also an open source R package Luminescence, which has the capacity to tackle not only lots of basic statistical analysis but also provide more advanced data treatment. In this article, we present another R package, numOSL, the aim of which is neither to present a comprehensive numeric tool for luminescence dating just as the R package Luminescence did, nor to cover all numeric topics regarding luminescence dating. We focus only on the most frequently encountered numeric problems concerning luminescence dating, including equivalent dose calculation and error estimation, decay signal decomposition, fast-component equivalent dose calculation, and statistical age model optimization. Almost all our code is written in Fortran and is linked to R using an interface in order to improve algorithms, generality and flexibility. This makes it faster and perhaps more powerful when comparing to other numeric software. Introduction Basic numeric techniques are an important aspect of luminescence dating, which are frequently encountered in daily handling of luminescence data. These numeric techniques may include: 1) interpolation; 2) non-linear parameter optimization; 3) Monte-Carlo simulation; and 4) maximum likelihood estimation. Many software packages can be used to perform a special kind of numeric analysis for luminescence dating. For example, Analyst (Duller, 2007a) is mainly used for basic data handling such as data import/export, equivalent dose calculation, and plotting of graphs. Java RadialPlotter (Vermeesch, 2009) focuses on optimizing parameters in Galbraith’s statistical age models and drawing radial plots (Galbraith, 1988). SigmaPlot TM has been frequently employed to carry out decay curve fitting (Choi et al, 2006). However, if one wants to perform more flexible and more comprehensive analysis on a series of different kinds of data, such as curve fitting with decay signal data, or statistical age model analysis with equivalent dose (ED) values, no single software mentioned above can satisfy all the requests. There also is an open source R package Luminescence (Kreutzer et al, 2012, Dietze et al, 2013) written in pure R language, which contains more comprehensive numeric routines to analyze various kinds of luminescence data. Though flexible, sometimes pure R function run very slowly, which may impede its implementation in problems that need a great number of iterations or Monte-Carlo simulations. R serves as excellent statistical software (Ihaka and Gentleman, 1996; R Core Team, 2013), and is free of charge. Most importantly, code written in R is available to the user and might be modified and redistributed. Another significant characteristic of R is that it can easily communicate with other programming languages such as Fortran and C++. Hence one can write the time-consuming part of a program in Fortran or C++ and then link it to R using an interface to achieve acceptable running speed. This remains R’s flexibility and also makes it really powerful. In this paper, we introduce the R package numOSL as a toolbox for numeric optimizations that are frequently encountered in luminescence dating. To make it flexible and powerful, almost all our functions are written in Fortran and are linked to R using interface. The aims of this paper are: 1) unifying regular numeric routines in luminescence dating into handy functions and make them available to all users; 2) introducing the usage of these functions with examples. 42 Ancient TL Vol. 31 No.2 2013 Introduction to functions in R package numOSL Function: calED Currently, there are eight functions in package numOSL (Table 1). Function “calED” is used to fit a dose-response curve using the Levenberg-Marquardt algorithm and calculate an ED value by interpolation. Three models are provided (linear, exponential, linear plus exponential model) to do the fitting. For the linear model the fitting will not be a problem, but when it comes to an exponential or an exponential plus linear model, care needs to be taken regarding the choice of initial parameters. There are two options in function “calED” that can be used to initialize non-linear parameters: “nstart” and “upb”. “upb” is used to control the upper boundary of the b value in the non-linear model, which will be generated uniformly in the space (0, upb); then other initial values can be obtained with linear algebra method. For example, in an exponential model of the formula   c e a bx     1 y , combining paired observations (xi, yi, i=1,...,n) with a uniformly distributed random b value, a and c can be calculated using a linear algebraic method. Then the LevenbergMarquardt algorithm will be called to optimize those parameters. The process will be carried out repeatedly until stopping conditions are satisfied. The maximum allowed number of attempts is set to be “nstart”. The standard error of the ED value can be assessed using two methods (simple transform and Monte-Carlo simulation) outlined by Duller (2007b). Figure 1 is the outputted plot if we input the following commands to the R console: library(numOSL) Curvedata<-data.frame(cbind( c(0, 18, 36, 54, 72), c(0.03,1.49,2.51,3.32,4.0), c(0.002,0.05,0.12,0.34,0.37) ) ) Ltx<-c(3.11, 0.131) res<-calED(Curvedata, Ltx, model = "exp
Date of publication 2013
Code Programming Language R

Copyright Researcher 2022