Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/growthcurves/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ def bad_fit_stats():
# No-Growth Detection
# -----------------------------------------------------------------------------


# ? maybe update that all checks are always performed
def detect_no_growth(
t,
N,
Expand All @@ -1600,12 +1600,14 @@ def detect_no_growth(
4. Insufficient OD increase (flat curve)
5. Zero or near-zero growth rate (from fitted stats)

If any conditions is met, checking stops and the first reason is returned.

Parameters:
t: Time array
N: OD values (baseline-corrected)
growth_stats: Optional dict of fitted growth statistics
(from extract_stats or sliding_window_fit).
If provided, growth rate is checked.
If provided, minimum growth rate is checked.
min_data_points: Minimum number of valid N points required (default: 5)
min_signal_to_noise: Minimum ratio of max/min OD values (default: 5.0)
min_od_increase: Minimum absolute OD increase required (default: 0.05)
Expand Down
Loading