solarwindpy.instabilities.verscharen2016
Instability thresholds from Verscharen et al. (2016).
The empirical fits of [] are implemented to
evaluate when a plasma becomes unstable in the (beta, R) plane.
References
Verscharen, D., Chandran, B. D. G., Klein, K. G., & Quataert, E. Collisionless Isotropization of the Solar-Wind Protons By Compressive Fluctuations and Plasma Instabilities, Astrophys. J., 831, 128 (2016).
Functions
|
Return the anisotropy threshold for a given beta. |
Classes
|
Evaluate plasma stability using the Verscharen et al. fits. |
|
Precompute and plot instability contours. |
- beta_ani_inst(beta, a=None, b=None, c=None)[source]
Return the anisotropy threshold for a given beta.
Implements Eq. (5) of []:
\[R_p = 1 + \frac{a}{(\beta_{\parallel,p} - c)^b}\]where $p$ is defined assuming only a single proton population is fit.
- Parameters:
- Returns:
Threshold anisotropy values.
- Return type:
Examples
>>> beta = np.logspace(-2, 2, 5) >>> beta_ani_inst(beta, a=0.367, b=-0.408, c=0.011) array([ nan, 1.1367783..., 1.36534751..., 1.93857946..., 3.40240693...])
- class StabilityCondition(growth_rate, beta, anisotropy)[source]
Bases:
objectEvaluate plasma stability using the Verscharen et al. fits.
- Parameters:
growth_rate (int) – Index of the growth-rate table to use (
-2,-3or-4).beta (pandas.Series) – Parallel proton beta.
anisotropy (pandas.Series) – Temperature anisotropy.
- instability_thresholds
Threshold anisotropies for each instability.
- Type:
- is_unstable
Boolean mask indicating unstable modes.
- Type:
- stability_bin
Integer label describing the dominant instability.
- Type:
- __init__(growth_rate, beta, anisotropy)[source]
Initialize the object.
- Parameters:
growth_rate (int) – Growth rate index (
-2,-3or-4).beta (pandas.Series) – Arrays of parallel beta and temperature anisotropy.
anisotropy (pandas.Series) – Arrays of parallel beta and temperature anisotropy.
- property fill
Used to build data containers and check all entries are visited.
- property instability_parameters
The Pandas DataFrame of instability parameters.
- property data
DataFrame with beta and anisotropy measurements.
- property beta
The beta values of the object.
- property anisotropy
The anisotropy values of the object.
- property stability_map
The map of ints to strings identifying the instabilities.
- property stability_map_inverse
The inverse of
stability_map.
- property instability_thresholds
The value of the anisotropy for which the plasma goes unstable.
- property instability_tests
The tests used for each instability threshold.
The keys are
"AIC","MM","FMW", and"OFI"for Alfven/Ion-Cyclotron, Mirror Mode, Fast Magnetosonic / Whistler, and Oblique Firehose. The values are NumPy ufuncs.
- property is_unstable
Boolean DataFrame indicating instability to a given instability.
- property stability_bin
The integer corresponding to the (in)stability condition.
- property cmap
A linearly segmented colormap for the (in)stability condition.
- property norm
The normalization instance used for plotting the stability bin.
- property cbar_kwargs
Keyword arguments for drawing a colorbar.
- set_instability_parameters(growth_rate)[source]
Take the instability parameters corresponding to
growth_rate.- Parameters:
growth_rate (int) – Growth-rate index (
-2,-3or-4).
- set_beta_ani(beta, anisotropy)[source]
Set the beta and anisotropy values.
- calculate_stability_criteria()[source]
Run the full instability calculation.
This method calls
_calc_instability_thresholds(),_calc_is_unstable(), and_calc_stability_bin()in that order. Use this method over calling the private methods individually.
- class StabilityContours(beta)[source]
Bases:
objectPrecompute and plot instability contours.
- Parameters:
beta (numpy.ndarray) – Parallel proton beta values used for the contours.
- __init__(beta)[source]
- property beta
Proton core parallel beta.
- set_beta(new)[source]
- property contours
- plot_contours(ax, fix_scale=True, plot_gamma=None, tk_kind=None, **kwargs)[source]
Add the instability contours to the plot.