pyrfu.pyrf.dynamic_press module#
- pyrfu.pyrf.dynamic_press.dynamic_press(n_s, v_xyz, specie: str = 'ions')[source]#
Computes dynamic pressure.
- Parameters:
n_s (xarray.DataArray) – Time series of the number density of the specie.
v_xyz (xarray.DataArray) – Time series of the bulk velocity of the specie.
specie ({"ions", "electrons"}, Optional) – Specie. Default “ions”.
- Returns:
p_dyn – Time series of the dynamic pressure of the specie.
- Return type:
Examples
>>> from pyrfu import mms, pyrf
Time interval
>>> tint = ["2019-09-14T07:54:00.000", "2019-09-14T08:11:00.000"]
Spacecraft index
>>> mms_id = 1
Load ion bulk velocity and remove spintone
>>> v_xyz_i = mms.get_data("vi_gse_fpi_fast_l2", tint, mms_id) >>> st_xyz_i = mms.get_data("sti_gse_fpi_fast_l2", tint, mms_id) >>> v_xyz_i = v_xyz_i - st_xyz_i
Ion number density
>>> n_i = mms.get_data("ni_fpi_fast_l2", tint, mms_id)
Compute dynamic pressure
>>> p = pyrf.dynamic_press(n_i, v_xyz_i, specie="ions")