[Mne_analysis] Mne_analysis Digest, Vol 147, Issue 24

Saeed Zahran saeedzahran at hotmail.com
Tue Apr 7 09:59:25 EDT 2020
Search archives:

        External Email - Use Caution        

kindly find the attached image of the sensors, it seems in the previous email not viewed

Best regards
Saeed

________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of mne_analysis-request at nmr.mgh.harvard.edu <mne_analysis-request at nmr.mgh.harvard.edu>
Sent: Tuesday, April 7, 2020 3:48 PM
To: mne_analysis at nmr.mgh.harvard.edu <mne_analysis at nmr.mgh.harvard.edu>
Subject: Mne_analysis Digest, Vol 147, Issue 24

Send Mne_analysis mailing list submissions to
        mne_analysis at nmr.mgh.harvard.edu

To subscribe or unsubscribe via the World Wide Web, visit
        https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
or, via email, send a message with subject or body 'help' to
        mne_analysis-request at nmr.mgh.harvard.edu

You can reach the person managing the list at
        mne_analysis-owner at nmr.mgh.harvard.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Mne_analysis digest..."


Today's Topics:

   1. fiff data (Saeed Zahran)


----------------------------------------------------------------------

Message: 1
Date: Tue, 7 Apr 2020 12:48:30 +0000
From: Saeed Zahran <saeedzahran at hotmail.com>
Subject: [Mne_analysis] fiff data
To: "mne_analysis at nmr.mgh.harvard.edu"
        <mne_analysis at nmr.mgh.harvard.edu>
Message-ID:
        <BN3PR01MB205142A9B3FD5C41C8D805CAB7C30 at BN3PR01MB2051.prod.exchangelabs.com>

Content-Type: text/plain; charset="iso-8859-1"

        External Email - Use Caution

Hello,

Hope you are fine and in good health,

I would like to start from your example about the OPM-MEG data to solve our problem, kindly let me ask some questions:

1) How can I modify or generate the sensors file (size, distance, ....) to fit it to our sensors?
We have some input information for generating this location file.
All OPM will be placed in a radial orientation over the scalp surface as shown on the figure below,
but each OPM will do measurement along X, Y an Z axis. Just, we applied a 90? rotation of each OPM in order to maximize the distance between High Frequency coils of the sensors, as shown below. Ths reduced the cross talk noise in our experimental setup. But placed over the scalp, due to the curvature of the scalp surface, these HF coils will be naturally distanced.
[cid:5a3fc822-d26f-42ad-9e1c-dbfa1b9c91af]
The size of OPM basis is 2 cm x 2cm (with its packaging) but the glass cell containing He atoms which are used to do the measurement is a circular glass cell of 1 cm diameter. The sensing volume has to be computed for the glass cell.  The space between two OPM should be 5 mm. The distance between the OPM and the scalp can be set to 1 mm.

For our simulations, we will have to consider both cases :

  *   the case ? 4 OPM ? (The 5th OPM is used for background noise measuremnt) over the scalp (these 4 OPM will be placed in an overhead position with respect the dipole location)
  *   for the case of a whole head OPM array and for this case, it can be derived from the SQUID

arrays by projecting the sensor locations to the scalp


2) We want to do simulation considering simple cases: radial dipole, tangential dipole + intermediate orientations, more or less deep dipole,...etc
, is it possible to do the simulation in MNE python? if not I think we can do it in brainstorm, do you have tips how can we import this dataset of opm
 brainstorm?. In fact I started to open it in fieldtrip (fiff_setup_read_raw) successfully open the raw file, but I did not successed to open the forward_sample.fiff, do you have an idea? which function I should used. Beacuse I need to see the data, so that I can understand it and do the simulations.

3) Do you know what method is used to compute the forward model of the opm dataset you have? because as you know we are dealing here with free axis measurement, I asked in brainstorm discussion if we can use openmeeg to generate the leadfield in this case, but still searching for confirmation if we can use openmeeg in this case,

Thank you

Best regards
Saeed
________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of mne_analysis-request at nmr.mgh.harvard.edu <mne_analysis-request at nmr.mgh.harvard.edu>
Sent: Monday, April 6, 2020 6:22 PM
To: mne_analysis at nmr.mgh.harvard.edu <mne_analysis at nmr.mgh.harvard.edu>
Subject: Mne_analysis Digest, Vol 147, Issue 22

Send Mne_analysis mailing list submissions to
        mne_analysis at nmr.mgh.harvard.edu

To subscribe or unsubscribe via the World Wide Web, visit
        https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
or, via email, send a message with subject or body 'help' to
        mne_analysis-request at nmr.mgh.harvard.edu

You can reach the person managing the list at
        mne_analysis-owner at nmr.mgh.harvard.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Mne_analysis digest..."


