R-Lum / RLumModel
1
#' Calculate signals in the energy-band-model of quartz
2
#'
3
#' This function calculates TL, OSL and RF signals from quartz simulations.
4
#' The signal occurs by recombination of an electron to a luminescence center.
5
#'
6
#' @param object \code{\link{matrix of class deSolve}} (\bold{required}):
7
#'
8
#' @param parameters \code{\link{list}} (\bold{required}): set parameters to calculate the signal.
9
#' Parameters are depend of the chosen model.
10
#'
11
#' @return This function returns a vector with OSL/TL/RF signal per time.
12
#'
13
#' @section Function version: 0.1.1
14
#'
15
#' @author Johannes Friedrich, University of Bayreuth (Germany),
16
#'
17
#' @references
18
#'
19
#' Bailey, R.M., 2001. Towards a general kinetic model for optically and thermally stimulated
20
#' luminescence of quartz. Radiation Measurements 33, 17-45.
21
#'
22
#'
23
#' @seealso \code{\link{set_ODE}}, \code{\link{set_Pars}}
24
#'
25
#' @examples
26
#'
27
#' #so far no example available
28
#'
29
#' @noRd
30
.calc_signal <- function(
31
  object,
32
  parameters
33
  ){
34

35
  ##============================================================================##
36
  ## unpack parameters to be used in this function
37
  ##============================================================================##
38 5
  N <- parameters$N
39 5
  B <- parameters$B
40 5
  k_B <- parameters$k_B
41
  
42 5
  K <- parameters$K
43

44 5
  W <- ifelse(K == 0, 0, parameters$W)
45
  
46 5
  temp <- parameters$temp
47 5
  b <- parameters$b
48 5
  times <- parameters$times
49
  ##============================================================================##
50

51
#delete time-row from ODE object
52 5
object <- object[,-1]
53

54
#unname luminescence center for easier use
55
#luminescence center is the last entry in parameters
56 5
n_L <- unname(object[,length(N)])
57

58

59
#name conduction band for easier use
60
#luminescence center is next to max parameters (see ODE)
61 5
n_c <- unname(object[,length(N)+1])
62

63
#calculating quenching factor
64 5
nu <- 1/(1+K*exp(-W/(k_B*(273+temp+b*times))))
65

66
#calculating signal (recombination from conduction band to L-center)
67 5
signal <- n_L*n_c*B[length(N)]*nu
68

69
#return signal
70 5
return(signal)
71

72
}

Read our documentation on viewing source code .

Loading