Using the NAFX for Eye-Movement

Fixation Data Analysis and Display

 

L.F. DellÕOsso, Ph.D.

 

From the Daroff-DellÕOsso Ocular Motility Laboratory, Louis Stokes Cleveland DVA Medical Center and Depts. of Neurology and Biomedical Engineering, Case Western Reserve University, Cleveland OH, USA

 

 

OMLAB Report #111005

Written: 9/9/05; Placed on Web Page: 11/10/05; Last Modified: 1/29/08

Downloaded from: OMLAB.ORG

Send questions, comments, and suggestions to: lfd@case.edu

 

This work was supported in part by the Office of Research and Development, Medical Research Service, Department of Veterans Affairs.

 

The instructions in this tutorial are meant to supplement those in Ònafx.txtÓ and those in the ÒtutorialsÓ folder, both of which are contained in the OMtools folder. They are illustrated with examples to help the user in understanding how to use some of the more important m-files in the OMtools software downloadable from this site. Investigators are also advised to read, ÒRecording and Calibrating the Eye Movements of Nystagmus SubjectsÓ (OMLAB 011105). Note: the m-files (or p-files) listed below as ÔfilenameÕ actually refer to Ôfilename.mÕ (or Ôfilename.pÕ) and the text files ÒfilenameÓ are in the folder ÒOMtools/documentation/misc docs.Ó

 

Theory:

The NAFX and its predecessor, the NAF, originated from the NFF that attempted to relate the time-intervals of fp's and their position and velocity SD's to a measure of the 'quality' of a CN waveform (i.e., how likely it was to allow good acuity).  When calculated by hand, each cycle was assumed to have 1 fp and the # of cycles in the interval of interest was included in the calculation.  Later, when the NAFX was automated, only 'true' fp's (i.e., those that satisfied the foveation-window (FWIN) criteria) were used in the calculation.  For waveforms that exhibited well-developed foveation, this changed nothing.  However, for poor foveation due to excessive jitter or high velocities, many cycles were deemed to have no fp's and the resulting NAFX reflected only those few fp's detected.  This yielded NAFX values that were not likely to be well correlated with acuity.  To overcome this shortcoming, a measure of the total number of potential fp's (or cycles) needed to be reintroduced.  That was most easily accomplished by applying the NAFX as described below. In addition, the NAFX vs. acuity line has been made age-specific to reflect the variation of visual acuity with age (a canine line is also included).

 

Method and Criteria:

Much of the repetitive work in the previous methodology has been automated by 'nafxprep' used in conjunction with the graphical interface for NAFX

1. Filter data using, 'r/lh=lpf(r/lh,4,20,samp_freq)'

            NOTE: Since, when using its graphical interface, the nafx function needs rh or lh,

rhf or lhf can no longer be used for filtered data. Here, we are filtering at 20 Hz;

for noisy data 15 or 10 Hz can be used.

2. Run 'nafx' and the following GUI will appear:

 

