magpack.vectorop.magnitude#

magnitude(vector_field)#

Calculates the magnitude of a vector field.

Parameters:
vector_fieldnp.ndarray

Vector field shape (3, nx, ny, nz)

Returns:
np.ndarray

Magnitude (scalar field) of the input vector field.