Problem reading competition data

External Email - Use Caution

Hi all,

I get an error trying to read fif files from Biomag competition into
MNE (https://box.bic.mni.mcgill.ca/s/Biomag2018). The error message is
below. The same file converts fine in Matlab. Any idea?

Thanks,

Vladimir

External Email - Use Caution

`mne show_fiff 226_RAW.fif` had these lines after the measurement info
section:

        103 = FIFFB_PROCESSED_DATA
            206 = FIFF_COMMENT/FIFF_DESCRIPTION (15b str) = Single
category ... str len=15
            104 = FIFFB_EVOKED
            ...

?
You can read it with `mne.read_evokeds('226_RAW.fif')`. Here is the
`evoked.plot()`:
[image: Figure_1.png]
So these data are stored in evoked format, not raw.

Eric

        External Email - Use Caution

Hi all,

I get an error trying to read fif files from Biomag competition into
MNE (https://box.bic.mni.mcgill.ca/s/Biomag2018). The error message is
below. The same file converts fine in Matlab. Any idea?

Thanks,

Vladimir

------------------
raw = mne.io.read_raw_fif('226_RAW.fif', preload=True, allow_maxshield
= True, verbose='error')
Traceback (most recent call last):

  File "<ipython-input-3-c948947cad43>", line 1, in <module>
    raw = mne.io.read_raw_fif('226_RAW.fif', preload=True,
allow_maxshield = True, verbose='error')

  File
"C:\wtcnapps\Anaconda3\envs\mne\lib\site-packages\mne\io\fiff\raw.py",
line 459, in read_raw_fif
    preload=preload, verbose=verbose)

  File "<string>", line 2, in __init__

  File "C:\wtcnapps\Anaconda3\envs\mne\lib\site-packages\mne\utils.py",
line 728, in verbose
    return function(*args, **kwargs)

  File
"C:\wtcnapps\Anaconda3\envs\mne\lib\site-packages\mne\io\fiff\raw.py",
line 87, in __init__
    preload, do_check_fname)

  File "<string>", line 2, in _read_raw_file

  File "C:\wtcnapps\Anaconda3\envs\mne\lib\site-packages\mne\utils.py",
line 729, in verbose
    return function(*args, **kwargs)

  File
"C:\wtcnapps\Anaconda3\envs\mne\lib\site-packages\mne\io\fiff\raw.py",
line 165, in _read_raw_file
    raise ValueError('No raw data in %s' % fname)

ValueError: No raw data in D:\Tempdata\Competition\226\226_RAW.fif

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180621/4b30b598/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Figure_1.png
Type: image/png
Size: 117912 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180621/4b30b598/attachment-0001.png

External Email - Use Caution

Thanks. That solves it. I now ran into a different issue trying to make a
BEM model. I get the same error for all the 3 subjects (see below). I ran a
sequence of commands as in the documentation and that same sequence worked
for me before on a different example. Please advise.

One thing that might be relevant is that I used the --force option in
make_scalp_surfaces.

Thanks,

Vladimir

External Email - Use Caution

sorry I don't see the error.

btw it must work as we have played with these data successfully.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180622/7508850c/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Figure_1.png
Type: image/png
Size: 117912 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180622/7508850c/attachment-0001.png

External Email - Use Caution

Sorry, my mistake. The command and the error are below.

Thanks,

Vladimir

In [117]: bem_file=subject+'-bem.fif'

     ...:

     ...: if op.isfile(bem_file):

     ...: bem = mne.read_bem_surfaces(bem_file)

     ...: else:

     ...: bem = mne.make_bem_model(mri_dir)

     ...: mne.write_bem_surfaces(bem_file, bem)

Creating the BEM geometry...

Going from 5th to 4th subdivision of an icosahedron (n_tri: 20480 -> 5120)

Going from 5th to 4th subdivision of an icosahedron (n_tri: 20480 -> 5120)

Going from 5th to 4th subdivision of an icosahedron (n_tri: 20480 -> 5120)

outer skin CM is 0.90 -5.99 -0.58 mm

outer skull CM is 0.90 -5.96 -1.02 mm

inner skull CM is 0.85 -6.62 6.36 mm

Checking that outer skull surface is inside outer skin surface...

Checking that inner skull surface is inside outer skull surface...

Traceback (most recent call last):

File "<ipython-input-117-e6e8d7e63470>", line 6, in <module>

bem = mne.make_bem_model(mri_dir)

File "<string>", line 2, in make_bem_model

File "/home/vladimir/.conda/envs/mne/lib/python3.6/site-packages/mne/utils.py",
line 729, in verbose

return function(*args, **kwargs)

File "/home/vladimir/.conda/envs/mne/lib/python3.6/site-packages/mne/bem.py",
line 572, in make_bem_model

surfaces = _surfaces_to_bem(surfaces, ids, conductivity, ico)

File "/home/vladimir/.conda/envs/mne/lib/python3.6/site-packages/mne/bem.py",
line 502, in _surfaces_to_bem

_check_surfaces(surfs, incomplete=incomplete)

File "/home/vladimir/.conda/envs/mne/lib/python3.6/site-packages/mne/bem.py",
line 443, in _check_surfaces

_assert_inside(surf_2, surf_1)

File "/home/vladimir/.conda/envs/mne/lib/python3.6/site-packages/mne/bem.py",
line 432, in _assert_inside

% (_surf_name[fro['id']], _surf_name[to['id']]))

RuntimeError: Surface inner skull is not completely inside surface outer skull

External Email - Use Caution

use :

bem = mne.make_bem_model(mri_dir, conductivity=[0.3])

to use a single layer BEM. it should work.

Alex

External Email - Use Caution

Thanks, that helps. Two more questions:

1) How do I compute covariance? There is a method for raw and epochs
but this data is evoked type.
2) Is it possible to regularise by reducing dimensionality and not use
noise covariance? This is related to the discussion we had with Alex
and others off this list, regarding the best settings for MaxFiltered
data.

Thanks,

Vladimir

External Email - Use Caution

hi,

1) How do I compute covariance? There is a method for raw and epochs
but this data is evoked type.

you could make a RawArray from a bit of the data in the Evoked instance.
or you can use this:

http://martinos.org/mne/stable/generated/mne.make_ad_hoc_cov.html#mne.make_ad_hoc_cov

2) Is it possible to regularise by reducing dimensionality and not use
noise covariance? This is related to the discussion we had with Alex
and others off this list, regarding the best settings for MaxFiltered
data.

where do you want to reduce dimensionality?

Alex

External Email - Use Caution

External Email - Use Caution

I want to reduce the dimensionality of the data and the lead-fields
and do beamforming in this reduced space. How would you normally do
beamforming on MaxFiltered data in this case?

I would use empty room data or prestim on which I had run Maxfilter
to get a noise cov and it would go fine.

Would you use the
pre-seizure part to compute noise covariance?

I don't have enough experience to argue here. I don't know
what to do precisely here given the data we have access to.

Alex