pyrfu.mms.make_model_vdf module#

pyrfu.mms.make_model_vdf.make_model_vdf(vdf, b_xyz, sc_pot, n_s, v_xyz, t_xyz, isotropic: bool = False)[source]#

Make a general bi-Maxwellian distribution function based on particle moment data in the same format as PDist.

Parameters:
  • vdf (xarray.Dataset) – Particle distribution (skymap).

  • b_xyz (xarray.DataArray) – Time series of the background magnetic field.

  • sc_pot (xarray.DataArray) – Time series of the spacecraft potential.

  • n_s (xarray.DataArray) – Time series of the number density of specie s.

  • v_xyz (xarray.DataArray) – Time series of the bulk velocity.

  • t_xyz (xarray.DataArray) – Time series of the temperature tensor.

  • isotropic (bool, Optional) – Flag to make an isotropic model distribution. Default is False.

Returns:

model_vdf – Distribution function in the same format as vdf.

Return type:

xarray.Dataset

See also

pyrfu.mms.calculate_epsilon

Calculates epsilon parameter using model distribution.

Examples

>>> from pyrfu.mms import get_data, make_model_vdf

Define time interval

>>> tint_brst = ["2015-10-30T05:15:20.000", "2015-10-30T05:16:20.000"]

Load magnetic field and spacecraft potential

>>> b_dmpa = get_data("b_dmpa_fgm_brst_l2", tint_brst, 1)
>>> scpot = get_data("V_edp_brst_l2", tint_brst, 1)

Load electron velocity distribution function

>>> vdf_e = get_data("pde_fpi_brst_l2", tint_brst, 1)

Load moments of the electron velocity distribution function

>>> n_e = get_data("ne_fpi_brst_l2", tint_brst, 1)
>>> v_xyz_e = get_data("ve_dbcs_fpi_brst_l2", tint_brst, 1)
>>> t_xyz_e = get_data("te_dbcs_fpi_brst_l2", tint_brst, 1)

Compute model electron velocity distribution function

>>> vdf_m_e = make_model_vdf(vdf_e, b_xyz, scpot, n_e, v_xyz_e, t_xyz_e)