pyrfu.pyrf.plasma_calc module#
- pyrfu.pyrf.plasma_calc.plasma_calc(b_xyz, t_i, t_e, n_i, n_e)[source]#
Computes plasma parameters including characteristic length and time scales.
- Parameters:
b_xyz (xarray.DataArray) – Time series of the magnetic field [nT].
t_i (xarray.DataArray) – Time series of the ions scalar temperature [eV].
t_e (xarray.DataArray) – Time series of the electrons scalar temperature [eV].
n_i (xarray.DataArray) – Time series of the ions number density [cm^{-3}].
n_e (xarray.DataArray) – Time series of the electrons number density [cm^{-3}].
- Returns:
out –
- Dataset of the plasma parameters :
- timexarray.DataArray
Time.
- Wpexarray.DataArray
Time series of the electron plasma frequency [rad.s^{-1}].
- Fpexarray.DataArray
Time series of the electron plasma frequency [Hz].
- Wcexarray.DataArray
Time series of the electron cyclotron frequency [rad.s^{-1}].
- Fcexarray.DataArray
Time series of the electron cyclotron frequency [Hz].
- Wppxarray.DataArray
Time series of the ion plasma frequency [rad.s^{-1}].
- Fppxarray.DataArray
Time series of the ion plasma frequency [Hz].
- Fcpxarray.DataArray
Time series of the ion cyclotron frequency [Hz].
- Fuhxarray.DataArray
Time series of the upper hybrid frequency [Hz].
- Flhxarray.DataArray
Time series of the lower hybrid frequency [Hz].
- Vaxarray.DataArray
Time series of the Alfvèn velocity (ions) [m.s^{-1}].
- Vaexarray.DataArray
Time series of the Alfvèn velocity (electrons) [m.s^{-1}].
- Vtexarray.DataArray
Time series of the electron thermal velocity [m.s^{-1}].
- Vtpxarray.DataArray
Time series of the electron thermal velocity [m.s^{-1}].
- Vtsxarray.DataArray
Time series of the sound speed [m.s^{-1}].
- gamma_exarray.DataArray
Time series of the electron Lorentz factor.
- gamma_pxarray.DataArray
Time series of the electron Lorentz factor.
- Lexarray.DataArray
Time series of the electron inertial length [m].
- Lixarray.DataArray
Time series of the electron inertial length [m].
- Ldxarray.DataArray
Time series of the Debye length [m].
- Ndxarray.DataArray
Time series of the number of electrons in the Debye sphere.
- Roexarray.DataArray
Time series of the electron Larmor radius [m].
- Ropxarray.DataArray
Time series of the ion Larmor radius [m].
- Rosxarray.DataArray
Time series of the length associated to the sound speed [m].
- Return type:
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) >>> t_xyz_i = mms.get_data("Ti_gse_fpi_fast_l2", tint, mms_id) >>> t_xyz_e = mms.get_data("Te_gse_fpi_fast_l2", tint, mms_id) >>> n_i = mms.get_data("Ni_fpi_fast_l2", tint, mms_id) >>> n_e = mms.get_data("Ne_fpi_fast_l2", tint, mms_id)
Compute scalar temperature
>>> t_xyzfac_i = mms.rotate_tensor(t_xyz_i, "fac", b_xyz, "pp") >>> t_xyzfac_e = mms.rotate_tensor(t_xyz_e, "fac", b_xyz, "pp") >>> t_i = pyrf.trace(t_xyzfac_i) >>> t_e = pyrf.trace(t_xyzfac_e)
Compute plasma parameters
>>> plasma_params = pyrf.plasma_calc(b_xyz, t_i, t_e, n_i, n_e)