Note
Click here to download the full example code
A short example showing how to import and plot plasma data.
Out:
Creating new directory /home/docs/heliopy/data/helios/E1_experiment/New_proton_corefit_data_2017/ascii/helios2/1976
Downloading http://helios-data.ssl.berkeley.edu/data/E1_experiment/New_proton_corefit_data_2017/ascii/helios2/1976/h2_1976_096_corefit.csv
0.0% 0 / 169047
4.8% 8192 / 169047
9.7% 16384 / 169047
14.5% 24576 / 169047
19.4% 32768 / 169047
24.2% 40960 / 169047
29.1% 49152 / 169047
33.9% 57344 / 169047
38.8% 65536 / 169047
43.6% 73728 / 169047
48.5% 81920 / 169047
53.3% 90112 / 169047
58.2% 98304 / 169047
63.0% 106496 / 169047
67.8% 114688 / 169047
72.7% 122880 / 169047
77.5% 131072 / 169047
82.4% 139264 / 169047
87.2% 147456 / 169047
92.1% 155648 / 169047
96.9% 163840 / 169047
100.0% 172032 / 169047
Index(['B instrument', 'Bx', 'By', 'Bz', 'sigma B', 'Ion instrument', 'Status',
'Tp_par', 'Tp_perp', 'carrot', 'r_sun', 'clat', 'clong',
'earth_he_angle', 'n_p', 'vp_x', 'vp_y', 'vp_z', 'vth_p_par',
'vth_p_perp'],
dtype='object')
No handles with labels found to put in legend.
No handles with labels found to put in legend.
No handles with labels found to put in legend.
from datetime import datetime, timedelta
import heliopy.data.helios as helios
import matplotlib.pyplot as plt
starttime = datetime(1976, 4, 5, 0, 0, 0)
endtime = starttime + timedelta(hours=12)
probe = '2'
corefit = helios.corefit(probe, starttime, endtime)
print(corefit.data.keys())
fig, axs = plt.subplots(3, 1, sharex=True)
axs[0].plot(corefit.data['n_p'])
axs[1].plot(corefit.data['vp_x'])
axs[1].plot(corefit.data['vp_y'])
axs[1].plot(corefit.data['vp_z'])
axs[2].plot(corefit.data['Tp_perp'])
axs[2].plot(corefit.data['Tp_par'])
for ax in axs:
ax.legend()
plt.show()
Total running time of the script: ( 0 minutes 1.023 seconds)