Skip to contents padding-top: 70px;

Tool for reading plaintext log files created by Licor LI-6800 instruments and storing their contents in exdf objects.

Usage

read_licor_6800_plaintext(
    file_name,
    get_oxygen = TRUE,
    include_user_remark_column = TRUE,
    ...
  )

Arguments

file_name

A relative or absolute path to a plaintext file containing Licor data.

get_oxygen

A logical value indicating whether to get the oxygen percentage from the file's preamble using get_oxygen_from_preamble.

include_user_remark_column

A logical value indicating whether to include the user remarks as a column; see below for details.

...

Additional arguments; currently unused.

Details

Licor LI-6800 instruments create two types of log files: a plaintext file and an Excel file, each containing the same information. The plaintext files are the only ones guaranteed to be created, since the Excel files require the user to select an option to create them.

read_licor_6800_plaintext looks for two special lines in the Licor log file: the [Head] line indicates the beginning of the header (or preamble), and the [Data] line indicates the beginning of the data table. If these lines are missing from the file, it will not be loaded properly.

Closing and reopening a log file: When operating a Licor LI-6800, it is possible to close and then reopen a log file. Doing this causes the plaintext log file to contain multiple [Head] and [Data] sections. This function is able to handle such files.

User remarks: When operating a Licor LI-6800, it is possible to make a "remark." Each remark will appear in the plaintext log file in its own line, which begins with an HH:MM:SS time and then contains the remark text. The read_licor_6800_plaintext function identifies these user remarks and includes them in the return as an "extra" element called user_remarks. Note that changing stability criteria will also generate a user remark with a message describing the new stability settings.

When include_user_remark_column is TRUE, these user remarks will be included in the main data table as a column called user_remark. For each row in the table, the entry in the user_remark column will be set to the most recent user remark.

The user remark system is prone to errors, especially since changes to stability settings are recorded in the log files using the exact same format as true user remarks. In general, it is better to record metadata about measurements via user constants rather than user remarks.

User constants as rows: When operating a Licor LI-6800, it is possible to include user constants as either rows or columns. In general, it is better to include them as columns, and the read_licor_6800_plaintext function may not be able to properly read files where they are included as rows. Support for user constant rows may be added in the future.

Value

An exdf object that fully includes all the data from the Licor Excel file. In addition to the elements described in the documentation for read_gasex_file, the following "extra" elements are also included:

  • preamble: A data frame containing the "preamble" (or "header") information from the file.

  • user_remarks: A data frame containing any user remarks from the file. The data frame has two columns for the timestamp and the value, called remark_time and remark_value, respectively.

See also

Examples

# Example: Reading a Licor plaintext file that is included with the PhotoGEA
# package and viewing some of the "extra" information associated with the file
licor_file <- PhotoGEA:::read_licor_6800_plaintext(
  PhotoGEA_example_file_path('plaintext_licor_file')
)

str(licor_file$preamble)
#> 'data.frame':	1 obs. of  57 variables:
#>  $ File opened         : chr "2021-08-04 09:22:24"
#>  $ Console s/n         : chr "68C-831539"
#>  $ Console ver         : chr "Bluestem v.1.5.02"
#>  $ Scripts ver         : chr "2021.03  1.5.02, Feb 2021"
#>  $ Head s/n            : chr "68H-891539"
#>  $ Head ver            : chr "1.4.5"
#>  $ Head cal            : chr "{\"h2obzero\": \"1.1092\", \"ssa_ref\": \"31965.6\", \"h2obspan2b\": \"0.0719985\", \"h2oaspan2b\": \"0.0715867"| __truncated__
#>  $ Chamber type        : chr "6800-01A"
#>  $ Chamber s/n         : chr "MPF-651414"
#>  $ Chamber rev         : chr "0"
#>  $ Chamber cal         : chr "0"
#>  $ Fluorometer         : chr "MPF-651414"
#>  $ Flr. Version        : chr "1.4.5"
#>  $ SysConst:AvgTime    : chr "4"
#>  $ SysConst:Oxygen     : chr "21.0"
#>  $ ChambConst:Chamber  : chr "6800-01A"
#>  $ ChambConst:Aperture : chr "6 cm^2"
#>  $ ChambConst:blc_a    : chr "0.578"
#>  $ ChambConst:blc_b    : chr "0.5229739"
#>  $ ChambConst:blc_c    : chr "0.003740252"
#>  $ ChambConst:blc_d    : chr "-0.06197961"
#>  $ ChambConst:blc_e    : chr "-0.005608586"
#>  $ ChambConst:blc_minS : chr "1"
#>  $ ChambConst:blc_maxS : chr "6"
#>  $ ChambConst:blc_Po   : chr "96.9"
#>  $ LTConst:deltaTw     : chr "0"
#>  $ LTConst:fT1         : chr "1"
#>  $ LTConst:fT2         : chr "0"
#>  $ LTConst:fTeb        : chr "0"
#>  $ LQConst:Leaf        : chr "standard"
#>  $ LQConst:Ambient     : chr "Sun+Sky"
#>  $ LQConst:abs_ambient : chr "0.8"
#>  $ LQConst:abs_redLED  : chr "0.84"
#>  $ LQConst:abs_greenLED: chr "0.7"
#>  $ LQConst:abs_blueLED : chr "0.87"
#>  $ LQConst:abs_whiteLED: chr "0.75"
#>  $ LQConst:abs_redFlr  : chr "0.84"
#>  $ LQConst:abs_blueFlr : chr "0.87"
#>  $ LQConst:k_ambient   : chr "0.1911"
#>  $ LQConst:k_redLED    : chr "0.1512"
#>  $ LQConst:k_greenLED  : chr "0.161"
#>  $ LQConst:k_blueLED   : chr "0.2262"
#>  $ LQConst:k_whiteLED  : chr "0.1575"
#>  $ LQConst:k_redFlr    : chr "0.1596"
#>  $ LQConst:k_blueFlr   : chr "0.2175"
#>  $ QConst:fQ_Amb_in    : chr "0.0"
#>  $ QConst:fQ_Amb_out   : chr "0.0"
#>  $ QConst:fQ_HeadLS    : chr "0.0"
#>  $ QConst:fQ_ConsoleLS : chr "0.0"
#>  $ QConst:fQ_Flr       : chr "1.0"
#>  $ LeakConst:fan_a     : chr "-6276.0"
#>  $ LeakConst:fan_b     : chr "6.6"
#>  $ LeakConst:fan_c     : chr "1.709e-05"
#>  $ LeakConst:fan_d     : chr "3.11"
#>  $ LeakConst:Fs_meas   : chr "3.37548 84.5351 372.99 621.291 866.807 1096.7 1244.78 1402.89"
#>  $ LeakConst:Fs_true   : chr "0.0646052 105.617 400.849 601.323 799.968 1001.32 1200.39 1401.02"
#>  $ LeakConst:leak_wt   : chr "0"

print(licor_file$user_remarks)
#>   remark_time
#> 1    09:22:24
#>                                                                                 remark_value
#> 1 Stability Definition: gsw (GasEx): Slp<0.2 Std<0.02 Per=30 A (GasEx): Slp<1 Std<0.2 Per=30