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

Function _sph_harm_norm

mne/preprocessing/maxwell.py:1526–1533  ·  view source on GitHub ↗

Compute normalization factor for spherical harmonics.

(order, degree)

Source from the content-addressed store, hash-verified

1524
1525
1526def _sph_harm_norm(order, degree):
1527 """Compute normalization factor for spherical harmonics."""
1528 # we could use scipy.special.poch(degree + order + 1, -2 * order)
1529 # here, but it's slower for our fairly small degree
1530 norm = np.sqrt((2 * degree + 1.0) / (4 * np.pi))
1531 if order != 0:
1532 norm *= np.sqrt(factorial(degree - order) / float(factorial(degree + order)))
1533 return norm
1534
1535
1536def _concatenate_sph_coils(coils):

Callers 1

_sss_basis_basicFunction · 0.85

Calls 1

sqrtMethod · 0.80

Tested by

no test coverage detected