Package 'pam'

Title: Fast and Efficient Processing of PAM Data
Description: Processing Chlorophyll Fluorescence & P700 Absorbance data generated by WALZ hardware. Four models are provided for the regression of Pi curves, which can be compared with each other in order to select the most suitable model for the data set. Control plots ensure the successful verification of each regression. Bundled output of alpha, ETRmax, Ik etc. enables fast and reliable further processing of the data.
Authors: Julien Böhm [cre, aut] , Philipp Schrag [aut]
Maintainer: Julien Böhm <[email protected]>
License: GPL-3
Version: 1.0.2
Built: 2025-02-25 11:34:20 UTC
Source: https://github.com/cran/pam

Help Index


Combined ETR Plot and Summary Table

Description

Generates a plot of ETR data with different regression model predictions and a summary table.

Usage

combo_plot_control(title, data, model_results, name_list, color_list)

Arguments

title

Character. Plot title.

data

Data frame. ETR and PAR data.

model_results

List. Regression data and parameters.

name_list

List. Names for models (legend and table).

color_list

List. Colors for model lines.

Details

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#combo_control_plot.

Value

A plot with ETR data, regression results, and a summary table.

#' @examples path <- file.path(system.file("extdata", package = "pam"), "20240925.csv") data <- read_dual_pam_data(path)

model_results_eilers_peeters <- eilers_peeters_generate_regression_ETR_I(data) model_results_platt <- platt_generate_regression_ETR_I(data) model_results <- list(eilers_peeters_modified(model_results), platt_modified(model_results)) name_list <- c("Eilers-Peeters", "Platt") color_list <- c("red", "pink") plot <- combo_plot_control("test", data, model_results, name_list, color_list)


Compare Regression Models for ETR I

Description

Compares multiple regression models for electron transport rate (ETR) data using predefined performance metrics.

Usage

compare_regression_models_ETR_I(data_dir)

Arguments

data_dir

A character string specifying the directory containing input data files.

Details

This function compares the performance of the following models:

  • Eilers-Peeters (1988)

  • Platt (1980)

  • Vollenweider (1965)

  • Walsby (1997)

Models are ranked based on the deviation between observed and predicted values. The results guide users in selecting the most appropriate model for their dataset. Start values for parameters cannot be adjusted within this function. A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#walsby_modified

Value

A vector with total points assigned to each regression model based on their performance. Models are ranked as follows:

  • 1st place: 3 points

  • 2nd place: 2 points

  • 3rd place: 1 point

  • 4th place: 0 points

If regression is not possible for a model, no points are awarded for any of the models for the respective file.

References

Eilers, P. H. C., & Peeters, J. C. H. (1988). A model for the relationship between light intensity and the rate of photosynthesis in phytoplankton. Ecological Modelling, 42(3-4), 199-215. Available at: doi:10.1016/0304-3800(88)90057-9

Platt, T., Gallegos, C. L., & Harrison, W. G. (1980). Photoinhibition of photosynthesis in natural assemblages of marine phytoplankton. Journal of Marine Research, 38(4). Available at: https://elischolar.library.yale.edu/journal_of_marine_research/1525/.

Romoth, K., Nowak, P., Kempke, D., Dietrich, A., Porsche, C., & Schubert, H. (2019). Acclimation limits of Fucus evanescens along the salinity gradient of the southwestern Baltic Sea. Botanica Marina, 62(1), 1-12. Available at: doi:10.1515/bot-2018-0098.

Vollenweider, R. A. (1965). Calculation models of photosynthesis-depth curves and some implications regarding day rate estimates in primary production measurements. In C. R. Goldman (Ed.), Primary Productivity in Aquatic Environments (pp. 427-457). Mem. Ist. Ital. Idrobiol., 18 Suppl., University of California Press, Berkeley.

Walsby, A. E. (1997). Numerical integration of phytoplankton photosynthesis through time and depth in a water column. New Phytologist, 136(2), 189-209. Available at: doi:10.1046/j.1469-8137.1997.00736.x.

Examples

path <- file.path(system.file("extdata", package = "pam"))
points <- compare_regression_models_ETR_I(path)

Compare Regression Models for ETR II

