pyrfu.pyrf.pres_anis module#
- pyrfu.pyrf.pres_anis.pres_anis(p_fac, b_xyz)[source]#
Compute pressure anisotropy factor:
\[\mu_0 \frac{P_\parallel - P_\perp}{|\mathbf{B}|^2}\]- Parameters:
p_fac (xarray.DataArray) – Time series of the pressure tensor in field aligne coordinates.
b_xyz (xarray.DataArray) – Time series of the background magnetic field.
- Returns:
p_anis – Time series of the pressure anisotropy.
- Return type:
See also
pyrfu.mms.rotate_tensor
Rotates pressure or temperature tensor into another coordinate system.
Examples
>>> from pyrfu import mms, pyrf
Time interval
>>> tint = ["2015-10-30T05:15:20.000", "2015-10-30T05:16:20.000"]
Spacecraft index
>>> mms_id = 1
Load magnetic field, ion/electron temperature and number density
>>> b_xyz = mms.get_data("B_gse_fgm_srvy_l2", tint, mms_id) >>> p_xyz_i = mms.get_data("Pi_gse_fpi_fast_l2", tint, mms_id)
Transform pressure tensor to field aligned coordinates >>> p_fac_i = mms.rotate_tensor(p_xyz_i, “fac”, b_xyz)
Compute pressure anistropy
>>> p_anis = pyrf.pres_anis(p_xyz_i, b_xyz)