Learn R Programming

Luminescence (version 1.3.0)

read_BINXLOG2R: Import Risø BINX-data from the BINX Log File

Description

The function attempts to extract meaningful measurement data from the log file (.txt) stored along with a BINX file if this option was chosen. This is particularly helpful if the BINX file is broken and the data would be lost otherwise.

Usage

read_BINXLOG2R(file, verbose = TRUE, ...)

Value

Returns an S4 RLum.Analysis object. Results are returned as a list when multiple files are processed or file is a list.

Arguments

file

character (required): name of one or multiple ASCII log files to read; it can be a path to a directory, in which case the function tries to read all files it finds (there is no file extension check, so it may fail ungracefully on binary files).

verbose

logical (with default): enable/disable output to the terminal.

...

further arguments that will be passed to the function (currently not used)

Function version

0.1.1

Author

Sebastian Kreutzer, F2.1 Geophysical Parametrisation/Regionalisation, LIAG - Institute for Applied Geophysics (Germany) , RLum Developer Team

How to cite

Kreutzer, S., 2026. read_BINXLOG2R(): Import Risø BINX-data from the BINX Log File. Function version 0.1.1. In: Kreutzer, S., Burow, C., Dietze, M., Fuchs, M.C., Schmidt, C., Fischer, M., Friedrich, J., Mercier, N., Philippe, A., Riedesel, S., Autzen, M., Mittelstrass, D., Gray, H.J., Galharret, J., Colombo, M., Steinbuch, L., Boer, A.d., Bluszcz, A., 2026. Luminescence: Comprehensive Luminescence Dating Data Analysis. R package version 1.3.0. https://r-lum.github.io/Luminescence/

Details

This function is basically a hack trying to make the most out of a broken file in case at least the log file is salvageable. Please do not expect black magic; the extract is very basic, and the function was written to work for TL, OSL, IRSL curves only. If it breaks, it breaks.

TL curve extraction Since the BIN/BINX do not contain x-values, they also cannot be created magically here. To avoid problems with the conversion, we assume always BIN-file version 3 for the conversion. This should be okay in most cases, however, it may become problematic if you have data for dedicated curve analysis.

See Also

read_BIN2R, write_R2BIN, Risoe.BINfileData, base::readLines, RLum.Analysis, list.files

Examples

Run this code
## read log file (RLum.Analysis)
file <-  system.file("extdata/BINX_IRSL_LOG.TXT", package = "Luminescence")
object <-  read_BINXLOG2R(file = file)

## convert to RisoeBINFile-class object
object <- convert_RLum2Risoe.BINfileData(object)

## export as BINX
if (FALSE) {
 write_R2BIN(t, file = tempfile(), version = "04")
}

Run the code above in your browser using DataLab