pyrfu.pyrf.integrate module#
- pyrfu.pyrf.integrate.integrate(inp, time_step: float | None = None)[source]#
Integrate time series.
- Parameters:
inp (xarray.DataArray) – Time series of the variable to integrate.
time_step (float, Optional) – Time steps threshold. All time_steps larger than 3*time_step are assumed data gaps, default is that time_step is the smallest value of all time_steps of the time series.
- Returns:
out – Time series of the time integrated input.
- Return type:
Examples
>>> from pyrfu import mms, pyrf
Time interval
>>> tint = ["2015-12-14T01:17:40.200", "2015-12-14T01:17:41.500"]
Spacecraft index
>>> mms_id = 1
Load magnetic field and electric field
>>> b_xyz = mms.get_data("B_gse_fgm_brst_l2", tint, mms_id) >>> e_xyz = mms.get_data("E_gse_edp_brst_l2", tint, mms_id)
Convert electric field to field aligned coordinates
>>> e_xyzfac = pyrf.convert_fac(e_xyz, b_xyz, [1, 0, 0])