pyrfu.pyrf.c_4_grad module#

pyrfu.pyrf.c_4_grad.c_4_grad(r_list, b_list, method: str = 'grad')[source]#

Calculate gradient of physical field using 4 spacecraft technique in [2] [3].

Parameters:
  • r_list (list of xarray.DataArray) – Time series of the positions of the spacecraft

  • b_list (list of xarray.DataArray) – Time series of the magnetic field at the corresponding positions

  • method ({"grad", "div", "curl", "bdivb", "curv"}, Optional) –

    Method flag :
    • ”grad” : compute gradient (default)

    • ”div” : compute divergence

    • ”curl” : compute curl

    • ”bdivb” : compute b.div(b)

    • ”curv” : compute curvature

Returns:

out – Time series of the derivative of the input field corresponding to the method

Return type:

xarray.DataArray

See also

pyrfu.pyrf.c_4_k

Calculates reciprocal vectors in barycentric coordinates.

References

[2]

Dunlop, M. W., A. Balogh, K.-H. Glassmeier, and P. Robert (2002a), Four-point Cluster application of magnetic field analysis tools: The Curl- ometer, J. Geophys. Res., 107(A11), 1384, doi : https://doi.org/10.1029/2001JA005088.

[3]

Robert, P., et al. (1998), Accuracy of current determination, in Analysis Methods for Multi-Spacecraft Data, edited by G. Paschmann and P. W. Daly, pp. 395–418, Int. Space Sci. Inst., Bern. doi : https://www.issibern.ch/forads/sr-001-16.pdf

Examples

>>> from pyrfu.mms import get_data
>>> from pyrfu import mms, pyrf

Time interval

>>> tint = ["2019-09-14T07:54:00.000", "2019-09-14T08:11:00.000"]

Load magnetic field and spacecraft position

>>> b_mms = [get_data("B_gse_fgm_srvy_l2", tint, m) for m in range(1, 5)]
>>> r_mms = [get_data("R_gse", tint, m) for m in range(1, 5)]
>>> gradb = pyrf.c_4_grad(r_mms, b_mms, "grad")