Description

Compares multiple regression models for electron transport rate (ETR) data using predefined performance metrics.

Usage

compare_regression_models_ETR_II(data_dir)

Arguments

data_dir

A character string specifying the directory containing input data files.

Details

This function compares the performance of the following models:

  • Eilers-Peeters (1988)

  • Platt (1980)

  • Vollenweider (1965)

  • Walsby (1997)

Models are ranked based on the deviation between observed and predicted values. The results guide users in selecting the most appropriate model for their dataset. Start values for parameters cannot be adjusted within this function. A detailed documentation can be found in the README.

Value

A vector with total points assigned to each regression model based on their performance. Models are ranked as follows:

  • 1st place: 3 points

  • 2nd place: 2 points

  • 3rd place: 1 point

  • 4th place: 0 points

If regression is not possible for a model, no points are awarded for any of the models for the respective file.

References

Eilers, P. H. C., & Peeters, J. C. H. (1988). A model for the relationship between light intensity and the rate of photosynthesis in phytoplankton. Ecological Modelling, 42(3-4), 199-215. Available at: doi:10.1016/0304-3800(88)90057-9

Platt, T., Gallegos, C. L., & Harrison, W. G. (1980). Photoinhibition of photosynthesis in natural assemblages of marine phytoplankton. Journal of Marine Research, 38(4). Available at: https://elischolar.library.yale.edu/journal_of_marine_research/1525/.

Romoth, K., Nowak, P., Kempke, D., Dietrich, A., Porsche, C., & Schubert, H. (2019). Acclimation limits of Fucus evanescens along the salinity gradient of the southwestern Baltic Sea. Botanica Marina, 62(1), 1-12. Available at: doi:10.1515/bot-2018-0098.

Vollenweider, R. A. (1965). Calculation models of photosynthesis-depth curves and some implications regarding day rate estimates in primary production measurements. In C. R. Goldman (Ed.), Primary Productivity in Aquatic Environments (pp. 427-457). Mem. Ist. Ital. Idrobiol., 18 Suppl., University of California Press, Berkeley.

Walsby, A. E. (1997). Numerical integration of phytoplankton photosynthesis through time and depth in a water column. New Phytologist, 136(2), 189-209. Available at: doi:10.1046/j.1469-8137.1997.00736.x.

Examples

path <- file.path(system.file("extdata", package = "pam"))
points <- compare_regression_models_ETR_II(path)

Default start value

Description

Default start value

Usage

eilers_peeters_default_start_value_a

Format

An object of class numeric of length 1.


Default start value

Description

Default start value

Usage

eilers_peeters_default_start_value_b

Format

An object of class numeric of length 1.


Default start value

Description

Default start value

Usage

eilers_peeters_default_start_value_c

Format

An object of class numeric of length 1.


Eilers-Peeters Regression for ETR I

Description

Fits a regression model for ETR I based on Eilers-Peeters (1988), considering photoinhibition.

Usage

eilers_peeters_generate_regression_ETR_I(
  data,
  a_start_value = eilers_peeters_default_start_value_a,
  b_start_value = eilers_peeters_default_start_value_b,
  c_start_value = eilers_peeters_default_start_value_c
)

Arguments

data

A data.table from read_dual_pam_data.

a_start_value

Numeric. Starting value for aa. Default: a_start_values_eilers_peeters_default.

b_start_value

Numeric. Starting value for bb. Default: b_start_values_eilers_peeters_default.

c_start_value

Numeric. Starting value for cc. Default: c_start_values_eilers_peeters_default.

Details

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#eilers_peeters_generate_regression_etr_i-and-eilers_peeters_generate_regression_etr_ii.

Value

A list containing:

  • etr_regression_data: Predicted ETR values.

  • sdiff: Deviation between actual and predicted values.

  • a, b, c: Fitted parameters.

  • pm: Maximum ETR (pmp_m).

  • s: Initial slope (ss).

  • ik: Transition point from light limitation to light saturation (IkI_k).

  • im: PAR at maximum ETR (ImI_m).

  • w: Peak sharpness (ww).

References

