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
4 changes: 2 additions & 2 deletions pcpostprocess/detect_ramp_bounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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