import_presens {respirometry} | R Documentation |
Import data from a PreSens O2 transmitter
Description
Imports the standard text file output from most single channel PreSens fiber optic O2 transmitters and converts the data into a data frame.
Usage
import_presens(
file,
o2_unit = "percent_a.s.",
date = "%d/%m/%y",
sal = 35,
all_cols = FALSE,
split_channels = FALSE
)
Arguments
file |
a character string. The filepath for the file to be read. |
o2_unit |
a character string. The unit of O2 measurement to be output in the data frame. Options are described in |
date |
a character string. The date format to be passed to |
sal |
salinity of water sample (psu). Default is 35 psu. Ignored for Fibox 4 files since salinity is provided by the file. |
all_cols |
logical. For Fibox 4 files only. Should all columns (including calibration data and serial numbers) be output? |
split_channels |
logical. For SDR SensorDish only. Should a list of data frames be returned with a separate data frame for each channel? Default is |
Details
The following PreSens fiber optic O2 transmitters are supported:
Fibox 4
Fibox 3
Fibox 3 trace
Fibox 3 LCD trace
Microx TX3
Microx TX3 trace
SDR SensorDish Reader
If you would like support for another PreSens O2 meter, email the package maintainer a data file from the device you would like supported.
It is very important to note that the PreSens fiber optics O2 transmitters that are supported with this function (except the Fibox 4) DO NOT account for salinity (i.e. they assume salinity = 0 ppt). If the water sample measured was not fresh water, the oxygen concentrations (e.g. mg per liter or umol per liter) are incorrect in the PreSens txt file. This function corrects these O2 concentrations based on the salinity value defined by the sal
argument. Absolute partial pressures (i.e. hPa and torr) will also be slightly different due to the slight influence of salinity on water's vapor pressure. This difference is typically ~0.05% of the recorded value.
Value
A data frame is returned.
- TIME
Date and time, POSIXct format.
- DURATION
Duration of measurement trial (minutes).
- O2
Oxygen measurement in desired unit as determined by
o2_unit
.- PHASE
Phase recorded. Phase is inversely related to O2. Not included in SDR SensorDish Reader files.
- AMPLITUDE
Amplitude recorded. Amplitude is an indicator of the quality of the signal. A low amplitude warning is produced by the transmitter below 2500. Not included in SDR SensorDish Reader files.
- TEMP
Temperature recorded or defined at beginning of measurement trial.
- ATM_PRES
Atmospheric pressure (mbar).
- SAL
Salinity (psu).
- ERROR_CODE
Error code from transmitter. See PreSens user manual for translation of error code. Not included in SDR SensorDish Reader files.
Note
Oxygen conversions are based on conv_o2
and therefore differ slightly from the conversions provided by PreSens.
Author(s)
Matthew A. Birk, matthewabirk@gmail.com
See Also
import_pyroscience_workbench
, import_firesting
, import_witrox
, conv_o2
Examples
## Not run:
# Import a Fibox 3 file.
file <- system.file('extdata', 'fibox_3_file.txt', package = 'respirometry')
import_presens(file, o2_unit = 'umol_per_l', sal = 25)
# Import a Fibox 4 file.
file <- system.file('extdata', 'fibox_4_file.csv', package = 'respirometry')
import_presens(file = file, date = '%d-%b-%Y')
# Import an SDR SensorDish Reader file.
file <- system.file('extdata', 'sdr_file.txt', package = 'respirometry')
import_presens(file = file, date = '%d.%m.%y%X')
## End(Not run)