create new script for GC-PGA comparison (MR !2)
create new script for GC-PGA comparison (MR !2 (merged))
- create the new DF
simGCsamplesDF
with gas-concentration samples per measurement period (mp) that may simulate GC sampling- this DF may be used to simulate flux calculation from GC sampling data
- the new option
simulateGCdata <- "F" # [F,T]
en-/disables the sampling - the new file
sample_gas_concentrations_for_gc_simulation_per_mp.R
and functionf_sample_gas_concentrations_for_gc_simulation_per_mp
is added to actually take the samples per mp and store them in a new DF- this new DF has identical columns as the "gas concentration DF"
measPeriodN2oCorr
and, hence, may be readily used with the flux calculation - the new section 6. "Sample gas concentration data for GC simulation" calls this function
- samples are taken at specific times after the start of the mp, and are calculated from multiple values right before and after the particular time
- this new DF has identical columns as the "gas concentration DF"
- options for this sampling are set in the new file
additional_info/simulate_gc_n2o_data.txt
including- the set of filter/correction function to run
- points in time for sampling
- min length of mp
- the
f_sample_gas_concentrations_for_gc_simulation_per_mp
writes a logfile that is formated as table with column header- it is ready to anaöyse and get an overview of the sampling of all mp
- it includes the information about whether sampling was done for data that are "short flatlines"
- columns are: "measID sample_time_sec median_value median_value_sd sample_time_is_flatline any_meas_of_median_calc_is_flatline"
- a new column is added to the gas concentration DF
measPeriodN2o
, before data filtering/correcting in the main_script, that marks the measurement data that was identified as "short flatline"- column name
detected_flatline
, with default value 0 - the
data_filter_function_05
incorrect_filter_n2o_conc_by_meas_period.R
now adds a 1 for each measurement data point that is detected as "short flatline"
- column name
- testing:
- the new DF
simGCsamplesDF
contains the data as expected - the main script runs fine with
simulateGCdata
set to T & F - ... TODO test flux calculation with goFlux
- the new DF
Closes #6 (closed)
Edited by Jan Engel