Skip to content

Off by one error in detect_ramp_bounds #130

@joeyshuttleworth

Description

@joeyshuttleworth

Docstring is unclear in detect_ramp_bounds:

"""
Extract the timepoint indices at the start and end of the nth ramp in the protocol.

@param times: np.array containing the time at which each sample was taken
@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
"""

It's not clear from this exactly what istart and iend should be. This leads to a possible off-by-one error in reversal ramp inference. This may also slightly effect leak correction.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions