What is the error in pH at a given pH, given some parameters of R and the error in R?

Error_pH(pH, Rmin, Rmax, delta, pKa, error_R, ...)

Arguments

pH

the pH

Rmin

the minimum possible ratiometric fluorescence

Rmax

the maximum possible ratiometric fluorescence

delta

the ratiometric fluorescence in the first wavelength

pKa

the sensor's midpoint/pKa

error_R

a function that, given an R, returns the error in that R

...

not used (for generalization compatability)

Value

A list with (1) 'pH', the given pH, (2) 'larger_pH', the largest possible E, at the given error (3) 'smaller_pH', the smallest possible E, at the given error (4) 'max_error' the largest possible difference between the observed and expected E

Examples

Error_pH(pH = 7.3, Rmin = 1, Rmax = 5, delta = 0.2, pKa = 8, error_R = function(x) 0.02 * x)
#> $pH #> [1] 7.3 #> #> $larger_pH #> [1] 7.273913 #> #> $smaller_pH #> [1] 7.326085 #> #> $max_error #> [1] 0.02608707 #>