process_psi: Wrapper function to import data from PSI FRRf and fit...

Description Usage Arguments Value

View source: R/process_psi.R

Description

This function will import a PSI Fluorwin output file and will attempt to fit FRRf induction/re-opening models to the dataset. It can process files generated with Doug Campbell's double FRRf protocol and with the PSI RLC wizard (not implemented yet).

Usage

1
2
3
4
process_psi(file_name, out_name = "results", sti_model = "all",
  str_model = "tau1", calib_file = NA, protocol = "campbell",
  turn_plots_off = FALSE, plot_matrix = FALSE, out_files = FALSE,
  out_pdf = FALSE, dec = ".", subset_time = 600)

Arguments

file_name

Path to the file to be imported

out_name

Name the file to be exported with the results. Only works if the user selects out_files=TRUE.

sti_model

Parameters to fit to the induction curve. Default is "all". Options are: "all", "sigma_rho" and "sigma". "All" - fo, fm, sigma and rho are fitted; "sigma_rho" - sigma and rho are fitted, fo and fm are fixed at user-defined levels, defaults are fo = 1st point of the fluorescence data vector y, fm = average of the maximum 5 points of the fluorescence data vector y; "sigma" - fo, fm and rho are fixed, only sigma is fitted.

str_model

Type of re-opening model. Options: "tau1", "tau2", "tau3" and "tau1_subset" (the user selects a subset of the data starting from the first point of the re-opening curve). Default is tau1, fitting re-opening with a single phase exponential decay with lifetime of tau1.

calib_file

Path to the calibration file to convert lamp voltage settings to photons. A^-2^ . s^-1^. If not provided the default is a calibration function from a Doug Campbell PSI FL3500 instrument. If you are not using his machine the parameters sigmaPSII, cumulative excitation and actinic PAR values associated to an individual machine will be wrongly calibrated.

protocol

Type of protocol used to produce the PSI file. Currently only "campbell" is implemented.

turn_plots_off

Logical, plots off. Default = FALSE

plot_matrix

Logical, should plots be plotted to a plot matrix. Default = TRUE

out_files

Logical, should results (fitted parameters) be exported to a csv file. Default = FALSE

out_pdf

Logical, should plot be exported to a pdf file. Default = FALSE

dec

decimal separator, default= "."

subset_time

selects a subset of the re-opening dataset based on time (micro seconds) from the first point. To be used only with the tau1_subset model.

Value

Returns a list with 3 elements. The first element (data) contains five data frames and one numeric vector: 1 - all.data = raw data input; 2 - meta.data = acquisiton settings; flashlet_energy = the calculated flashlet energy from the calibration file; 3 - data.sti = induction only; 4 - data.str = re-opening only; 5 - measuring_steps = voltage and equivalent actinic PAR at each step. The second element (sti_parameters) contains a data frame with fitted parameters for the induction step and respective SE, p-values.The third element (str_parameters) contains a data frame with fitted parameters for the re-opening step and respective SE, p-values.


bmjesus/psifluo documentation built on Aug. 27, 2020, 1:47 a.m.