Today's Topics:

   1. Re: issue with volumetric source estimate morphing
      (Fleur  GAUDFERNAU)
   2. Re: Conductivity 1 layer or 3 (Alexandre Gramfort)


----------------------------------------------------------------------

Message: 1
Date: Mon, 6 Apr 2020 14:02:21 +0000
From: "Fleur  GAUDFERNAU" <fleur.gaudfernau at pasteur.fr>
Subject: Re: [Mne_analysis] issue with volumetric source estimate
        morphing
To: Discussion and support forum for the users of MNE Software
        <mne_analysis at nmr.mgh.harvard.edu>
Message-ID: <bc15786e599e450bb3a70e0d36d62303 at pasteur.fr>
Content-Type: text/plain; charset="iso-8859-1"

        External Email - Use Caution

Yes, it's done, thank you.

Fleur


________________________________
De : mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> de la part de Eric Larson <larson.eric.d at gmail.com>
Envoy? : lundi 6 avril 2020 14:18:55
? : Discussion and support forum for the users of MNE Software
Objet : Re: [Mne_analysis] issue with volumetric source estimate morphing


        External Email - Use Caution

This indeed looks like a bug. Can you open an issue on GitHub and we can work on it there?

Thanks,
Eric


On Mon, Apr 6, 2020 at 7:19 AM Fleur GAUDFERNAU <fleur.gaudfernau at pasteur.fr<mailto:fleur.gaudfernau at pasteur.fr>> wrote:

        External Email - Use Caution

Hello,

I have mixed source estimates that I wish to morph to the fsaverage brain. To do so, I separated the mixed source estimates into a surface source estimate and a volume source estimate. When trying to morph the lastest (using morph_apply), I get the following error:

ValueError: vertices do not match between morph (453) and stc (216) for the volume:

(I believe there is a small mistake in morph_apply and what it means is actually that vertices do not match between morph (216) and stc (453) for the volume.)


Here is my code:

#recuperating volume source estimate from mixed source estimate stc
nb_sources_cortex = stc.vertices[0].shape[0] + stc.vertices[1].shape[0]
vertices_vol = np.concatenate((stc.vertices[2], stc.vertices[3]))
stc_volume = mne.VolSourceEstimate(stc.data[nb_sources_cortex:], vertices_vol,
                                    tmin=stc.tmin, tstep=stc.tstep,
                                    subject = subject_mri)
#Maybe not the cleanest way to isolate a volume source estimate from a mixed source estimate?

#recuperating the source space I want to morph to
src_fsaverage_vol = subjects_dir + '/fsaverage/bem/fsaverage-vol-5-src.fif'
src_vol  = mne.read_source_spaces(src_fsaverage_vol)

#recuperating the source space to morph from
cereb_used = mne.SourceSpaces(inverse_op['src'][2:])
#the source space (inverse_op['src']) is made of 4 source spaces: 2 surface source spaces and 2 volume source spaces
#- here I recuperate the 2 volume source spaces, made of 216 and 237 vertices (respectively)

morph = mne.compute_source_morph(src = cereb_used,
                                    subject_from=stc_vol.subject,
                                    subject_to = 'fsaverage',
                                    subjects_dir=subjects_dir,
                                    niter_affine=[10, 10, 5], niter_sdr=[10, 10, 5],  # just for speed
                                    src_to=src_vol, verbose=True)

stc_vol = morph.apply(stc_vol)


I'm sorry that I cannot provide a replicable code.

I believe the error is coming from the fact that when computing the source morph, mne only considers the first of the two volume source spaces in cereb_used, hence generating a morph with 216 vertices instead of 216+237 vertices, but I do not know how to fix it.

King regards,

Fleur

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu<mailto:Mne_analysis at nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200406/69a869a7/attachment-0001.html

------------------------------

Message: 2
Date: Mon, 6 Apr 2020 17:22:06 +0200
From: Alexandre Gramfort <alexandre.gramfort at inria.fr>
Subject: Re: [Mne_analysis] Conductivity 1 layer or 3
To: Discussion and support forum for the users of MNE Software
        <mne_analysis at nmr.mgh.harvard.edu>
Message-ID:
        <CADeotZp=i-_Mh4T71PhmsU1owR+L2NSvEYABgkrWqQGAi=Npgw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

        External Email - Use Caution

I think the error is pretty clear:

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

forward model requires nested compartments. Use plot_bem to check the quality
of the MRI segmentation

HTH
A

