Ejemplo n.º 1
0
def get_mag(probe, starttime, endtime):
    try:
        mag4hz = helios.mag_4hz(probe, starttime, endtime,
                                try_download=True).data

        # The 4Hz data is given in SSE, so flip to get in ~RTN
        mag4hz[['Bx', 'By', 'Bz']] *= -1
        # Helios 2 was "upside down" relative to Helios 1, so the spin plane
        # components do not need flipping
        if probe == '2':
            mag4hz['By'] *= -1
            mag4hz['Bz'] *= -1

    except Exception as err:
        if str(err) != 'No raw 4Hz mag data available':
            print(str(err))
        mag4hz = None

    # Also load 6s data as backup
    try:
        mag6s = helios.mag_ness(probe, starttime, endtime,
                                try_download=True).data
        # The 6s data is given in SSE, so flip to get in ~RTN
        mag6s[['Bx', 'By', 'Bz']] *= -1
    except Exception as err:
        if 'No 6s mag data avaialble' not in str(err):
            print(str(err))
        mag6s = None
    return mag4hz, mag6s
Ejemplo n.º 2
0
 def test_mag_4hz(self):
     df = helios.mag_4hz(self.probe, self.starttime, self.endtime)
     check_data_output(df)
Ejemplo n.º 3
0
 def test_mag_4hz(self):
     df = helios.mag_4hz(self.probe, self.starttime, self.endtime)
     df = helios.mag_4hz(self.probe, self.starttime, self.endtime)
     check_datetime_index(df)
Ejemplo n.º 4
0
 def test_mag_4hz(self):
     starttime = datetime(1976, 1, 16)
     endtime = datetime(1976, 1, 18)
     probe = '2'
     df = helios.mag_4hz(probe, starttime, endtime)
     check_data_output(df)