AFNI stands for Analysis of Functional NeuroImages. It's not a program, but rather a very large collection of programs (there is one called afni
, it is the main display program) for doing statistical analyses of your MEG (or FMRI) data.
You can learn more about AFNI (and also get it, it's GPL) from the AFNI website.
Here, we're going to document a few tips and tricks for doing things to MEG data with AFNI. If you have a favorite that isn't listed here, please feel free to add it.
Note: some of these are on this page, some are on other pages.
AFNI does things by default in the RAI coordinate system. That's Right, Anterior, Inferior, and it means that the X axis runs from Right to Left (negative to positive), the Y axis goes from Anterior to Posterior, and the Z axis goes from Inferior to Superior.
CTF MEG data (actually, the MEG sensor locations) are stored in head coordinates derived from the positions of the three head-coils placed on the fiducial points: Nasion, Left preauricular and Right preauricular. The head coordinate system is, in AFNI nomenclature, PRI order. That is:
–X | Posterior | — | Anterior | +X |
–Y | Right | — | Left | +Y |
–Z | Inferior | — | Superior | +Z |
This is a right-handed coordinate system: point your thumb forward, your index finger leftward, and middle finger upward; those are the positive X, Y, and Z axes.
When you run afni
, you can either specify -orient PRI
on the command line, or add the following line to your .afnirc
file:
AFNI_ORIENT = PRI
Given the three fiducial landmarks:
The head (PRI) coordinate system is defined as follows:
Note that the Y axis does not necessarily go through the left and right fiducials.
Some useful things you might like to put in your .afnirc
file are:
AFNI_LEFT_IS_LEFT = YES AFNI_ENFORCE_ASPECT = YES AFNI_ALWAYS_LOCK = YES AFNI_ORIENT = PRI