Eilers, P. H. C., & Peeters, J. C. H. (1988). A model for the relationship between light intensity and the rate of photosynthesis in phytoplankton. Ecological Modelling, 42(3-4), 199-215. Available at: doi:10.1016/0304-3800(88)90057-9

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- eilers_peeters_generate_regression_ETR_I(data)

Eilers-Peeters Regression for ETR II

Description

Fits a regression model for ETR II based on Eilers-Peeters (1988), considering photoinhibition.

Usage

eilers_peeters_generate_regression_ETR_II(
  data,
  a_start_value = eilers_peeters_default_start_value_a,
  b_start_value = eilers_peeters_default_start_value_b,
  c_start_value = eilers_peeters_default_start_value_c
)

Arguments

data

A data.table from read_dual_pam_data.

a_start_value

Numeric. Starting value for aa. Default: a_start_values_eilers_peeters_default.

b_start_value

Numeric. Starting value for bb. Default: b_start_values_eilers_peeters_default.

c_start_value

Numeric. Starting value for cc. Default: c_start_values_eilers_peeters_default.

Details

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#eilers_peeters_generate_regression_etr_i-and-eilers_peeters_generate_regression_etr_ii.

Value

A list containing:

  • etr_regression_data: Predicted ETR values.

  • sdiff: Deviation between actual and predicted values.

  • a, b, c: Fitted parameters.

  • pm: Maximum ETR (pmp_m).

  • s: Initial slope (ss).

  • ik: Transition point from light limitation to light saturation (IkI_k).

  • im: PAR at maximum ETR (ImI_m).

  • w: Peak sharpness (ww).

References

Eilers, P. H. C., & Peeters, J. C. H. (1988). A model for the relationship between light intensity and the rate of photosynthesis in phytoplankton. Ecological Modelling, 42(3-4), 199-215. Available at: doi:10.1016/0304-3800(88)90057-9

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- eilers_peeters_generate_regression_ETR_II(data)

Eilers & Peeters Model Modification

Description

This function enhances the Eilers and Peeters (1988) model by adding parameters not originally included in the model, which were introduced by other models. It also renames parameters to a standardized naming convention used across all models.

Usage

eilers_peeters_modified(model_result)

Arguments

model_result

A list containing the results of the model, including parameters such as a, b, c, s, pm, ik, im, and w.

Details

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#eilers_peeters_modified

Value

A modified model result as a list with the following elements:

  • etr_type: ETR Type based on the model result.

  • etr_regression_data: Regression data with ETR predictions based on the fitted model.

  • sdiff: The difference between observed and predicted ETR values.

  • a: The obtained parameter a.

  • b: The obtained parameter b.

  • c: The obtained parameter c.

  • d: Not available, set to NA_real_.

  • alpha: The initial slope of the light curve, transferred unchanged as s.

  • beta: Not available, set to NA_real_.

  • etrmax_with_photoinhibition: The maximum electron transport rate with photoinhibition, transferred as pm.

  • etrmax_without_photoinhibition: Not available, set to NA_real_.

  • ik_with_photoinhibition: PAR where the transition point from light limitation to light saturation is achieved with photoinhibition, transferred as ik.

  • ik_without_photoinhibition: Not available, set to NA_real_.

  • im_with_photoinhibition: The PAR at which the maximum electron transport rate is achieved with photoinhibition, transferred as im.

  • w: The sharpness of the peak, transferred as w.

  • ib: Not available, set to NA_real_.

  • etrmax_with_without_ratio: Not available, set to NA_real_.

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- eilers_peeters_generate_regression_ETR_II(data)
modified_result <- eilers_peeters_modified(result)

Default start value

Description

Default start value

Usage

platt_default_start_value_alpha

Format

An object of class numeric of length 1.


Default start value

Description

Default start value

Usage

platt_default_start_value_beta

Format

An object of class numeric of length 1.


Default start value

Description

Default start value

Usage

platt_default_start_value_ps

Format

An object of class numeric of length 1.


Platt Regression for ETR I

Description

Fits the Platt (1980) regression model using original naming conventions.

Usage

platt_generate_regression_ETR_I(
  data,
  alpha_start_value = platt_default_start_value_alpha,
  beta_start_value = platt_default_start_value_beta,
  ps_start_value = platt_default_start_value_ps
)

