MCPcopy Index your code
hub / github.com/mne-tools/mne-python / _do_forward_solution

Function _do_forward_solution

mne/forward/forward.py:1859–2090  ·  view source on GitHub ↗

Calculate a forward solution for a subject using MNE-C routines. This is kept around for testing purposes. This function wraps to mne_do_forward_solution, so the mne command-line tools must be installed and accessible from Python. Parameters ---------- subject : str

(
    subject,
    meas,
    fname=None,
    src=None,
    spacing=None,
    mindist=None,
    bem=None,
    mri=None,
    trans=None,
    eeg=True,
    meg=True,
    fixed=False,
    grad=False,
    mricoord=False,
    overwrite=False,
    subjects_dir=None,
    verbose=None,
)

Source from the content-addressed store, hash-verified

1857
1858
1859def _do_forward_solution(
1860 subject,
1861 meas,
1862 fname=None,
1863 src=None,
1864 spacing=None,
1865 mindist=None,
1866 bem=None,
1867 mri=None,
1868 trans=None,
1869 eeg=True,
1870 meg=True,
1871 fixed=False,
1872 grad=False,
1873 mricoord=False,
1874 overwrite=False,
1875 subjects_dir=None,
1876 verbose=None,
1877):
1878 """Calculate a forward solution for a subject using MNE-C routines.
1879
1880 This is kept around for testing purposes.
1881
1882 This function wraps to mne_do_forward_solution, so the mne
1883 command-line tools must be installed and accessible from Python.
1884
1885 Parameters
1886 ----------
1887 subject : str
1888 Name of the subject.
1889 meas : Raw | Epochs | Evoked | str
1890 If Raw or Epochs, a temporary evoked file will be created and
1891 saved to a temporary directory. If str, then it should be a
1892 filename to a file with measurement information the mne
1893 command-line tools can understand (i.e., raw or evoked).
1894 fname : path-like | None
1895 Destination forward solution filename. If None, the solution
1896 will be created in a temporary directory, loaded, and deleted.
1897 src : str | None
1898 Source space name. If None, the MNE default is used.
1899 spacing : str
1900 The spacing to use. Can be ``'#'`` for spacing in mm, ``'ico#'`` for a
1901 recursively subdivided icosahedron, or ``'oct#'`` for a recursively
1902 subdivided octahedron (e.g., ``spacing='ico4'``). Default is 7 mm.
1903 mindist : float | str | None
1904 Minimum distance measof sources from inner skull surface (in mm).
1905 If None, the MNE default value is used. If string, ``'all'``
1906 indicates to include all points.
1907 bem : str | None
1908 Name of the BEM to use (e.g., ``"sample-5120-5120-5120"``). If None
1909 (Default), the MNE default will be used.
1910 mri : dict | path-like | None
1911 The name of the trans file in FIF format.
1912 If None, ``trans`` must not be None.
1913 trans : dict | path-like | None
1914 File name of the trans file in text format.
1915 If None, ``mri`` must not be None.
1916 eeg : bool

Calls 11

has_mne_cFunction · 0.85
_check_fnameFunction · 0.85
_validate_typeFunction · 0.85
write_infoFunction · 0.85
write_transFunction · 0.85
get_subjects_dirFunction · 0.85
run_subprocessFunction · 0.85
read_forward_solutionFunction · 0.85
infoMethod · 0.80
appendMethod · 0.45
copyMethod · 0.45