Reading and displaying several local min/max latency values
epiphenom
1) A table with the latency values or the time difference between the lowest and highest values in y as I've indicated with the vertical black lines
2) A readout of how many times a set y value threshold is crossed( represented in the horizontal black line) If it's somehow possible to sample this crossing at predefined time intervals after the start of the wave, that would be even better.
So far I've used the Wavestats command to get the general idea about the wave but now I'd like to look at these multiple local values.
My speculation is that you know or can measure the stimulus excitation times, which should establish the start times. From your previous posting, I assume that your DAQ procedure is triggered by some kind of excitation signal, which should be used to get at the start times. Best yet would be if your DAQ procedure built this in, so the start of the data acquisition is at the first excitation. Also it would be most convenient if your setup made the excitation times commensurate with the data sampling times (i.e. a fixed integer number of sampling points per excitation interval).
To get the maxima and latencies I would suggest using
WaveStats /ALPH=val /C=method /M=moment /Q [/R = (startX, endX )]/Z waveName
in a loop for each excitation interval, where startX and endX straddle the peak. V_maxloc will give you the location of the maximum.In part (2) of your question, to count the level crossings use
FindLevels [/B=box /D=destWaveName /DEST=destWaveName /EDGE=e /M=minWidthX /N=maxLevels /P/Q /R=(startX,endX)/T=dx]waveName, level
V_LevelsFound is the number of level crossings found, and they can be saved in the destination wave.
I hope this helps.
November 4, 2012 at 09:50 am - Permalink
November 4, 2012 at 10:43 pm - Permalink