pyrfu.pyrf.dynamic_press#
- pyrfu.pyrf.dynamic_press(n_s: DataArray, v_xyz: DataArray, specie: str | None = 'ions') DataArray[source]#
Computes dynamic pressure.
\[P_{dyn} = n_s m_s |\mathbf{V}_s|^2\]The bulk velocity is resampled to the times of the number density if they differ.
- Parameters:
n_s (DataArray) – Time series of the number density of the specie [cm^{-3}].
v_xyz (DataArray) – Time series of the bulk velocity of the specie [km/s].
specie (str, Optional) – Specie ‘ions’ (protons) or ‘electrons’. Default ‘ions’.
- Returns:
Time series of the dynamic pressure of the specie [nPa].
- Return type:
DataArray
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")