Difference between revisions of "Saccade Cookbook"

From biophysics
Jump to navigation Jump to search
(Created page with "== Analysis == Finally, you can start some high-level analysis (see also saccade analysis...")
 
Line 1: Line 1:
 +
<p class="clearnone">A tutorial, for students and coworkers: a recipe to calibrate, detect, and analyze saccades</p>
 +
<hr id="system-readmore" />
 +
 +
<p class="clearnone">Easily calibrate, detect, and analyze [[http://en.wikipedia.org/wiki/Saccade|saccades]] with [[&lt;p class=&quot;clearnone&quot;&gt; &lt;a href=&quot;https://gitlab.science.ru.nl/marcw/biofysica&quot; target=&quot;_blank&quot;&gt;PANDA&lt;/a&gt; tutorial, for students and coworkers: a recipe to calibrate, detect, and analyze saccades&lt;/p&gt;|PandA]]. For a more detailed description, visit the other [[http://www.neural-code.com/index.php/panda/action/saccade|saccade]] sections, starting with the [[http://www.neural-code.com/index.php/panda/action/87-saccade/70|introduction]].</p>
 +
 +
== Calibration ==
 +
<p>First you have to calibrate (see also saccade [[http://www.neural-code.com/index.php/tutorials/action/saccade/55-saccade-calibration|calibration]])
 +
  by training an artificial neural network to learn the relationship between measured voltages and head orientation:
 +
<pre xml:lang="matlab">pa_calibrate</pre>
 +
  <p>(choose the calibration dat-file in the pop-up menu, usually ending in 0000).
 +
  Then you can calibrate (and low-pass filter) the data-files, by using the button in the pa_calibrate interface
 +
  (this will calibrate ALL dat-files with the .net-file you got from the pa_calibrate-procedure). </p>
 +
 
 +
== Detection ==
 +
<p>Then you have to detect (see also saccade [[http://www.neural-code.com/index.php/tutorials/action/saccade/56-saccade-detection|detection]])
 +
with:
 +
<pre xml:lang="matlab">pa_sacdet</pre>
 +
<p>(choose an experimental hv-file, usually ending with numbers 0001 and up).  </p>
 +
 +
== Parameters ==
 +
<p>Obtain all movement parameters, such as end-point location, reaction time, peak velocity. </p>
 +
<pre xml:lang="matlab">pa_sac2mat</pre>
 +
  (these will be saved in a mat-file)</p>
 
== Analysis ==
 
== Analysis ==
 
Finally, you can start some high-level analysis (see also saccade [[http://www.neural-code.com/index.php/tutorials/action/saccade/54-saccade-analysis|analysis]])
 
Finally, you can start some high-level analysis (see also saccade [[http://www.neural-code.com/index.php/tutorials/action/saccade/54-saccade-analysis|analysis]])

Revision as of 13:42, 22 January 2024

A tutorial, for students and coworkers: a recipe to calibrate, detect, and analyze saccades


Easily calibrate, detect, and analyze [[1]] with [[<p class="clearnone"> <a href="https://gitlab.science.ru.nl/marcw/biofysica%22 target="_blank">PANDA</a> tutorial, for students and coworkers: a recipe to calibrate, detect, and analyze saccades</p>|PandA]]. For a more detailed description, visit the other [[2]] sections, starting with the [[3]].

Calibration

First you have to calibrate (see also saccade [[4]]) by training an artificial neural network to learn the relationship between measured voltages and head orientation:

pa_calibrate

(choose the calibration dat-file in the pop-up menu, usually ending in 0000). Then you can calibrate (and low-pass filter) the data-files, by using the button in the pa_calibrate interface (this will calibrate ALL dat-files with the .net-file you got from the pa_calibrate-procedure).

Detection

Then you have to detect (see also saccade [[5]]) with:

pa_sacdet

(choose an experimental hv-file, usually ending with numbers 0001 and up).

Parameters

Obtain all movement parameters, such as end-point location, reaction time, peak velocity.

pa_sac2mat

(these will be saved in a mat-file)

Analysis

Finally, you can start some high-level analysis (see also saccade [[6]])

After all these obligatory steps, you can actually start analyzing the data. This usually involves custom-made analysis functions, suited for your experiment. First, you have to load the data:

load MW-RG-2011-03-02-0001

You will now have a Sac- and a Stim-matrix. The Sac-matrix contains all the movement parameters, the Stim-matrix all the stimulus parameters. You can combine them into a single matrix, containing in each column a relevant parameter, and each row containing a single saccade.

SupSac = pa_supersac(Sac,Stim,XX,YY);

Note that the XX and YY should be numbers describing the type of stimulus, and the number of that type of stimulus in the trial, e.g.

SupSac = pa_supersac(Sac,Stim,1,2);

for the second (YY=2) stimulus of type 1 (XX=1, usually an LED) in a trial, or

SupSac = pa_supersac(Sac,Stim,2,1);

for the first (YY=1) stimulus of type 2 (XX=2, usually a sound) in the trial (you have to check what number is assigned to which stimulus type, by typing:

help pa_readcsv

in the trial information of the LOG-matrix, line 5).

To plot target location versus response location:

plot(SupSac(:,23),SupSac(:,8),'k.');

or

pa_plotloc(SupSac);