I have electrophysiology data in which there are events that begin at different times, and I would like to align the events so that I can view them as if they happened at the same time. For more background - I am recording evoked currents from neurons, and have about 10 waves, one from each cell I sampled. The electrical stimulation always happens 150ms from the beginning of the recording, but due to biological variation, the currents reach maximum value anywhere between 5 and 10 seconds after the stimulation. I would like to align my traces in the x-dimension by the location of the current peak, so that I can view all of them and compare the kinetics of the currents with the traces overlaid.
Here is what I have so far:
Function xAlign(wname)
wave wname
WaveStats/Q/R=(1520,1640) wname
wname-=(V_minloc)
return 0
end
Currently the code subtracts the x location of the peak from the y-values of my wave. I would like to subtract the x-location of the peak from the x-values of my wave, so that the peak of the waves are centered on x=0. So instead of wname in the 4th line, I would like to specify the x-values of wname.
Do you want to be able to simply view them in a graph, or do you want to perform further calculations? If you just want to look at them, I would recommend displaying and offsetting the trace. If you want to do further calculations, you can change x scaling such that 1st point is -(V_minloc).
You might also want to check out the Wave Arithmetic package- it includes a capability to align points on traces that are marked by the graph cursors. You should first look at the demo experiment for the package: File->Example Experiments->Analysis->Wave Arithmetic.
February 12, 2016 at 12:46 pm - Permalink
setscale
command to to this. Have a look at its documentation:displayhelptopic "setscale"
HJ
February 12, 2016 at 02:01 pm - Permalink
February 12, 2016 at 03:00 pm - Permalink
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
February 15, 2016 at 01:07 pm - Permalink