Description Usage Arguments Details Value Author(s) Examples
View source: R/extract_picarro_data.r
Function to convert raw data from picarro analyzer to respiration data
1 2 | extract_picarro(data_path = NA, use_dodgy_fudge_factor, lambda = 1e-04,
raw.data = FALSE)
|
data_path |
Directory containing all raw data from picarro analyzer within nested subdirectories. If not provided, user will be asked for path interactively. |
use_dodgy_fudge_factor |
Required parameter indicting whether to correct headspace concentrations using the factors in fractional_volume.txt file. Note that these correction factors were introduced by Silene deCiuces to correct for observed differences between a standard calibration gas and Picarro measurements. These discrepancies may or may not have been caused by mixing with gas in the pipework or by exchanges with ambient air through leaks.Depending on the current setup of the instrument, these corrections may or may not be required. If you are not sure, then please run a calibration standard to find out. |
lambda |
Optional smoothing parameter (positive real numeric). Higher values give greater smoothing. Smaller values follow data more closely. See help(regSmooth) for more details. |
raw.data |
Optional logical value for whether to return raw data tables in addition to the processed one. Useful for diagnostics and trouble shooting. |
This function returns a data.table with respired CO2 and CH4 concentrations and delta-13C values for each jar at each samping time
The data path must contain the following three things:
All raw Picarro data files for this experiment. Can be in nested subdirectories. NB picarro files are assumed to end in .dat – No other files in the data path should have this ending
fractional_volume.txt = provides fraction of head space gas divided by total volume including residal gas in the analyzer and pipework. Only required if the parameter use_dodgy_fudge_factor is set to TRUE
logfile (filename must start with the characters "logfile"), which contains epoch time, sample ID, and step ID ("Step 2" = sample analysis; "Step 3" = end of step 2; "Step 5" = purge analysis; "Step 6" = end of step 5).
The returned data.table columns, and their descriptions are:
jar = jar number to which row corresponds
epoch = epoch time of measurement
cycle = number of sampling cycle (i.e. increments each time a specific jar is analyzed)
combined_jar_cycle = jar number and cycle number pasted together
CO2_purge = Picarro-measured CO2 concentration at the end of the purge step (ppm)
CO2_respiration = Picarro-measured CO2 concentration at the peak (smoothed maximum) of the sampling step (ppm)
d13C_purge = Picarro-measured d13-CO2 (smoothed) at the end of the purge step (per mille). Note that this value is unreliable (just noise), when purging with CO2-free air. Do not use unless you are sure you understand what you are doing.
d13C_respiration = Picarro-measured d13-CO2 at the concentration-peak (smoothed maximum) of the sampling step (per mille).
<dilute.co2 is (smoothed) 1st value from each jar/cycle. I.e. concentration in pipework before headspace gas reaches the analyser> d13C values for dilute.co2 could be unreliable if CO2 concentrations are low. Use these isotope values with caution.
dilute.co2_purge = dilute.co2 concentration in purge step (ppm).
dilute.co2_respiration = dilute.co2 concentration in sampling step (ppm).
dilute.d13C_purge = dilute.co2 d13C in purge step (per mille).
dilute.d13C_respiration = dilute.co2 d13C in sampling step (per mille).
fractional_volume = jar-specific correction factor for fraction of gas at picarro that originates from within the headspace rather than the pipework
headspace.co2 = CO2_respiration, corrected for fractional_volume (ppm).
headspace.co2_purge = CO2_purge, corrected for fractional_volume (ppm).
fractional_mass = fractional_volume converted to mass of CO2 basis (mg/mg)
respired.co2 = CO2_respiration, corrected for fractional_volume (ppm).
headspace.d13c = d13C_respiration, corrected for fractional_volume (per mille). This correction provides highly suspect values. Use d13C_respiration values instead.
day = epoch time converted into days since the first measurement on that sample (days).
<Methane (CH4 has columns corresponding to the CO2 descriptions above): CH4_purge, CH4_respiration, d13CH4_purge, d13CH4_respiration, dilute.ch4_purge, dilute.ch4_respiration, dilute.d13CH4_purge, dilute.d13CH4_respiration CH4_purge, headspace.ch4, headspace.ch4_purge, headspace.d13ch4, evolved.ch4
Provides a data.table with respired CO2 and CH4 concentrations and delta-13C values for each jar at each samping time. See details. If called with raw.data = TRUE, then function returns a named list containing short.data = the above table; long.data = the same data in long format; and pic.data = the raw Picarro data, with columns added for sample number, step, cycle, and smoothed data.
Dominic Woolf. d.woolf@cornell.edu
1 2 3 4 5 6 7 8 9 | short.data = extract_picarro()
library(ggplot2)
ggplot(short.data[-1], aes(day, respired.co2)) +
geom_line() +
facet_wrap(~ jar)
ggplot(short.data[-1], aes(day, evolved.ch4)) +
geom_line() +
facet_wrap(~ jar)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.