Skip to content

Commit a7d9c3c

Browse files
committed
Merge branch 'add-preprocessing-notebook'
2 parents c6c554d + 0d75db6 commit a7d9c3c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/growthcurves/inference.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,7 @@ def _extract_stats_spline(
13821382
Returns:
13831383
Growth statistics dictionary.
13841384
"""
1385-
from .models import spline_model
1385+
from .models import spline_from_params
13861386

13871387
params = fit_result.get("params", {})
13881388

@@ -1392,7 +1392,6 @@ def _extract_stats_spline(
13921392
time_at_umax = params.get("time_at_umax")
13931393
fit_t_min = params.get("fit_t_min")
13941394
fit_t_max = params.get("fit_t_max")
1395-
spline_s = params.get("spline_s", 0.01)
13961395

13971396
if mu_max is None or time_at_umax is None or fit_t_min is None or fit_t_max is None:
13981397
return bad_fit_stats()
@@ -1420,7 +1419,7 @@ def _extract_stats_spline(
14201419
# Reconstruct spline to calculate od_at_umax and RMSE
14211420
y_log_exp = np.log(y_exp)
14221421
try:
1423-
spline, _ = spline_model(t_exp, y_log_exp, spline_s, k=3)
1422+
spline = spline_from_params(params)
14241423
# Evaluate spline at time_at_umax to get the OD value
14251424
# Spline is fitted to log(y), so exponentiate to get actual OD
14261425
od_at_umax = float(np.exp(spline(time_at_umax)))

0 commit comments

Comments
 (0)