Slice_Run | R Documentation |
function determining the slice and the new point x1
Slice_Run(x0, foo_x, foo_y, hist_y, w = 40, m = 10, Rmx = m * w)
x0 |
numeric (required) the current point |
foo_x |
a function y(x) |
foo_y |
a function p(y) |
hist_y |
a histogram of y density |
w |
numeric (required) estimate of the typical size of a slice |
m |
numeric (required) integer limiting the size of a slice to mw |
Rmx |
numeric (with default) bound value to limit edge effects (added) |
a list with the following elements
Element | Type | Description |
$x1 | numeric | the new point |
$L | numeric | the new left boundary of the slice |
$R | numeric | the new right boundary of the slice |
$y0 | numeric | the vertical level defining the slice |
#TL example from RLumModel
require(RLumModel)
data("ExampleData.ModelOutput", envir = environment())
TL_curve <- get_RLum(model.output, recordType = "TL$", drop = FALSE)
x<-TL_curve$data[,1]
y<-TL_curve$data[,2]
dev.off()
run0<-Slice_Init(x,y)
Slice_Run(run0$x0,run0$foo_x,run0$foo_y,run0$hist_y,Rmx=max(x))
#multiples TL calculées avec RLumModel##########
#call function "model_LuminescenceSignals", model = "Bailey2001"
# the irradiation dose is varied and then compared.
irradiation_dose <- seq(from = 0,to = 100,by = 20)
model.output <- lapply(irradiation_dose,
function(x){
sequence <- list(IRR = c(20, x, 1),
#PH = c(220, 10, 5),
TL=c(20,400,5))
data <- model_LuminescenceSignals(
sequence = sequence,
model = "Bailey2001",
plot = FALSE,
verbose = FALSE)
return(get_RLum(data, recordType = "TL$", drop = FALSE))
})
##combine output curves
TL_curve.merged <- merge_RLum(model.output)
##plot
plot_RLum(
object = TL_curve.merged,
xlab = "Temperature [°C]",
ylab = "TL signal [a.u.]",
main = "TL signal with various dose",
legend.text = paste("dose", irradiation_dose, "Gy"),
combine = TRUE)
##
n.pt<-length(TL_curve.merged[1]$data[,1])
n.irr<-length(irradiation_dose)
y<-x<-array(dim=c(n.pt,n.irr))
for (i in 1:n.irr){
x[,i]<-TL_curve.merged[i]$data[,1]
y[,i]<-TL_curve.merged[i]$data[,2]
}
run0<-Slice_Init(x[,1],y[,1])
Slice_Run(run0$x0,run0$foo_x,run0$foo_y,run0$hist_y,Rmx=max(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.