aboutsummaryrefslogtreecommitdiff
path: root/R/endpoints.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-11-08 08:46:57 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2022-11-08 08:46:57 +0100
commit56415f3c0638725aaa77db2c02eeaf9d4983452b (patch)
treefa935e34c86b6be05b7e4384fb84323681f5d485 /R/endpoints.R
parent7186006740aca909660e42dce8d92eb4735af533 (diff)
Show DFOP g equivalent of SFORB in summary, test
Diffstat (limited to 'R/endpoints.R')
-rw-r--r--R/endpoints.R6
1 files changed, 4 insertions, 2 deletions
diff --git a/R/endpoints.R b/R/endpoints.R
index 227671b5..4aec8aa8 100644
--- a/R/endpoints.R
+++ b/R/endpoints.R
@@ -162,6 +162,7 @@ endpoints <- function(fit) {
sqrt_exp = sqrt(1/4 * (k_12 + k_21 + k_1output)^2 - k_1output * k_21)
b1 = 0.5 * (k_12 + k_21 + k_1output) + sqrt_exp
b2 = 0.5 * (k_12 + k_21 + k_1output) - sqrt_exp
+ g = (k_12 + k_21 - b1)/(b2 - b1)
DT50_b1 = log(2)/b1
DT50_b2 = log(2)/b2
@@ -169,8 +170,7 @@ endpoints <- function(fit) {
DT90_b2 = log(10)/b2
SFORB_fraction = function(t) {
- ((k_12 + k_21 - b1)/(b2 - b1)) * exp(-b1 * t) +
- ((k_12 + k_21 - b2)/(b1 - b2)) * exp(-b2 * t)
+ g * exp(-b1 * t) + (1 - g) * exp(-b2 * t)
}
f_50 <- function(log_t) (SFORB_fraction(exp(log_t)) - 0.5)^2
@@ -195,6 +195,8 @@ endpoints <- function(fit) {
# Return the eigenvalues for comparison with DFOP rate constants
ep$SFORB[[paste(obs_var, "b1", sep="_")]] = b1
ep$SFORB[[paste(obs_var, "b2", sep="_")]] = b2
+ # Return g for comparison with DFOP
+ ep$SFORB[[paste(obs_var, "g", sep="_")]] = g
ep$distimes[obs_var, c("DT50back")] = DT50_back
ep$distimes[obs_var, c(paste("DT50", obs_var, "b1", sep = "_"))] = DT50_b1

Contact - Imprint