[Mne_analysis] Maxfilter error: ill conditioned matrix

Eric Larson larson.eric.d at gmail.com
Fri Apr 20 12:30:05 EDT 2018
Search archives:

        External Email - Use Caution        

>
> destination =
> <Transform  |  MEG device->head>
> [[ 0.71960711  0.63715118 -0.27605024 -0.07788484]
>  [-0.67182261  0.73935592 -0.04479922 -0.01268383]
>  [ 0.17555553  0.21769466  0.96009851  0.06360817]
>  [ 0.          0.          0.          1.        ]]
>

This appears to have a large rotation and translation. To confirm, we can
take a look at what this transformation would be like for the "sample"
subject:

import mne
data_path = mne.datasets.sample.data_path()
raw = mne.io.read_raw_fif(data_path +
'/MEG/sample/sample_audvis_raw.fif')raw.info['dev_head_t']['trans'] =
np.array(
    [[ 0.71960711,  0.63715118, -0.27605024, -0.07788484],
     [-0.67182261,  0.73935592, -0.04479922, -0.01268383],
     [ 0.17555553,  0.21769466,  0.96009851,  0.06360817],
     [ 0.,          0.,          0.,          1.        ]])
trans = mne.read_trans(data_path + '/MEG/sample/sample_audvis_raw-trans.fif')
mne.viz.plot_alignment(raw.info, trans=trans, subject='sample',
                       subjects_dir=data_path + '/subjects',
                       coord_frame='meg', dig=True)

​
This view from the front of the MEG helmet looks like:



I recommend adapting this script to use your own data, as it will show the
correct digitization (and correct head if you have an MRI, if not, omit the
subject* and trans parameters, and set surfaces=[] in the plot_alignment
call). Was this roughly the orientation and position of the subject during
acquisition? If not, your dev_head_t is probably incorrect.

The actual origin used by Maxfilter will also depend on what you pass as
the "origin" parameter. But in any case, it appears that it will be quite
far from the device origin, and quite close to one side of the helmet (or
maybe outside it). This is probably causing the conditioning problems.
Assuming the dev_head_t is indeed correct, you should inspect the resulting
transform to see if it has amplified some of the noise, which (I think) is
a potential risk when the condition number gets too large.

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180420/51cce404/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snapshot.png
Type: image/png
Size: 98236 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180420/51cce404/attachment-0001.png 


More information about the Mne_analysis mailing list