I have data with a bunch of traces of action potentials (top graph).
I want to find the average after-hyperpolarization potential (AHP), the voltage difference between where the action potential "takes off" on its way up (known as "voltage threshold") and the trough of its overshoot on its way down, i.e., the arrow on the top graph, which presumably corresponds to the arrow on the bottom graph.
What's the easiest way of doing that?
(Note: I am looking for an algorithm to automatize the calculation. I am working on Matlab, but it can be an abstract algorithm, although specific enough to implement without any additional knowledge: i.e., don't just say: "Fit the curves to Hudgkin-Huxley equation and find the intercepts".)