Tuesday, November 20, 2012

Question to mathematicians

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".)

10 comments:

e said...

I have not idea what you're talking about

e said...

subscribing

Anarchist Chossid said...

what's not clear?

e said...

iwhat you're trying to figure out.

Anarchist Chossid said...

i am trying to figure out the difference in voltage between the voltage threshold (the point where the dv/dt increases sharply) and the trough of the spike. i.e., i want to know the distance indicated by the arrows on both graphs.

but i want to automate this process. i suspect it has to do with detecting the inflection point (using second derivative?), but i haven't had time to deal with it in detail yet.

e said...

You need a better definition of what you mean by "increases sharply."

Anarchist Chossid said...

its rate of change increases drastically. obviously, it's a subjective definition, but it should be visible by eye on both graphs. you can pick some arbitrary number for dv.

i guess that answers my question...

Anarchist Chossid said...

actually, i don't think you need the arbitrary definition. it should be the local minimum of the second derivative, right?

e said...

not necessarily. Where does e^x begin to increase dramatically?

Anarchist Chossid said...

In this case, there is a local maximum in third derivative at around where voltage threshold should be. But, because of some noise, it's hard for me to program its isolation.

So, for now I just hard-coded the accepted value for minimum dv/dt. Once the graph crosses it, I mark that V as voltage threshold.