pyrfu.pyrf.gradient module#
- pyrfu.pyrf.gradient.gradient(inp)[source]#
Computes time derivative of the input variable.
- Parameters:
inp (xarray.DataArray) – Time series of the input variable.
- Returns:
out – Time series of the time derivative of the input variable.
- Return type:
Examples
>>> from pyrfu import mms, pyrf
Time interval
>>> tint = ["2017-07-18T13:03:34.000", "2017-07-18T13:07:00.000"]
Spacecraft index
>>> mms_id = 1
Load magnetic field
>>> b_xyz = mms.get_data("B_gse_fgm_brst_l2", tint, mms_id)
Time derivative of the magnetic field
>>> db_dt = pyrf.gradient(b_xyz)