Пример #1
0
def test_wind():
    """
    Tests for imporitng wind data.

    Currently only try to download a single day's data for each product.
    """
    starttime = datetime(2010, 1, 1, 0, 0, 0)
    endtime = datetime(2010, 1, 1, 23, 59, 59)

    wind.mfi_h0(starttime, endtime)
    wind.threedp_pm(starttime, endtime)
    wind.swe_h3(starttime, endtime)
Пример #2
0
 def test_mfi_h0(self):
     df = wind.mfi_h0(self.starttime, self.endtime)
     check_data_output(df)
Пример #3
0
 def test_mfi_h0(self):
     df = wind.mfi_h0(self.starttime, self.endtime)
     check_datetime_index(df)
Пример #4
0
from datetime import datetime
import matplotlib.pyplot as plt

import heliopy.plot.fields as pltfields
import heliopy.data.wind as wind

starttime = datetime(2003, 5, 15, 0, 0, 0)
endtime = datetime(2003, 5, 16, 0, 0, 0)
mag = wind.mfi_h0(starttime, endtime)

pltfields.jointdists(mag[['Bx_gse', 'By_gse', 'Bz_gse']])
plt.show()
Пример #5
0
from datetime import datetime, timedelta
import heliopy.data.wind as wind
import matplotlib.pyplot as plt

starttime = datetime(2016, 1, 1, 0, 0, 0)
endtime = starttime + timedelta(hours=2)

data = wind.mfi_h0(starttime, endtime)

print(data.keys())
# Index(['Bx', 'By', 'Bz', 'Br', 'Time'], dtype='object')

plt.plot(data['Time'], data['Bx_gse'], label=r'$B_{x}$')
plt.plot(data['Time'], data['By_gse'], label=r'$B_{y}$')
plt.plot(data['Time'], data['Bz_gse'], label=r'$B_{z}$')
plt.legend()
plt.show()