def test_center_brst_moments_data(self):
     data = mms_load_hpca(trange=['2015-10-16/13:06', '2015-10-16/13:07'], data_rate='brst')
     centered = mms_load_hpca(trange=['2015-10-16/13:06', '2015-10-16/13:07'], data_rate='brst', center_measurement=True, suffix='_centered')
     
     t, d = get_data('mms1_hpca_hplus_ion_bulk_velocity')
     c, d = get_data('mms1_hpca_hplus_ion_bulk_velocity_centered')
     self.assertTrue(np.round(c[0]-t[0], decimals=3) == 5.0)
 def test_load_ion_omni(self):
     del_data('*')
     data = mms_load_hpca(trange=['2016-10-16/5:00', '2016-10-16/6:00'], datatype='ion')
     mms_hpca_calc_anodes(fov=[0, 360], probe='1')
     mms_hpca_spin_sum()
     self.assertTrue(data_exists('mms1_hpca_hplus_flux_elev_0-360_spin'))
     self.assertTrue(data_exists('mms1_hpca_heplus_flux_elev_0-360_spin'))
     self.assertTrue(data_exists('mms1_hpca_heplusplus_flux_elev_0-360_spin'))
     self.assertTrue(data_exists('mms1_hpca_oplus_flux_elev_0-360_spin'))
Beispiel #3
0
 def test_load_ion_omni_suffix(self):
     del_data('*')
     data = mms_load_hpca(
         probe=2,
         trange=['2016-08-09/09:10', '2016-08-09/10:10:00'],
         datatype='ion',
         data_rate='brst',
         suffix='_brst')
     mms_hpca_calc_anodes(fov=[0, 360], probe=2, suffix='_brst')
     mms_hpca_spin_sum(probe=2, suffix='_brst', avg=True)
     self.assertTrue(
         data_exists('mms2_hpca_hplus_flux_brst_elev_0-360_spin'))
Beispiel #4
0
print(time_double('2015-10-16 13:06:00.00451'))

# create new tplot variables with store_data
from pytplot import store_data

# save the B-field vector
store_data('b_vector', data={'x': times, 'y': fgm_data[:, 0:3]})
# save the B-field magnitude
store_data('b_mag', data={'x': times, 'y': fgm_data[:, 3]})

# the keywords are very flexible, e.g.,
from pyspedas.mms import mms_load_hpca, mms_load_eis, mms_load_feeps, mms_load_aspoc

# specify multiple probes as integers, and multiple datatypes
mms_load_hpca(probe=[1, 2, 4],
              data_rate='brst',
              datatype=['moments', 'ion'],
              trange=['2015-10-16/13:06', '2015-10-16/13:07'])

mms_load_eis(probe='4',
             data_rate='brst',
             datatype=['phxtof', 'extof'],
             trange=['2015-10-16/13:06', '2015-10-16/13:07'])
mms_load_feeps(get_support_data=True,
               probe=2,
               data_rate=['srvy', 'brst'],
               trange=['2015-10-16/13:06', '2015-10-16/13:07'])
mms_load_aspoc()
''' ==========================================================================

Plotting MMS Data in Python
Beispiel #5
0
 def test_load_spdf_data(self):
     data = mms_load_hpca(trange=['2015-10-16', '2015-10-16/01:00'],
                          spdf=True)
     self.assertTrue(data_exists('mms1_hpca_hplus_number_density'))