R-Lum/Luminescence

Enhanced analyse_SAR.CWOSL() to enable the analysis of decomposed CW-OSL data

Closed this issue · 4 comments

Hi RLum-Team!

I work on a new package, named OSLdecomposition. It is primarily created to separate the signal components in CW-OSL measurements of quartz. The basic idea is explained in my DLED2019 talk, see here: http://luminescence.de/OSLdecomp_talk.pdf

Currently, my package uses its own R script to analyse SAR-measured data. But it would be better to use Luminescence::analyze_SAR.CWOSL() instead. So, I forked Luminescence (the dev branch), enhanced analyse_SAR.CWOSL() and created a new function Luminescence::calc_OSLLxTxDecomposed() to enable the analysis of OSLdecomposition-manipulated RLum.Analysis data sets.

My goal is to make the following code snippet work:

Workflow example

library(Luminescence)
library(OSLdecomposition)

# BIN files measured with Risoe TL/OSL Reader or Freiberg Instruments lexsygs can be used as usual. 
# Here, we use the example data set provided by the Luminescence package
data(ExampleData.BINfileData, envir = environment())
OSLdata <- Risoe.BINfileData2RLum.Analysis(CWOSL.SAR.Data)

# Consistent detection settings are essential. These are checked by RLum.OSL_correction() which also
# provides various tools for data correction and data improvement, like background subtraction. 
# But all these tools are optional. Most data sets can be adequately decomposed without running RLum.OSL_correction()
OSLdata_corrected <- RLum.OSL_correction(OSLdata)

# In the first step, the OSL components and their decay rates are identified
# by multi-exponential fitting at a global CW-OSL curve. 
# The obtained information can be found at: OSLdata_fitted$OSL_COMPONENTS
OSLdata_fitted <- RLum.OSL_global_fitting(OSLdata_corrected, 
                                          stimulation_intensity = 75)

# In the second step, a very robust algorithm uses the decay constants to decompose 
# every CW-OSL record into its signal components, see OSLdata_decomposed[[...]]@records[[...]]@info[["COMPONENTS"]]
OSLdata_decomposed <- RLum.OSL_decomposition(OSLdata_fitted)

# The De's for specific signal components can be calculated without the need of 
# defining integration intervals
De_fast_component <- analyse_SAR.CWOSL(OSLdata_decomposed, OSL.component = 1)
De_medium_component <- analyse_SAR.CWOSL(OSLdata_decomposed, OSL.component = 2)

# We can compare the component-based De's with the classical calculated late background subtraction De's
De_late_background <- analyse_SAR.CWOSL(OSLdata, 1, 14, 800, 1000, plot = FALSE)
plot_KDE(list(De_late_background, 
              De_fast_component, 
              De_medium_component))

My plan is to create a pull request of my Luminescence fork within the next one or two weeks. This pull request will just contain the necessary functionality. Integrity checks (aside from some fundamental ones) and roxygen documentation will not be part of the first pull request. I would write them after the functionality is merged into the R-Lum dev branch.

In a later iteration, it might also be reasonable to enhance analyse_portableOSL() and analyse_Al2O3C_Measurement() to work with OSLdecomposition and to transfer OSLdecomposition::RLum.OSL_correction() into the Luminescence package.

Hi @DirkMittelstrass thanks for your input and we are looking forward to the pull request.

Hi RLum team!

I pushed my fork of Luminescence today. The (updated) code snippet from my first post does now actually work. You obtain the De distributions for the fast and the medium component without the need to manually setting any parameter. The above code snippet produces also two reports, see here and here.

I hope the changes in the Luminescence package can be integrated smoothly,
Dirk

KDE_plot
Figure: KDE plot of analyse_CW.OSL.SAR() result of the Luminescence OSL example data as evaluated in the first post. black: Late background subtraction De's; red: Fast component De's; green: Medium component De's

@DirkMittelstrass Hi Dirk, thanks for this effort I will attend to it as soon as possible.

Closing issue because it is implemented already.