# make\_watershed\_bem() does not make a BEM usable by	setup\_volume\_source\_space()

**URL:** <https://mne.discourse.group/t/make-watershed-bem-does-not-make-a-bem-usable-by-setup-volume-source-space/1972>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [October 4, 2019, 11:20pm UTC](https://mne.discourse.group/t/make-watershed-bem-does-not-make-a-bem-usable-by-setup-volume-source-space/1972 "2019-10-04T23:20:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 4, 2019, 11:20pm UTC](https://mne.discourse.group/t/make-watershed-bem-does-not-make-a-bem-usable-by-setup-volume-source-space/1972/1 "2019-10-04T23:20:20Z")

</div>

External Email - Use Caution

Hi,

At line 1182 of  
[https://github.com/mne-tools/mne-python/blob/maint/0.19/mne/bem.py](https://github.com/mne-tools/mne-python/blob/maint/0.19/mne/bem.py)  
mne.bem.make\_watershed\_bem() is creating the BEM FIF file using  
FIFF.FIFFV\_BEM\_SURF\_ID\_HEAD (==4). When using this BEM file for source  
modeling mne.setup\_volume\_source\_space() expect  
FIFF.FIFFV\_BEM\_SURF\_ID\_BRAIN (==1) (line 1705  
[https://github.com/mne-tools/mne-python/blob/master/mne/source\_space.py](https://github.com/mne-tools/mne-python/blob/master/mne/source_space.py))  
and then crash because this surface id is not found in the BEM (stack trace  
below).

I used

mne.bem.make\_watershed\_bem(fs\_subject, subjects\_dir=subjects\_dir,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;overwrite=False, show=True)

to make the BEM and

vol\_src = setup\_volume\_source\_space(  
&nbsp;&nbsp;&nbsp;&nbsp;subject, mri=fname\_aseg, pos=10.0, bem=fname\_model,  
&nbsp;&nbsp;&nbsp;&nbsp;add\_interpolator=False, volume\_label=labels\_vol,  
subjects\_dir=subjects\_dir)

to build the source space. Do you think it is a bug (I'll make a ticker if  
so), or does it look like I used these functions not correctly?

Best,

Christian

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 4, 2019, 11:50pm UTC](https://mne.discourse.group/t/make-watershed-bem-does-not-make-a-bem-usable-by-setup-volume-source-space/1972/2 "2019-10-04T23:50:55Z")

</div>

External Email - Use Caution

That function just makes the surfaces, plus the subject's head FIF. I  
suspect you've tried to use `subject-head.fif` as your BEM, which will not  
work.

You need to use `mne.make_bem_model` and `mne.make_bem_solution` to  
actually make the BEM itself from the surfaces `make_watershed_bem`  
produced, choosing along the way if you want a 1-layer or 3-layer model.  
You can then save these to disk and load them when you need them.

Eric

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 10, 2019, 10:52am UTC](https://mne.discourse.group/t/make-watershed-bem-does-not-make-a-bem-usable-by-setup-volume-source-space/1972/3 "2019-10-10T10:52:00Z")

</div>

External Email - Use Caution

Hi,  
&nbsp;&nbsp;&nbsp;Seasons' greetings.  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I am new to MNE and also to python. How to install mne-features  
in anaconda navigator. I tried with pip install mne-features, but shows the  
following error:

(base) C:\Users\Admin\>pip install mne-features  
Collecting mne-features  
&nbsp;&nbsp;Could not find a version that satisfies the requirement mne-features  
(from versions: )  
No matching distribution found for mne-features

the following Requirement are also satisfied:

These are the dependencies to use MNE-Features:

&nbsp;&nbsp;&nbsp;- numpy (\>=1.8)  
&nbsp;&nbsp;&nbsp;- matplotlib (\>=1.3)  
&nbsp;&nbsp;&nbsp;- scipy (\>=0.19)  
&nbsp;&nbsp;&nbsp;- numba (\>=0.37)  
&nbsp;&nbsp;&nbsp;- scikit-learn (\>=0.19)  
&nbsp;&nbsp;&nbsp;- mne (\>=0.14)  
&nbsp;&nbsp;&nbsp;- PyWavelets (\>=0.5.2)  
&nbsp;&nbsp;&nbsp;- pandas (\>=0.20)

please help me out.  
regards,

\*M.Bhuvaneshwari,\*  
\*Research Scholar,\*  
\*Karunya Institute of technology and Sciences\*

\*Coimbatore.\*

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [October 12, 2019, 12:25pm UTC](https://mne.discourse.group/t/make-watershed-bem-does-not-make-a-bem-usable-by-setup-volume-source-space/1972/4 "2019-10-12T12:25:56Z")

</div>

External Email - Use Caution

hi,

mne-features has never been pushed to pypi. You should do:

pip install git+  
[https://github.com/mne-tools/mne-features.git#egg=mne\_features](https://github.com/mne-tools/mne-features.git#egg=mne_features)

to install from the master branch.

Readme of mne-features needs to be updated or package should be released and  
pushed to pypi.

Alex