Arguments

data

A data.table from read_dual_pam_data.

alpha_start_value

Numeric. Initial value for α\alpha. Default: alpha_start_value_platt_default.

beta_start_value

Numeric. Initial value for β\beta. Default: beta_start_value_platt_default.

ps_start_value

Numeric. Initial value for PsP_s. Default: ps_start_value_platt_default.

Details

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#platt_generate_regression_etr_i-and-platt_generate_regression_etr_ii .

Value

A list containing:

  • etr_regression_data: Predicted ETR values.

  • sdiff: Deviation between actual and predicted ETR.

  • ps: Maximum electron transport rate without photoinhibition (PsP_s).

  • alpha: Initial slope of the light curve (α\alpha).

  • beta: Photoinhibition (β\beta).

  • pm: Maximum electron transport rate with photoinhibition (PmP_m).

  • ik: Transition PAR with photoinhibition (IkI_k).

  • is: Transition PAR without photoinhibition (IsI_s).

  • im: PAR at maximum ETR with photoinhibition (ImI_m).

  • ib: (IbI_b)

References

Platt, T., Gallegos, C. L., & Harrison, W. G. (1980). Photoinhibition of photosynthesis in natural assemblages of marine phytoplankton. Journal of Marine Research, 38(4). Retrieved from https://elischolar.library.yale.edu/journal_of_marine_research/1525/.

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- platt_generate_regression_ETR_I(data)

Platt Regression for ETR II

Description

Fits the Platt (1980) regression model using original naming conventions.

Usage

platt_generate_regression_ETR_II(
  data,
  alpha_start_value = platt_default_start_value_alpha,
  beta_start_value = platt_default_start_value_beta,
  ps_start_value = platt_default_start_value_ps
)

Arguments

data

A data.table from read_dual_pam_data.

alpha_start_value

Numeric. Initial value for α\alpha. Default: alpha_start_value_platt_default.

beta_start_value

Numeric. Initial value for β\beta. Default: beta_start_value_platt_default.

ps_start_value

Numeric. Initial value for PsP_s. Default: ps_start_value_platt_default.

Details

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#platt_generate_regression_etr_i-and-platt_generate_regression_etr_ii.

Value

A list containing:

  • etr_regression_data: Predicted ETR values.

  • sdiff: Deviation between actual and predicted ETR.

  • ps: Maximum electron transport rate without photoinhibition (PsP_s).

  • alpha: Initial slope of the light curve (α\alpha).

  • beta: Photoinhibition (β\beta).

  • pm: Maximum electron transport rate with photoinhibition (PmP_m).

  • ik: Transition PAR with photoinhibition (IkI_k).

  • is: Transition PAR without photoinhibition (IsI_s).

  • im: PAR at maximum ETR with photoinhibition (ImI_m).

  • ib: (IbI_b)

References

Platt, T., Gallegos, C. L., & Harrison, W. G. (1980). Photoinhibition of photosynthesis in natural assemblages of marine phytoplankton. Journal of Marine Research, 38(4). Retrieved from https://elischolar.library.yale.edu/journal_of_marine_research/1525/.

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- platt_generate_regression_ETR_II(data)

Platt Model Modification

Description

This function enhances the Platt (1980) model by adding parameters not originally included in the model, which were introduced by other models. It also renames parameters to a standardized naming convention used across all models.

Usage

platt_modified(model_result)

Arguments

model_result

A list containing the results of the model, including parameters such as etr_max, alpha, and beta.

Details

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#platt_modified

Value

