pyrfu.models package#

pyrfu.models.igrf(time: ndarray[tuple[int, ...], dtype[Any]], flag: str | None = None) Tuple[ndarray[tuple[int, ...], dtype[float64]], ndarray[tuple[int, ...], dtype[float64]]][source]#

Returns magnetic dipole latitude and longitude of the IGRF model

Parameters:
  • time (numpy.ndarray) – Times in unix format.

  • flag (str) – Default is dipole.

Returns:

Tuple containing latitude and longitude as numpy arrays.

Return type:

tuple

Raises:

NotImplementedError – If flag is not dipole.

pyrfu.models.ion_anisotropy_thresh(beta, instability_type, growth_rate='10^-2')[source]#

Compute the threshold using the empirical model defined in [1].

\[R_i = T_{i\perp} / T_{i\parallel} = 1 + a / (\beta_{i\parallel} -\beta_0)^b\]
Parameters:
  • beta (xarray.DataArray or numpy.ndarray) – Time series or array of parallel ion plasma beta.

  • a (float) – Coefficient from fit.

  • b (float) – Coefficient from fit.

  • beta0 (float) – Coefficient from fit.

Returns:

r_i_thresh – Time series or array of threshold temperature anisotropy at the given beta.

Return type:

xarray.DataArray

References

[1]

Hellinger, P., P. Travnicek, J. C. Kasper, and A. J. Lazarus (2006), Solar wind proton temperature anisotropy: Linear theory and WIND/SWE observations, Geophys. Res. Lett., 33, L09101, doi:10.1029/2006GL025925.

pyrfu.models.magnetopause_normal(r_gsm, b_z_imf, p_sw, model: str = 'mp_shue1997', m_alfven: float = 4.0)[source]#

Computes the distance and normal vector to the magnetopause for [1] or [2] model. Or bow shock for [3] model.

Parameters:
  • r_gsm (array_like) – GSM position in Re.

  • b_z_imf (float) – IMF Bz in nT.

  • p_sw (float) – Solar wind dynamic pressure in nPa.

  • model ({"mp_shue1997", "mp_shue1998", "bs97", "bs98"}, Optional) –

    Name of model :
    • ’mp_shue97’ : Shue et al., 1997 (Default)

    • ’mp_shue98’ : Shue et al., 1998

    • ’bs97’ : Bow shock, Farris & Russell 1994

    • ’bs98’ : Bow shock, Farris & Russell 1994

  • m_alfven (float, Optional) – Alfvenic Mach number, only needed if bow shock model is used.

Returns:

  • mindist (float) – Minimum distance to the magnetopause, in Re. Positive value if spacecraft is inside the magnetopause, negative if outside the magnetopause.

  • n_vec (numpy.ndarray) – Normal vector to the magnetopause (pointing away from Earth).

References

[1]

J.-H. Shue, J. K. Chao, H. C. Fu, C. T. Russell, P. Song, K. K. Khurana, and H. J. Singer (1997), A new functional form to study the solar wind control of the magnetopause size and shape, J. Geophys. Res., 102, 9497, doi: https://doi.org/10.1029/97JA00196

[2]

J.-H. Shue, P. Song, C. T. Russell, J. T. Steinberg, J. K. Chao, G. Zastenker, O. L. Vaisber, S. Kokubun, H. J. Singer, T. R. Detman and H. Kawano (1998), Magnetopause location under extreme solar wind conditions, J. Geophys. Res., 103(A8), 17, 691–17,700, doi: https://doi.org/10.1029/98JA01103

[3]

M. H. Farris and C. T. Russell (1994), Determining the standoff distance of the bow shock: Mach number dependence and use of models, J. Geophys. Res., 99, 17681. doi: https://doi.org/10.1029/94JA01020

Submodules#