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

Function _sh_negate

mne/transforms.py:885–888  ·  view source on GitHub ↗

Get the negative spherical harmonic from a positive one.

(sh, order)

Source from the content-addressed store, hash-verified

883
884
885def _sh_negate(sh, order):
886 """Get the negative spherical harmonic from a positive one."""
887 assert order >= 0
888 return sh.conj() * (-1.0 if order % 2 else 1.0) # == (-1) ** order
889
890
891def _sh_complex_to_real(sh, order):

Callers 4

_compute_sph_harmFunction · 0.85
_sss_basis_basicFunction · 0.85
_bases_real_to_complexFunction · 0.85

Calls

no outgoing calls

Tested by 1