86
86
87
87
88
88
class ConductorModel (dict ):
89
- """BEM or sphere model."""
89
+ """BEM or sphere model.
90
+
91
+ See :func:`~mne.make_bem_model` and :func:`~mne.make_bem_solution` to create a
92
+ :class:`mne.bem.ConductorModel`.
93
+ """
90
94
91
95
def __repr__ (self ): # noqa: D105
92
96
if self ["is_sphere" ]:
@@ -646,30 +650,32 @@ def make_bem_model(
646
650
):
647
651
"""Create a BEM model for a subject.
648
652
653
+ Use :func:`~mne.make_bem_solution` to turn the returned surfaces into a
654
+ :class:`~mne.bem.ConductorModel` suitable for forward calculation.
655
+
649
656
.. note:: To get a single layer bem corresponding to the --homog flag in
650
657
the command line tool set the ``conductivity`` parameter
651
- to a list/tuple with a single value (e.g. [ 0.3] ).
658
+ to a float (e.g. `` 0.3`` ).
652
659
653
660
Parameters
654
661
----------
655
- subject : str
656
- The subject.
662
+ %(subject)s
657
663
ico : int | None
658
664
The surface ico downsampling to use, e.g. ``5=20484``, ``4=5120``,
659
665
``3=1280``. If None, no subsampling is applied.
660
- conductivity : array of int, shape (3,) or (1,)
666
+ conductivity : float | array of float of shape (3,) or (1,)
661
667
The conductivities to use for each shell. Should be a single element
662
668
for a one-layer model, or three elements for a three-layer model.
663
669
Defaults to ``[0.3, 0.006, 0.3]``. The MNE-C default for a
664
- single-layer model would be ``[0.3]``.
670
+ single-layer model is ``[0.3]``.
665
671
%(subjects_dir)s
666
672
%(verbose)s
667
673
668
674
Returns
669
675
-------
670
676
surfaces : list of dict
671
- The BEM surfaces. Use ` make_bem_solution` to turn these into a
672
- `~mne.bem.ConductorModel` suitable for forward calculation.
677
+ The BEM surfaces. Use :func:`~mne. make_bem_solution` to turn these into a
678
+ :class: `~mne.bem.ConductorModel` suitable for forward calculation.
673
679
674
680
See Also
675
681
--------
@@ -682,9 +688,11 @@ def make_bem_model(
682
688
-----
683
689
.. versionadded:: 0.10.0
684
690
"""
685
- conductivity = np .array (conductivity , float )
691
+ conductivity = np .atleast_1d (conductivity ). astype ( float )
686
692
if conductivity .ndim != 1 or conductivity .size not in (1 , 3 ):
687
- raise ValueError ("conductivity must be 1D array-like with 1 or 3 " "elements" )
693
+ raise ValueError (
694
+ "conductivity must be a float or a 1D array-like with 1 or 3 elements"
695
+ )
688
696
subjects_dir = get_subjects_dir (subjects_dir , raise_error = True )
689
697
subject_dir = subjects_dir / subject
690
698
bem_dir = subject_dir / "bem"
@@ -851,7 +859,8 @@ def make_sphere_model(
851
859
center will be calculated from the digitization points in info.
852
860
head_radius : float | str | None
853
861
If float, compute spherical shells for EEG using the given radius.
854
- If 'auto', estimate an appropriate radius from the dig points in Info,
862
+ If ``'auto'``, estimate an appropriate radius from the dig points in the
863
+ :class:`~mne.Info` provided by the argument ``info``.
855
864
If None, exclude shells (single layer sphere model).
856
865
%(info)s Only needed if ``r0`` or ``head_radius`` are ``'auto'``.
857
866
relative_radii : array-like
@@ -1200,6 +1209,8 @@ def make_watershed_bem(
1200
1209
):
1201
1210
"""Create BEM surfaces using the FreeSurfer watershed algorithm.
1202
1211
1212
+ See :ref:`bem_watershed_algorithm` for additional information.
1213
+
1203
1214
Parameters
1204
1215
----------
1205
1216
subject : str
@@ -1209,9 +1220,9 @@ def make_watershed_bem(
1209
1220
volume : str
1210
1221
Defaults to T1.
1211
1222
atlas : bool
1212
- Specify the --atlas option for mri_watershed.
1223
+ Specify the `` --atlas option`` for `` mri_watershed`` .
1213
1224
gcaatlas : bool
1214
- Specify the --brain_atlas option for mri_watershed.
1225
+ Specify the `` --brain_atlas`` option for `` mri_watershed`` .
1215
1226
preflood : int
1216
1227
Change the preflood height.
1217
1228
show : bool
@@ -1425,7 +1436,7 @@ def read_bem_surfaces(
1425
1436
patch_stats : bool, optional (default False)
1426
1437
Calculate and add cortical patch statistics to the surfaces.
1427
1438
s_id : int | None
1428
- If int, only read and return the surface with the given s_id.
1439
+ If int, only read and return the surface with the given `` s_id`` .
1429
1440
An error will be raised if it doesn't exist. If None, all
1430
1441
surfaces are read and returned.
1431
1442
%(on_defects)s
@@ -1436,7 +1447,7 @@ def read_bem_surfaces(
1436
1447
Returns
1437
1448
-------
1438
1449
surf: list | dict
1439
- A list of dictionaries that each contain a surface. If s_id
1450
+ A list of dictionaries that each contain a surface. If `` s_id``
1440
1451
is not None, only the requested surface will be returned.
1441
1452
1442
1453
See Also
@@ -1964,8 +1975,7 @@ def convert_flash_mris(
1964
1975
1965
1976
Parameters
1966
1977
----------
1967
- subject : str
1968
- Subject name.
1978
+ %(subject)s
1969
1979
flash30 : bool | list of SpatialImage or path-like | SpatialImage | path-like
1970
1980
If False do not use 30-degree flip angle data.
1971
1981
The list of flash 5 echos to use. If True it will look for files
@@ -2084,10 +2094,11 @@ def make_flash_bem(
2084
2094
):
2085
2095
"""Create 3-Layer BEM model from prepared flash MRI images.
2086
2096
2097
+ See :ref:`bem_flash_algorithm` for additional information.
2098
+
2087
2099
Parameters
2088
2100
----------
2089
- subject : str
2090
- Subject name.
2101
+ %(subject)s
2091
2102
overwrite : bool
2092
2103
Write over existing .surf files in bem folder.
2093
2104
show : bool
0 commit comments