diff --git a/pcpostprocess/detect_ramp_bounds.py b/pcpostprocess/detect_ramp_bounds.py index 72f81b5..e6d2d6d 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 @@ -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