A modified model result as a list with the following elements:

  • etr_type: ETR Type based on the model result.

  • etr_regression_data: Regression data with ETR predictions based on the fitted model.

  • sdiff: The difference between observed and predicted ETR values.

  • a: Obtained parameter a, equal to etrmax_without_photoinhibition.

  • b: Obtained parameter b, equal to alpha.

  • c: Obtained parameter c, equal to beta.

  • d: Not available, set to NA_real_.

  • alpha: The initial slope of the light curve, transferred unchanged as alpha.

  • beta: The photoinhibition of the light curve, transferred unchanged as beta.

  • etrmax_with_photoinhibition: The maximum electron transport rate with photoinhibition, transferred as pm.

  • etrmax_without_photoinhibition: The maximum electron transport rate without photoinhibition, transferred as ps.

  • ik_with_photoinhibition: PAR where the transition point from light limitation to light saturation is achieved with photoinhibition, transferred as ik.

  • ik_without_photoinhibition: PAR where the transition point from light limitation to light saturation is achieved without photoinhibition, transferred as is.

  • im_with_photoinhibition: The PAR at which the maximum electron transport rate is achieved with photoinhibition, transferred as im.

  • w: Not available, set to NA_real_.

  • ib: Transferred unchanged as ib.

  • etrmax_with_without_ratio: Ratio of etrmax_with_photoinhibition to etrmax_without_photoinhibition, and ik_with_photoinhibition to ik_without_photoinhibition.

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- platt_generate_regression_ETR_II(data)
modified_result <- platt_modified(result)

Plot Control

Description

This function creates a control plot for the used model based on the provided data and model results.

Usage

plot_control(data, model_result, title, color = "black")

Arguments

data

A 'data.table' containing the original ETR and yield data for the plot.

model_result

A list containing the fitting results of the used model and the calculated paramters (alpha, ik...).

title

A character string that specifies the title of the plot.

color

A color specification for the regression line in the plot.

Details

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#plot_control

Value

A plot displaying the original ETR and Yield values and the regression data. A table below the plot shows the calculated data (alpha, ik...)

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- eilers_peeters_generate_regression_ETR_I(data)
plot_control(data, result, "Control Plot")

Read and Process DualPAM Data

Description

Reads raw CSV files generated by DualPAM software, calculates electron transport rate (ETR) values, and returns a cleaned dataset. Customization may be needed for non-DualPAM devices.

Usage

read_dual_pam_data(
  csv_path,
  remove_recovery = TRUE,
  etr_factor = 0.84,
  fraction_photosystem_I = 0.5,
  fraction_photosystem_II = 0.5
)

Arguments

csv_path

File path to the CSV file.

remove_recovery

Logical. Removes recovery measurements if TRUE. Default is TRUE.

etr_factor

Numeric. Factor for ETR calculation. Default is 0.84.

fraction_photosystem_I

Numeric. Relative distribution of absorbed PAR to photosystem I. Default is 0.5.

fraction_photosystem_II

Numeric. Relative distribution of absorbed PAR to photosystem II. Default is 0.5.

Details

Calculates ETR using:

ETR=PARETR-FactorFraction of Photosystem (I or II)Yield (I or II)\text{ETR} = \text{PAR} \cdot \text{ETR-Factor} \cdot \text{Fraction of Photosystem (I or II)} \cdot \text{Yield (I or II)}

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#read_dual_pam_data

Value

A 'data.table' with processed data and calculated ETR values.

References

Heinz Walz GmbH. (2024). DUAL-PAM-100 DUAL-PAM/F MANUAL, 5th Edition, April 2024, Chapter 7 (pp. 162-172). Heinz Walz GmbH, Effeltrich, Germany. Available at: https://www.walz.com/files/downloads/manuals/dual-pam-100/DualPamEd05.pdf

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

Default start value

Description

Default start value

Usage

vollenweider_default_start_value_a

Format

An object of class numeric of length 1.


Default start value

Description

Default start value

Usage

vollenweider_default_start_value_alpha

Format

An object of class numeric of length 1.


Default start value

Description

Default start value

Usage

vollenweider_default_start_value_n

Format

An object of class numeric of length 1.


Default start value

Description

Default start value

Usage

vollenweider_default_start_value_pmax

Format

An object of class numeric of length 1.


Vollenweider Regression for ETR I

Description

Fits the Vollenweider (1965) regression model using original naming conventions from the publication.

Usage

vollenweider_generate_regression_ETR_I(
  data,
  pmax_start_value = vollenweider_default_start_value_a,
  a_start_value = vollenweider_default_start_value_a,
  alpha_start_value = vollenweider_default_start_value_alpha,
  n_start_value = vollenweider_default_start_value_n
)

Arguments

data

