Learn R Programming

lightr (version 1.9.0)

lr_parse_jaz: Parse OceanOptics converted file

Description

Parse OceanOptics/OceanInsight converted file. https://www.oceanoptics.com/

Usage

lr_parse_jaz(filename, ...)

lr_parse_jazirrad(filename, ...)

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

Arguments

filename

Path of the file to parse

...

ignored

Details

'processed' column computed by official software and provided as is.

Examples

Run this code
res_jaz <- lr_parse_jaz(system.file("testdata", "jazspec.jaz",
                        package = "lightr"))
head(res_jaz$data)
res_jaz$metadata

res_jazirrad <- lr_parse_jazirrad(system.file("testdata", "irrad.JazIrrad",
                                  package = "lightr"))
head(res_jazirrad$data)
res_jazirrad$metadata

res_usb4000 <- lr_parse_jaz(system.file("testdata", "OOusb4000.txt",
                            package = "lightr"))
head(res_usb4000$data)
res_usb4000$metadata

res_transmission <- lr_parse_jaz(
  system.file("testdata", "FMNH6834.00000001.Master.Transmission",
               package = "lightr")
)
head(res_transmission$data)
res_transmission$metadata

Run the code above in your browser using DataLab