bfieldtools.sphtools.field¶
-
bfieldtools.sphtools.
field
(p, acoeffs, bcoeffs, lmax, normalization='default', R=1)¶ Computes magnetic field at some point from the sph coefficients.
Ignores the ‘DC’ component l=0.
- Parameters
- p: Nx3 array
coordinates in which the potential is computed
- acoeffs: lmax*(lmax+2)x1 array
spectral coefficients of r**l terms
- bcoeffs: lmax*(lmax+2)x1 array
spectral coefficients of r**(-l) terms
- lmax: int
maximum degree l which is used in computing
- normalization: string
“default”: the fields correspond to normalized magnetic potential. “unit”: the fields are normalized w.r.t integration over the unit sphere. “energy”: each term in inner/outer basis function with respect to sphere with radius R is normalized to unit energy
- R: float
Sphere radius that separates inner/outer components
- Returns
- B: Nx3 array
Magnetic field produced by the sph components