A data.table from read_dual_pam_data.

pmax_start_value

Numeric. Initial value for pmaxp_{max}. Default: pmax_start_values_vollenweider_default.

a_start_value

Numeric. Initial value for aa. Default: a_start_values_vollenweider_default.

alpha_start_value

Numeric. Initial value for α\alpha. Default: alpha_start_values_vollenweider_default.

n_start_value

Numeric. Initial value for nn. Default: n_start_values_vollenweider_default.

Details

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#vollenweider_generate_regression_etr_i-and-vollenweider_generate_regression_etr_ii.

Value

A list containing:

  • etr_regression_data: Predicted ETR values.

  • sdiff: Deviation between actual and predicted ETR.

  • pmax: Maximum electron transport rate (pmaxp_{max}).

  • a: Parameter aa.

  • alpha: Parameter α\alpha.

  • n: Parameter nn.

  • popt: Maximum electron transport rate with photoinhibition (poptp_{opt}).

  • ik: Transition point from light limitation to light saturation without photoinhibition (IkI_k).

  • iik: Transition point from light limitation to light saturation with photoinhibition (IkI_k^\prime).

  • pmax_popt_and_ik_iik_ratio: Ratio of pmaxp_{max} to poptp_{opt} and IkI_k to IkI_k^\prime.

References

Vollenweider, R. A. (1965). Calculation models of photosynthesis-depth curves and some implications regarding day rate estimates in primary production measurements, p. 427-457. In C. R. Goldman [ed.], Primary Productivity in Aquatic Environments. Mem. Ist. Ital. Idrobiol., 18 Suppl., University of California Press, Berkeley.

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- vollenweider_generate_regression_ETR_I(data)

Vollenweider Regression for ETR II

Description

Fits the Vollenweider (1965) regression model using original naming conventions from the publication.

Usage

vollenweider_generate_regression_ETR_II(
  data,
  pmax_start_value = vollenweider_default_start_value_pmax,
  a_start_value = vollenweider_default_start_value_a,
  alpha_start_value = vollenweider_default_start_value_alpha,
  n_start_value = vollenweider_default_start_value_n
)

Arguments

data

A data.table from read_dual_pam_data.

pmax_start_value

Numeric. Initial value for pmaxp_{max}. Default: pmax_start_values_vollenweider_default.

a_start_value

Numeric. Initial value for aa. Default: a_start_values_vollenweider_default.

alpha_start_value

Numeric. Initial value for α\alpha. Default: alpha_start_values_vollenweider_default.

n_start_value

Numeric. Initial value for nn. Default: n_start_values_vollenweider_default.

Details

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#vollenweider_generate_regression_etr_i-and-vollenweider_generate_regression_etr_ii.

Value

A list containing:

  • etr_regression_data: Predicted ETR values.

  • sdiff: Deviation between actual and predicted ETR.

  • pmax: Maximum electron transport rate (pmaxp_{max}).

  • a: Parameter aa.

  • alpha: Parameter α\alpha.

  • n: Parameter nn.

  • popt: Maximum electron transport rate with photoinhibition (poptp_{opt}).

  • ik: Transition point from light limitation to light saturation without photoinhibition (IkI_k).

  • iik: Transition point from light limitation to light saturation with photoinhibition (IkI_k^\prime).

  • pmax_popt_and_ik_iik_ratio: Ratio of pmaxp_{max} to poptp_{opt} and IkI_k to IkI_k^\prime.

References

Vollenweider, R. A. (1965). Calculation models of photosynthesis-depth curves and some implications regarding day rate estimates in primary production measurements, p. 427-457. In C. R. Goldman [ed.], Primary Productivity in Aquatic Environments. Mem. Ist. Ital. Idrobiol., 18 Suppl., University of California Press, Berkeley.

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- vollenweider_generate_regression_ETR_II(data)

Vollenweider Model Modification

Description

This function adds parameters that were not originally included in the Vollenweider (1965) model, but were introduced by other models, and renames the parameters to a standardized one for all models.

Usage

vollenweider_modified(model_result)

Arguments

model_result

A list containing the results of the model, including parameters such as pmax, alpha, and ik.

Details

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#vollenweider_modified

