From 79d75a1e1c8ebafe9218ccc86170d3a9234d8812 Mon Sep 17 00:00:00 2001 From: "Joseph G. Shuttleworth" Date: Wed, 4 Feb 2026 11:36:38 +0000 Subject: [PATCH 1/2] Change returned values in detect_ramp_bounds --- pcpostprocess/detect_ramp_bounds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcpostprocess/detect_ramp_bounds.py b/pcpostprocess/detect_ramp_bounds.py index 72f81b5c..82b2590f 100644 --- a/pcpostprocess/detect_ramp_bounds.py +++ b/pcpostprocess/detect_ramp_bounds.py @@ -22,6 +22,6 @@ def detect_ramp_bounds(times, voltage_sections, ramp_index=0): tstart, tend = ramp[:2] - ramp_bounds = [np.argmax(times > tstart), np.argmax(times > tend)] + ramp_bounds = [np.argmax(times >= tstart), np.argmax(times >= tend)] return ramp_bounds From 90919cd8951e8fb2af2e2010b4300c7aee6505ab Mon Sep 17 00:00:00 2001 From: "Joseph G. Shuttleworth" Date: Wed, 4 Feb 2026 13:34:02 +0000 Subject: [PATCH 2/2] Add clarification to docstring --- pcpostprocess/detect_ramp_bounds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcpostprocess/detect_ramp_bounds.py b/pcpostprocess/detect_ramp_bounds.py index 82b2590f..e6d2d6da 100644 --- a/pcpostprocess/detect_ramp_bounds.py +++ b/pcpostprocess/detect_ramp_bounds.py @@ -9,7 +9,7 @@ def detect_ramp_bounds(times, voltage_sections, ramp_index=0): @param voltage_sections 2d np.array where each row describes a segment of the protocol: (tstart, tend, vstart, end) @param ramp_index: the index of the ramp to select. Defaults to 0 - the first ramp - @returns istart, iend: the start and end timepoint indices for the specified ramp + @returns istart, iend: the first timepoint of the ramp segment, and the first time point of the following ramp segment """ ramps = [(tstart, tend, vstart, vend) for tstart, tend, vstart, vend