Figure 1. The GUI for the NAFX program. The first command ÔbuttonÕ is Ònafxprep.Ó It is used in conjunction with zoomtool to automatically set the Position and Velocity sub arrays for the fixation interval you choose. First, use ÒSubject age:Ó to set in the subjectÕs age. You must also set in the ÒPosition Limit:Ó based on the ÒDelta YÓ difference shown in zoomtool for the second set of position cursors. The minimum is 0.5¡ (the foveal radius) and the maximum is 6¡ in 12 steps. Similarly, when you set in the ÒVelocity Limit:Ó start at 4¡/sec and increase in 1¡/sec steps until a foveation period is detected for each nystagmus cycle or you reach 10¡/sec (the maximum value for the velocity of the foveation window. The ÒSampling Freq:Ó is automatically detected and set from the loaded data. ÒFoveation Criteria:Ó should be set as shown. ÒTau:Ó will be automatically set based on you foveation-window position and velocity choices. The ÒCalculateÓ button will calculate foveation periods and print out several graphs. We usually check ÒPlot P&V together?Ó and leave ÒFoveation Stats?Ó unchecked. The final command button is ÒCalc NAFX.Ó Close the program with ÒDone.Ó

 

 

 

3. Choose the age range appropriate for the subject; this will customize the potential visual acuity predicted by the NAFX based on population statistics for visual acuity.

4. Plot the filtered data using an appropriate command (e.g., plth or pltv).

5. Use 'zoomtool' on the filtered data to be analyzed and eliminate all data traces except the one being analyzed.

6. Home in on the segment you wish to analyze with the cursors and the X-axis zoom ÒinÓ button.

7. Place the cursors at the start and end of the sub array you wish to use.

            NOTE: To ensure that your interval contains an integral number of cycles (and

            that no foveation periods are truncated), begin all intervals during a slow phase

(away from a foveation period) and end all intervals at an equivalent point in a

slow phase.

8. Click on the C1 (xy) and C2 (xy) buttons.

9. Place the cursors at the highest and lowest peaks* of the foveation periods. Figure 2 demonstrates what this looks like.

 

 

Figure 2. Fixation interval with cursors set at the highest and lowest extents of the six foveation periods in the interval.

 

10. Click on the C1 (xy) and C2 (xy) buttons.

11. Run ÒnafxprepÓ from the GUI (Figure 1).

You will be prompted to enter the data file name (e.g., lh or rh) if more than one data file was plotted.

12. All sub arrays and bias shifts will be created and entered into the NAFX GUI.

11. Choose a foveation position window whose ±value encompasses the cursors' Y interval (as indicated by the ÒDelta YÓ value) and type it into the ÒPosition Limit:Ó input space.

            NOTE: Available position window sizes are: 0.5, 0.75, 1.0, 1.25, 1.5, 2, 2.5, 3,

3.5, 4, 5, and 6 (for canines use 3 for horizontal data and 1.5 for vertical data). In

this example ÒDelta YÓ is 1.6762 requiring a window size of 1

(i.e., ±1=|2|>1.65762).

13. Run the ÒCalculateÓ ('showpv') and verify that all foveation periods were counted.

14. If any cycles were missed, increase the velocity window (as indicated by the ÒVelocity Limit:Ó value) and rerun ÒCalculateÓ until all cycles are counted or you reach 10 deg/sec.

            NOTE: Available velocity window sizes are: 4, 5, 6, 7, 8, 9, and 10. Figure 3

shows the first two graphs produced by ÔshowpvÕ.

15. Run the ÒCalc NAFXÓ using #fovs as defined below.**

16. Copy all relevant commands from the command window to a text file to document your work and to provide an easy way to repeat it (see NOTE below).

17. Run 'xaxshift(nafx_start)' on any Figures you wish to print and then, print them.

* You could use the horizontal cursor lines to straddle the foveation positions if you stay within the start and stop points.

** If ÒCalculateÓ ('showpv') detects >=1fp/cy, use the number of CYCLES as the #fovs

         i.e., "#fovs" = #cy's  (#fps - #extra fps detected)

If ÒCalculateÓ ('showpv') misses any cycles (i.e., no fp detected) choose the pos limit of

   FWIN just large enough to encompass all fp's in the interval to be used

   (1 fp per cycle)

   Then choose the LOWEST vel limit of FWIN (velLim) that allows 'showpv' to

   detect 1fp/cy or, increase the velocity limit to the LOWEST value that

   MAXIMIZES the # of fp's detected and use

         "#fovs" = #cy's + #cy w/o fp or joined cycles within a fp

                        (#cy's = #fps - #extra fps detected)

 

NOTE:

The output of the NAFX to the command window of Matlab includes all the necessary data information and explicit NAFX command lines to reproduce the analysis easily. They should be copied and kept in a text file that can be used for this purpose at a latter date without using zoomtool to define the interval and extent of the foveation positions. All that need be done is to copy the appropriate command lines (those starting with "È") from the text file to the command window. An example from NAFX (version 1.1) is shown below for a 49 y/o subject. Use 'help nafx' for information regarding the NAFX command lines.

Text File Data: 

>> rh=lpf(rh,4,20,500);

rhv=d2pt(rh,3,500);

>> rh45_46 = sub(rh, 45.524, 1.362);

rh45_46s = rh45_46 + 3.2905;

rhv45_46 = d2pt(rh45_46, 3);

>> nafx(rh45_46s,rhv45_46,500,[1,6],'showpv',1);
Figure 3. Outputs of ÔshowpvÕ.

(Top) Velocity and position traces with all points satisfying the foveation window criteria (dot-dashed lines) shown in red. (Bottom) Position trace with algorithm-determined foveation periods shown in red.


Enter the subject's age:

1) under 6 years old

2) from 6 to 12 years old

3) from 12+ to 40 years old

4) from 40+ to 60 years old

5) greater than 60 years old

6) A dog of any age

--> 4

 

% Display foveation statistics (y/n)? n

Total time that meets position criterion = 994 msec.    (497 samples)

Total time that meets velocity criterion = 278 msec.    (139 samples)

Total time that meets both criteria      = 264 msec.    (132 samples) [raw]

Total time that meets both criteria      = 190 msec.    (95 samples)

There were (probably) 9 foveation periods in this interval.

Cycles by manual count: 8 [manually entered by you]

 

>> nafx(rh45_46s,rhv45_46,500,8,'nafx',[0,1,6]);

 

Enter the subject's age:

1) under 6 years old

2) from 6 to 12 years old

3) from 12+ to 40 years old

4) from 40+ to 60 years old

5) greater than 60 years old

6) A dog of any age

--> 4

results: (using NAFX vers. 1.0, DetectFovs vers. 1.0)

                     NAFX = 0.279  (<= 20/59)  --  40+ to 60 years old

Fov. time per fov. period = 23.8 msec

     Fov. time per second = 0.14 sec

            STD(pos, vel) = (0.464 deg, 3.38 deg/sec)

    Fov. window (pos, vel): (1 deg, 6 deg/sec)

                       tau: 50.4 msec

 

Citation

 

Although the information contained in this paper and its downloading are free, please acknowledge its source by citing the paper as follows:

 

DellÕOsso, L.F.: Using the NAFX for Eye-Movement Fixation Data Analysis and Display. OMLAB Report #111005, 1-7, 2005. http://www.omlab.org/OMLAB_page/Teaching/teaching.html


Note: This report was originally numbered as #090905 (date written) and was corrected to #111005 (date posted) on February 7, 2008.


Figure 4. Outputs of ÔshowpvÕ. (See legend of Figure 3 for details.) Note that algorithm detected 9 foveation periods in the 8 cycles; to calculate the NAFX, 8 will be used.