Value

A modified model result as a list containing the following elements:

  • etr_type: ETR Type based on the model result.

  • etr_regression_data: Regression data with ETR predictions based on the fitted model.

  • sdiff: The difference between observed and predicted ETR values.

  • a: Obtained parameter a, here equal to etrmax_without_photoinhibition.

  • b: Obtained parameter b, transferred as a.

  • c: Obtained parameter c, here transferred as alpha.

  • d: Obtained parameter d, here transferred as n.

  • alpha: The initial slope of the light curve.

  • beta: Not available, here set to NA_real_.

  • etrmax_with_photoinhibition: The maximum electron transport rate with photoinhibition, transferred as popt.

  • etrmax_without_photoinhibition: The maximum electron transport rate without photoinhibition, transferred as pmax.

  • ik_with_photoinhibition: PAR where the transition point from light limitation to light saturation is achieved taking photoinhibition into account, transferred as iik.

  • ik_without_photoinhibition: PAR where the transition point from light limitation to light saturation is achieved not taking photoinhibition into account, transferred as ik.

  • im_with_photoinhibition: The PAR at which the maximum electron transport rate is achieved by taking photoinhibition into account, determined using the regression data from the model.

  • w: Not available, here set to NA_real_.

  • ib: Transferred unchanged as ib.

  • etrmax_with_without_ratio: Ratio of etrmax_with_photoinhibition to etrmax_without_photoinhibition and ik_with_photoinhibition to ik_without_photoinhibition.

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- vollenweider_generate_regression_ETR_II(data)
modified_result <- vollenweider_modified(result)

Default start value

Description

Default start value

Usage

walsby_default_start_value_alpha

Format

An object of class numeric of length 1.


Default start value

Description

Default start value

Usage

walsby_default_start_value_beta

Format

An object of class numeric of length 1.


Default start value

Description

Default start value

Usage

walsby_default_start_value_etr_max

Format

An object of class numeric of length 1.


Walsby Regression for ETR I

Description

Fits a modified Walsby (1997) regression model without the respiration term, using Romoth (2019) naming conventions. Calculates ETRmaxETR_{max} without accounting for photoinhibition.

Usage

walsby_generate_regression_ETR_I(
  data,
  etr_max_start_value = walsby_default_start_value_etr_max,
  alpha_start_value = walsby_default_start_value_alpha,
  beta_start_value = walsby_default_start_value_alpha
)

Arguments

data

A data.table from read_dual_pam_data.

etr_max_start_value

Numeric. Initial value for ETRmaxETR_{max}. Default: etr_max_start_value_walsby_default.

alpha_start_value

Numeric. Initial value for α\alpha. Default: alpha_start_value_walsby_default.

beta_start_value

Numeric. Initial value for β\beta. Default: beta_start_value_walsby_default.

Details

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#walsby_generate_regression_etr_i-and-walsby_generate_regression_etr_ii.

Value

A list containing:

  • etr_regression_data: Predicted ETR values.

  • sdiff: Deviation between actual and predicted ETR.

  • etr_max: Maximum ETR (ETRmaxETR_{max}).

  • alpha: Initial slope (α\alpha).

  • beta: Photoinhibition factor (β\beta).

References

Walsby, A. E. (1997). Numerical integration of phytoplankton photosynthesis through time and depth in a water column. New Phytologist, 136(2), 189-209. Available at: doi:10.1046/j.1469-8137.1997.00736.x

Romoth, K., Nowak, P., Kempke, D., Dietrich, A., Porsche, C., & Schubert, H. (2019). Acclimation limits of Fucus evanescens along the salinity gradient of the southwestern Baltic Sea. Botanica Marina, 62(1), 1-12. Available at: doi:10.1515/bot-2018-0098

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- walsby_generate_regression_ETR_I(data)

Walsby Regression for ETR II

Description

Fits a modified Walsby (1997) regression model without the respiration term, using Romoth (2019) naming conventions. Calculates ETRmaxETR_{max} without accounting for photoinhibition.

Usage

walsby_generate_regression_ETR_II(
  data,
  etr_max_start_value = walsby_default_start_value_etr_max,
  alpha_start_value = walsby_default_start_value_alpha,
  beta_start_value = walsby_default_start_value_beta
)