On Mon, Apr 6, 2020 at 11:43 AM Andrade Rey Ren?
<rene.andrade at edu.uah.es> wrote:
>
>         External Email - Use Caution
>
> Sorry it is not fixed!! It says the same error
>
>
> >>> model = mne.make_bem_model(subject='bert', ico=5,
> ...                            conductivity=conductivity,
> ...                            subjects_dir='/usr/local/freesurfer/subjects/')
> Creating the BEM geometry...
> Going from 5th to 5th subdivision of an icosahedron (n_tri: 20480 -> 20480)
> Going from 5th to 5th subdivision of an icosahedron (n_tri: 20480 -> 20480)
> Going from 5th to 5th subdivision of an icosahedron (n_tri: 20480 -> 20480)
> outer skin  CM is   0.61 -19.22   0.35 mm
> outer skull CM is   0.63 -19.11  -0.15 mm
> inner skull CM is   0.02 -21.14   9.57 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 "<stdin>", line 3, in <module>
>   File "<decorator-gen-72>", line 21, in make_bem_model
>   File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/bem.py", line 590, in make_bem_model
>     surfaces = _surfaces_to_bem(surfaces, ids, conductivity, ico)
>   File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/bem.py", line 523, in _surfaces_to_bem
>     _check_surfaces(surfs, incomplete=incomplete)
>   File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/bem.py", line 462, in _check_surfaces
>     _assert_inside(surf_2, surf_1)
>   File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/bem.py", line 451, in _assert_inside
>     % (_surf_name[fro['id']], _surf_name[to['id']]))
> RuntimeError: Surface inner skull is not completely inside surface outer skull
>
> On 6 Apr 2020, at 11:38, Andrade Rey Ren? <rene.andrade at edu.uah.es> wrote:
>
> >>> conductivity = (0.3, 0.006, 0.3)
> >>> model = mne.make_bem_model(subject='bert', ico=4,
> ...                            conductivity=conductivity,
> ...                            subjects_dir='/usr/local/freesurfer/subjects/')
> 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.61 -19.22   0.36 mm
> outer skull CM is   0.63 -19.11  -0.14 mm
> inner skull CM is   0.02 -21.14   9.57 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 "<stdin>", line 3, in <module>
>   File "<decorator-gen-72>", line 21, in make_bem_model
>   File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/bem.py", line 590, in make_bem_model
>     surfaces = _surfaces_to_bem(surfaces, ids, conductivity, ico)
>   File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/bem.py", line 523, in _surfaces_to_bem
>     _check_surfaces(surfs, incomplete=incomplete)
>   File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/bem.py", line 462, in _check_surfaces
>     _assert_inside(surf_2, surf_1)
>   File "/home/andraderenew/.local/lib/python3.7/site-packages/mne/bem.py", line 451, in _assert_inside
>     % (_surf_name[fro['id']], _surf_name[to['id']]))
> RuntimeError: Surface inner skull is not completely inside surface outer skull
>
>
> With "ico = 5? it is fixed what is the idea behind this behavior?
>
> On 5 Apr 2020, at 21:29, Alexandre Gramfort <alexandre.gramfort at inria.fr> wrote:
>
>        External Email - Use Caution
>
> yes a full print of the error can help.
>
> A
>
> On Fri, Apr 3, 2020 at 10:10 AM Andrade Rey Ren?
> <rene.andrade at edu.uah.es> wrote:
>
>
>        External Email - Use Caution
>
> Do you need me to show you the error or do you already have an idea of the issue that I have when doing the conductivity with 3 layers in bem model? I don't remember what it said but there was certainly an error stoping me from going further in the analysis. I used the numbers in conductivities from a tutorial in mne. I don't know if these numbers change and how to obtain them.
> Thanks!!
>
> Sent from my iPhone
>
> On 3 Apr 2020, at 09:24, Alexandre Gramfort <alexandre.gramfort at inria.fr> wrote:
>
> ?        External Email - Use Caution
>
> hi,
>
> if you have EEG you must use 3 layers.
>
> The 1 layer option is just for MEG.
>
> HTH
> Alex
>
> On Thu, Apr 2, 2020 at 11:31 PM Andrade Rey Ren?
> <rene.andrade at edu.uah.es> wrote:
>
>       External Email - Use Caution
>
> Dear experts:
>
> There is an issue I don?t know how to proceed with. I am trying to do forward solution and I need  to have made BEM model for which I need to introduce conductivity defined for 1 or 3 layers. If I do 3 the output is an error if I choose 1 layer the output in forward solution is an error pointing to 3 layers in BEM model. What can I do?
>
> Sincerely,
> Andrade.
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis



------------------------------

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

End of Mne_analysis Digest, Vol 147, Issue 22
*********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200407/9063b7ff/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 25069 bytes
Desc: image.png
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200407/9063b7ff/attachment.png

------------------------------

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

End of Mne_analysis Digest, Vol 147, Issue 24
*********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200407/2bf78a70/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thumbnail_Picture (Device Independent Bitmap) 1.jpg
Type: image/jpeg
Size: 8697 bytes
Desc: thumbnail_Picture (Device Independent Bitmap) 1.jpg
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200407/2bf78a70/attachment-0001.jpg 


More information about the Mne_analysis mailing list