R-Lum / RLumModel
1
#' Create a SAR sequence for 'RLumModel'
2
#'
3
#' This function creates a SAR (single-aliquot-regeneration) sequence with special keywords
4
#' for luminescence dating.
5
#'
6
#' Defining a \bold{SAR-sequence}\cr
7
#'
8
#' \tabular{lll}{
9
#' \bold{Abrivation} \tab \bold{Description} \tab \bold{examples} \cr
10
#' RegDose \tab Dose points of the regenerative cycles\tab c(0, 80, 140, 260, 320, 0, 80)\cr
11
#' TestDose\tab Test dose for the SAR cycles  \tab 50 \cr
12
#' PH\tab Temperature of the preheat \tab 240 \cr
13
#' CH\tab Temperature of the cutheat \tab 200 \cr
14
#' OSL_temp\tab Temperature of OSL read out\tab  125 \cr
15
#' OSL_duration \tab  Duration of OSL read out\tab default: 40 \cr
16
#' Irr_temp \tab Temperature of irradiation \tab default: 20\cr
17
#' PH_duration  \tab Duration of the preheat \tab default: 10 \cr
18
#' dose_rate \tab Dose rate of the laboratory irradiation source \tab default: 1 \cr
19
#' optical_power \tab Percentage of the full illumination power \tab default: 90
20
#' }
21
#'
22
#' @param RegDose \code{\link{numeric}} (\bold{required}): a vector with the dose points for the regeneration cycle
23
#'
24
#' @param TestDose\code{\link{numeric}} (\bold{required}): set testdose in [Gy]
25
#'
26
#' @param PH\code{\link{numeric}} (\bold{required}): set preheat temperature [deg. C]
27
#'
28
#' @param CH\code{\link{numeric}} (\bold{required}): set cutheat temperature [deg. C]
29
#'
30
#' @param OSL_temp\code{\link{numeric}} (\bold{required}): set OSL reading temperture [deg. C]
31
#'
32
#' @param Irr_temp\code{\link{numeric}} (with default): set irradiation temperature [deg. C]
33
#'
34
#' @param OSL_duration\code{\link{numeric}} (with default): set OSL measurement time [s]
35
#'
36
#' @param PH_duration\code{\link{numeric}} (with default): set preheat duration [s]
37
#'
38
#' @param dose_rate\code{\link{numeric}} (with default): set the dose rate [Gy/s] of the laboratory irradiation unit
39
#'
40
#' @param optical_power\code{\link{numeric}} (with default):
41
#'
42
#' @return This function returns a \code{\link{list}} with a SAR sequence.
43
#' It can be read by \code{\link{model_LuminescenceSignals}}.
44
#'
45
#' @section Function version: 0.1.0
46
#'
47
#' @author Johannes Friedrich, University of Bayreuth (Germany),
48
#'
49
#' @references
50
#'
51
#' Murray, A.S. and Wintle, A.G., 2000. Luminescence dating of quartz using an
52
#' improved single-aliquot regenerative-dose protocol. Radiation Measurements
53
#' 32, 57-73.
54
#'
55
#' @seealso \code{\link{create_DRT.sequence}}, \code{\link{model_LuminescenceSignals}}
56
#'
57
#' @examples
58
#'
59
#'   sequence <- .create_SAR.sequence(
60
#'    RegDose = c(0,8,14,26,32,0,8),
61
#'    TestDose = 5,
62
#'    PH = 240,
63
#'    CH = 200,
64
#'    OSL_temp = 125
65
#'    )
66
#'
67
#' @noRd
68
.create_SAR.sequence <- function(
69
  RegDose,
70
  TestDose,
71
  PH,
72
  CH,
73
  OSL_temp,
74
  Irr_temp = 20,
75
  OSL_duration = 40,
76
  PH_duration = 10,
77
  dose_rate = 1,
78
  optical_power = 90
79
  ){
80

81 5
  temp.list <- list()
82 5
  sequence <- NULL
83 5
  for (i in 1:length(RegDose)){
84

85 5
    if(RegDose[i] == 0){
86

87 5
      temp.list <-list(
88 5
        TL = c(20, PH, 5),
89 5
        PAUSE = c(PH, PH_duration),
90 5
        OSL = c(OSL_temp, OSL_duration, optical_power), # Lx measurement
91 5
        IRR = c(Irr_temp, TestDose, dose_rate),
92 5
        TL = c(20,CH,5),
93 5
        OSL = c(OSL_temp, OSL_duration, optical_power) # Tx measurement
94
        )
95

96
    } else {
97

98 5
      temp.list <- list(
99 5
         IRR = c(Irr_temp, RegDose[i], dose_rate),
100 5
         TL = c(20, PH, 5),
101 5
         PAUSE = c(PH, PH_duration),
102 5
         OSL = c(OSL_temp, OSL_duration, optical_power), # Lx measurement
103 5
         IRR = c(Irr_temp, TestDose, dose_rate),
104 5
         TL = c(20, CH, 5),
105 5
         OSL = c(OSL_temp, OSL_duration, optical_power) #Tx measurement
106
      )
107
    }
108

109 5
    sequence <- c(sequence,temp.list)
110

111
  }
112

113 5
  return(sequence)
114

115
}

Read our documentation on viewing source code .

Loading