Learn R Programming

Luminescence (version 0.2.4)

readBIN2R: Import Risoe BIN-file into R

Description

Import a *.bin file produced by a Risoe DA15 and DA20 TL/OSL reader into R.

Usage

readBIN2R(file,
          show.raw.values = FALSE,
          n.records,
          show.record.number = FALSE,
          txtProgressBar = TRUE
)

Arguments

file
character (required): bin-file name (including path), e.g. [WIN]: readBIN2R("C:/Desktop/test.bin"), [MAC/LINUX]: readBIN2R("/User/test/Desktop/test.bin")
show.raw.values
logical (with default): shows raw values from BIN file for LTYPE, DTYPE and LIGHTSOURCE without translation in characters.
n.records
integer (optional): limits the number of imported records. Can be used in combination with show.record.number for debugging purposes, e.g. corrupt BIN files.
show.record.number
logical (with default): shows record number of the imported record, for debugging usage only.
txtProgressBar
logical (with default): enables or disables txtProgressBar.

Value

  • Returns an S4 Risoe.BINfileData-class object containing two slots:
  • METADATAA data.frame containing all variables stored in the bin-file.
  • DATAA list containing a numeric vector of the measured data. The ID corresponds to the record ID in METADATA

Version

0.5.1 [2013-03-10]

Details

The binary data file is parsed byte per byte following the data structure published in the Appendices of the Analyst manual p. 42. General BIN-file structure

rlll{ [,1] ID : Unique record ID (same ID as in slot DATA) numeric [,2] SEL : Record selection logical [,3] VERSION : Data format version number raw [,4] LENGTH : Length of this record integer [,5] PREVIOUS : Length of previous record integer [,6] NPOINTS : Number of data points in the record integer [,7] LTYPE : Luminescence type factor [,8] LOW : Low (temperature, time, wavelength) numeric [,10] HIGH : High (temperature, time, wavelength) numeric [,11] RATE : Rate (heating rate, scan rate) numeric [,12] TEMPERATURE : Sample temperature integer [,13] XCOORD : X position of a single grain integer [,14] YCOORD : Y position of a single grain integer [,15] TOLDELAY : TOL 'delay' channels integer [,16] TOLON : TOL 'on' channels integer [,17] TOLOFF : TOL 'off' channels integer [,18] POSITION : Carousel position integer [,19] RUN : Run number integer [,20] TIME : Data collection time (hh-mm-ss) factor [,21] DATA : Data collection date (dd-mm-yy) factor [,22] SEQUENCE : Sequence name factor [,23] USER : User name factor [,24] DTYPE : Data type factor [,25] IRR_TIME : Irradiation time numeric [,26] IRR_TYPE : Irradiation type (alpha, beta or gamma) integer [,27] IRR_UNIT : Irradiation unit (Gy, Rads, secs, mins, hrs) integer [,28] BL_TIME : Bleaching time numeric [,29] BL_UNIT : Bleaching unit (mJ, J, secs, mins, hrs) integer [,30] AN_TEMP : Annealing temperature numeric [,31] AN_TIME : Annealing time numeric [,32] NORM1 : Normalisation factor (1) numeric [,33] NORM2 : Normalisation factor (2) numeric [,34] NORM3 : Normalisation factor (3) numeric [,35] BG : Background level numeric [,36] SHIFT : Number of channels to shift data integer [,37] SAMPLE : Sample name factor [,38] COMMENT : Comment factor [,39] LIGHTSOURCE : Light source factor [,40] SET : Set Number integer [,41] TAG : Tag integer [,42] GRAIN : Grain number integer [,43] LPOWER : Optical Stimulation Power numeric [,44] SYSTEMID : System ID integer }

LTYPES

rll{ [,0] TL : Thermoluminescence [,1] OSL : Optically stimulated luminescence [,2] IRSL : Infrared stimulated luminescence [,3] M-IR : Infrared monochromator scan [,4] M-VIS : Visible monochromator scan [,5] TOL : Thermo-optical luminescence [,6] TRPOSL : Time Resolved Pulsed OSL [,7] RIR : Ramped IRSL [,8] RBR : Ramped Blue LEDs [,9] USER : User defined [,10] POSL : Pulsed OSL [,11] SGOSL : Single Grain OSL [,12] RL : Radio Luminescence [,13] XRF : X-ray Fluorescence }

(information on the LTYPE kindly provided by Risoe, DTU Nutech)

References

Duller, G., 2007. Analyst.

See Also

Risoe.BINfileData, readBin, txtProgressBar

Examples

Run this code
##readBIN2R("~/Desktop/Example.bin")

Run the code above in your browser using DataLab