lr_parse_jdx: Parse OceanInsight JCAMP-DX (.jdx) file

View source: R/parse_jdx.R

lr_parse_jdxR Documentation

Parse OceanInsight JCAMP-DX (.jdx) file

Description

Parse OceanInsight (formerly OceanOptics) JCAMP-DX (.jdx) file. https://www.oceaninsight.com/

Usage

lr_parse_jdx(filename)

Arguments

filename

Path of the file to parse

Details

'processed' column computed by lightr with the function lr_compute_processed().

Value

A named list of two elements:

  • data: a dataframe with columns "wl", "dark", "white", "scope" and "processed", in this order.

  • metadata: a character vector with metadata including:

    • user: Name of the spectrometer operator

    • datetime: Timestamp of the recording in format '%Y-%m-%d %H:%M:%S' and UTC timezone. If timezone is missing in source file, UTC time will be assumed (for reproducibility purposes across computers with different localtimes).

    • spec_model: Model of the spectrometer

    • spec_ID: Unique ID of the spectrometer

    • white_inttime: Integration time of the white reference (in ms)

    • dark_inttime: Integration time of the dark reference (in ms)

    • sample_inttime: Integration time of the sample (in ms)

    • white_avgs: Number of averaged measurements for the white reference

    • dark_avgs: Number of averaged measurements for the dark reference

    • sample_avgs: Number of averaged measurements for the sample

    • white_boxcar: Boxcar width for the white reference

    • dark_boxcar: Boxcar width for the dark reference

    • sample_boxcar: Boxcar width for the sample reference

References

McDonald RS, Wilks PA. JCAMP-DX: A Standard Form for Exchange of Infrared Spectra in Computer Readable Form. Applied Spectroscopy. 1988;42(1):151-62.

Examples

res_jdx <- lr_parse_jdx(system.file("testdata", "OceanOptics_period.jdx",
                                    package = "lightr"))
head(res_jdx$data)
res_jdx$metadata


lightr documentation built on May 14, 2022, 5:05 p.m.