Help finding y values

Hi, i am new user with Igor. I wanna find the action potential voltage threshold in my traces (voltage vs. time). I import the traces, differenciate them and then using Findlevel i can search where (the time point) the derivative reaches certain threshold value. But i am stuck trying to find what voltage value corresponds to this time (how to find an y value knowing the x value). Could anyone help me pelase?
I'm going to guess that your original data consists of an xy wave pair. In this case, once you find the x value from the derative go back to the original x wave and use FindLevel or FindValue to locate the occurrence of that x value. The value returned by either of these functions will be an index that you can use to locate the corresponding y value from the y wave.
jtigor wrote:
I'm going to guess that your original data consists of an xy wave pair. In this case, once you find the x value from the derative go back to the original x wave and use FindLevel or FindValue to locate the occurrence of that x value. The value returned by either of these functions will be an index that you can use to locate the corresponding y value from the y wave.

Thanks a lot jtigor, i was struggling with the FindValue but i couldnt get it to work. I read the help but still was not enough. Where could i find more explicit help about how to use it?
If you have an X wave, and you know the X value, and the X wave is monotonic (always increasing or decreasing) then you can use BinarySearch or BinarySearchInterp to get either an integer point number or fractional (interpolated) point number. Then use that point number as the index in the Y wave. The BinarySearch and BinarySearchInterp functions should be faster than FindValue because they do a binary search instead of a linear search. And they are perhaps more straightforward to use because they are functions that simply return the desired information.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
JLRHei wrote:
Hi, i am new user with Igor. I wanna find the action potential voltage threshold in my traces (voltage vs. time). I import the traces, differenciate them and then using Findlevel i can search where (the time point) the derivative reaches certain threshold value. But i am stuck trying to find what voltage value corresponds to this time (how to find an y value knowing the x value). Could anyone help me pelase?


yValue = theWave(xValue)

or, if you have an X point and not an X value,

yValue = theWave[xPoint]

So if you are using FindLevel without the /P flag, use the first form. If you are using the /P flag, use the second form.