MCPcopy
hub / github.com/mne-tools/mne-python / _read_surface

Function _read_surface

mne/coreg.py:1445–1459  ·  view source on GitHub ↗
(filename, *, on_defects)

Source from the content-addressed store, hash-verified

1443
1444
1445def _read_surface(filename, *, on_defects):
1446 bem = dict()
1447 if filename is not None and op.exists(filename):
1448 if filename.endswith(".fif"):
1449 bem = read_bem_surfaces(filename, on_defects=on_defects, verbose=False)[0]
1450 else:
1451 try:
1452 bem = read_surface(filename, return_dict=True)[2]
1453 bem["rr"] *= 1e-3
1454 complete_surface_info(bem, copy=False)
1455 except Exception:
1456 raise ValueError(
1457 f"Error loading surface from {filename} (see Terminal for details)."
1458 )
1459 return bem
1460
1461
1462@fill_doc

Callers 1

_setup_bemMethod · 0.85

Calls 3

read_bem_surfacesFunction · 0.85
read_surfaceFunction · 0.85
complete_surface_infoFunction · 0.85

Tested by

no test coverage detected