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

Function invert_transform

mne/transforms.py:636–649  ·  view source on GitHub ↗

Invert a transformation between coordinate systems. Parameters ---------- trans : dict Transform to invert. Returns ------- inv_trans : dict Inverse transform.

(trans)

Source from the content-addressed store, hash-verified

634
635
636def invert_transform(trans):
637 """Invert a transformation between coordinate systems.
638
639 Parameters
640 ----------
641 trans : dict
642 Transform to invert.
643
644 Returns
645 -------
646 inv_trans : dict
647 Inverse transform.
648 """
649 return Transform(trans["to"], trans["from"], np.linalg.inv(trans["trans"]))
650
651
652def transform_surface_to(surf, dest, trans, copy=False):

Callers 15

test_transformsFunction · 0.90
test_dig_montage_transFunction · 0.90
test_scale_mri_xfmFunction · 0.90
test_get_transFunction · 0.90
test_combineFunction · 0.90
_scale_xfmFunction · 0.85
_ensure_transFunction · 0.85

Calls 1

TransformClass · 0.85

Tested by 9

test_transformsFunction · 0.72
test_dig_montage_transFunction · 0.72
test_scale_mri_xfmFunction · 0.72
test_get_transFunction · 0.72
test_combineFunction · 0.72