Recent Changes - Search:

Home

RunningExperiments

AnalysingData

MEG Group

Administrative info

Computers and network

Meetings

How to improve this site

RecipeSummary

Back to MEG main page

How to re-do the HPI fitting after the fact by swapping the coil order

  1. Open a terminal window and log on to the acquisition workstation
    ssh meg@is143627
  2. cd to the directory where your data is, e.g.
    cd /neurospin/acquisition/neuromag/data/<your_study>/<your_subject>/<date_of_experiment>/
  3. Use the NeuroMag utility "hpifit" to check the quality of the head positioning
    /neuro/dacq/bin/hpifit -file subject101_run01.fif <press enter>
  4. Have a look at the output, in particular the last few lines.
  5. Add the "-swap" command line option in order to impose a different ordering of the four coils. Try different orderings...
    /neuro/dacq/bin/hpifit -file subj101_run01.fif -swap 1234 <press enter>

  6. Add the "-output" command line option to save the parameters to a file.
    /neuro/dacq/bin/hpifit -file subj101_run01.fif -swap 1234 -output subj101_run01_swap.fif

  7. Make a copy of your data file...

    cp subj101_run01.fif subj101_run01_fixed.fif

  8. Use the "copy_trans_fif" utility to replace the parameters in the copy of your data file, with the "good" parameters output by the hpifit program...

    /neuro/bin/util/copy_trans_fif -f subj101_run01_swap.fif subj101_run01_fixed.fif

  9. When you do your data analysis, use the "_fixed.fif" version of your data file. THAT'S IT!

    (Note that if you run the hpifit program on your fixed file, it will look like it has not been fixed, but this is because hpifit will completely re-do the fitting from scratch, using the same bad guess that it used in the first place. But the transform matrix for the head position will be the one computed based on the ordering of the coils that you chose.)

  10. Repeat steps 3 through 8 for each of your data files (i.e. for each run).
Edit - History - Print - Recent Changes - Search
Page last modified on April 19, 2010, at 03:19 PM