Arguments

data

A data.table from read_dual_pam_data.

etr_max_start_value

Numeric. Initial value for ETRmaxETR_{max}. Default: etr_max_start_value_walsby_default.

alpha_start_value

Numeric. Initial value for α\alpha. Default: alpha_start_value_walsby_default.

beta_start_value

Numeric. Initial value for β\beta. Default: beta_start_value_walsby_default.

Details

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#walsby_generate_regression_etr_i-and-walsby_generate_regression_etr_ii.

Value

A list containing:

  • etr_regression_data: Predicted ETR values.

  • sdiff: Deviation between actual and predicted ETR.

  • etr_max: Maximum ETR (ETRmaxETR_{max}).

  • alpha: Initial slope (α\alpha).

  • beta: Photoinhibition factor (β\beta).

References

Walsby, A. E. (1997). Numerical integration of phytoplankton photosynthesis through time and depth in a water column. New Phytologist, 136(2), 189-209. Available at: doi:10.1046/j.1469-8137.1997.00736.x

Romoth, K., Nowak, P., Kempke, D., Dietrich, A., Porsche, C., & Schubert, H. (2019). Acclimation limits of Fucus evanescens along the salinity gradient of the southwestern Baltic Sea. Botanica Marina, 62(1), 1-12. Available at: doi:10.1515/bot-2018-0098

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- walsby_generate_regression_ETR_II(data)

Walsby Model Modification

Description

Enhances the Walsby (1997) model by adding parameters from other models and standardizing parameter names.

Usage

walsby_modified(model_result)

Arguments

model_result

A list of model results including etr_max, alpha, and beta.

Details

A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#walsby_modified

Value

A list containing:

  • etr_type: ETR Type based on the model result.

  • etr_regression_data: Regression data with ETR predictions based on the fitted model.

  • sdiff: The difference between observed and predicted ETR values.

  • a: Obtained parameter a, equal to etrmax_without_photoinhibition.

  • b: Obtained parameter b, equal to alpha.

  • c: Obtained parameter c, equal to beta.

  • d: Not available, set to NA_real_.

  • alpha: The initial slope of the light curve, transferred unchanged as alpha.

  • beta: The photoinhibition of the light curve, transferred unchanged as beta.

  • etrmax_with_photoinhibition: The maximum electron transport rate with photoinhibition.

  • etrmax_without_photoinhibition: The maximum electron transport rate without photoinhibition, transferred as etr_max.

  • ik_with_photoinhibition: PAR where the transition point from light limitation to light saturation is achieved with photoinhibition.

  • ik_without_photoinhibition: PAR where the transition point from light limitation to light saturation is achieved without photoinhibition.

  • im_with_photoinhibition: PAR at the maximum ETR with photoinhibition.

  • w: Not available, set to NA_real_.

  • ib: Not available, set to NA_real_.

  • etrmax_with_without_ratio: Ratio of etrmax_with_photoinhibition to etrmax_without_photoinhibition.

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- walsby_generate_regression_ETR_II(data)
modified_result <- walsby_modified(result)

Write Model Result CSV

Description

This function exports the raw input data, regression data, and model parameters into separate CSV files for easy access and further analysis.

Usage

write_model_result_csv(dest_dir, name, data, model_result)

Arguments

dest_dir

A character string specifying the directory where the CSV files will be saved.

name

A character string specifying the base name for the output files.

data

A data frame containing the raw input data used in the model.

model_result

A list containing the model results, including parameter values and regression data.

Details

This function generates three CSV files:

  1. raw_data.csv: Contains the original raw data used in the model.

  2. regression_data.csv: Includes the regression data with predicted electron transport rate (ETR) values.

  3. model_result.csv: Summarizes the parameter values derived from the model results (excluding regression data), such as alpha or beta.

The 'name' parameter serves as a prefix for each file, ensuring clarity and organization in the output directory. A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#write_model_result_csv

Value

No return value, called for side effects

Examples

path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)

result <- eilers_peeters_generate_regression_ETR_I(data)
write_model_result_csv(tempdir(), "20240925", data, result)