pyrfu.pyrf.calc_ag#
- pyrfu.pyrf.calc_ag(p_xyz: DataArray) DataArray[source]#
Compute Che’s agyrotropy coefficient.
Che’s agyrotropy is [16]
\[AG = \frac{|\operatorname{det}{\mathbf{P}} - \operatorname{det}{\mathbf{G}}|} {\operatorname{det}{\mathbf{P}} + \operatorname{det}{\mathbf{G}}}\]where \(\mathbf{G} = \operatorname{diag}(P_{\parallel}, P_{\perp}, P_{\perp})\) is the gyrotropic tensor, with \(P_{\parallel} = P_{11}\) and \(P_{\perp} = (P_{22} + P_{33}) / 2\). The pressure tensor must be in field-aligned coordinates with the first axis along the magnetic field (see
pyrfu.mms.rotate_tensor()). The result does not depend on the choice of the perpendicular axes. The function returns \(AG\); usecalc_ag(p_xyz) ** (1 / 3)for \(AG^{1/3}\).- Parameters:
p_xyz (DataArray) – Time series of the pressure tensor
- Returns:
Time series of the agyrotropy coefficient of the specie.
- Return type:
DataArray
- Raises:
TypeError – If input is not a xarray.DataArray.
ValueError – If input is not a time series of a tensor (n_time, 3, 3).
References
[16]H. Che, C. Schiff, G. Le, J. C. Dorelli, B. L. Giles, and T. E. Moore (2018), Quantifying the effect of non-Larmor motion of electrons on the pres- sure tensor, Phys. Plasmas 25(3), 032101, doi: https://doi.org/10.1063/1.5016853.
Examples
>>> from pyrfu import mms, pyrf
Time interval
>>> tint = ["2019-09-14T07:54:00.000","2019-09-14T08:11:00.000"]
Spacecraft index
>>> ic = 1
Load magnetic field and electron pressure tensor
>>> b_xyz = mms.get_data("b_gse_fgm_srvy_l2", tint, 1) >>> p_xyz_e = mms.get_data("pe_gse_fpi_fast_l2", tint, 1)
Rotate electron pressure tensor to field aligned coordinates
>>> p_fac_e_pp = mms.rotate_tensor(p_xyz_e, "fac", b_xyz, "pp")
Compute agyrotropy coefficient and its cube root
>>> ag_e = pyrf.calc_ag(p_fac_e_pp) >>> ag_cr_e = ag_e ** (1 / 3)