Learn R Programming

Luminescence (version 0.3.1)

readXSYG2R: Import XSYG files to R

Description

Imports XSYG files produced by a Freiberg Instrument lexsyg reader into R.

Usage

readXSYG2R(file, recalculate.TL.curves = TRUE, import = TRUE, 
    txtProgressBar = TRUE)

Arguments

file
character (required): path and file name of the XSYG file.
recalculate.TL.curves
logical (with default): if set to TRUE, TL curves are returned as temperature against count values (see details for more information) Note: The option overwrites the time vs. count TL curve. Select
import
logical (with default): if set to FALSE, only the XSYG file structure is shown.
txtProgressBar
logical (with default): enables TRUE or disables FALSE the progression bar during import

Value

  • Using the option import = FALSE A list consisting of two elements is shown:
  • Sampledata.frame with information on file.
  • Sequencesdata.frame with information on the sequences stored in the XSYG file
  • . Using the option import = TRUE (default) A list is provided, the list elements contain:
  • Sequence.Headerdata.frame with information on the sequence.
  • Sequence.ObjectRLum.Analysis containing the curves.

Details

How does the import function work? The function uses the xml package to parse the file structure. Each sequence is subsequently translated into an RLum.Analysis object. General structure XSYG format x0 , y0 ; x1 , y1 ; x2 , y2 ; x3 , y3 So far, each XSYG file can only contain one , but multiple sequences. Each record may compris several curves. TL curve recalculation On the lexsyg device TL curves are recorded as time against count values. Temperature values are monitored on the heating plate and stored in a separate curve (time vs. temperature). If the option recalculate.TL.curves = TRUE is chosen, the time values for each TL curve are replaced by temperature values. Practically, this means combining two matrices with different row numbers by their time values. If multiple count values per temperature are obtained, the mean of count values per temperature value is calculated. Note: Temperature values for spectrum curves are currently not supported.

References

Grehl, S., Kreutzer, S., Hoehne, M., 2013. Documentation of the XSYG file format. Unpublished Technical Note. Freiberg, Germany Further reading XML: http://en.wikipedia.org/wiki/XML

See Also

xml, RLum.Analysis, RLum.Data.Curve

Examples

Run this code
##Import XSYG file
##uncomment for usage
#temp <- readXSYG2R("input_file.xsyg")

##Additional examples for pure XML import using the package XML
##uncomment for usage

  ##import entire file
  #temp <- xmlRoot(xmlTreeParse("input_file.xsyg"))
  
  ##search for specific subnodes with curves containing 'OSL'
  #getNodeSet(temp, "//Sample/Sequence/Record[@recordType = 'OSL']/Curve")

Run the code above in your browser using DataLab