Exemplo n.º 1
0
    def get_imported_data(self):
        # only works with imp_8 so far
        data_bv = imp.merged(self.probe[4], self.start_datetime, self.end_datetime)
        data_bv = data_bv.data  # data_b was previously a time series
        indices = [pd.Timestamp(index).to_pydatetime() for index in data_bv.index.values]
        combined_data = pd.DataFrame(index=indices)
        for index in indices:
            combined_data.loc[index, 'vp_x'] = data_bv.loc[index, 'vx_mom_gse']
            combined_data.loc[index, 'vp_y'] = data_bv.loc[index, 'vy_mom_gse']
            combined_data.loc[index, 'vp_z'] = data_bv.loc[index, 'vz_mom_gse']
            combined_data.loc[index, 'n_p'] = data_bv.loc[index, 'np_mom']
            # for now both temperatures are equal to keep it similar to other classes as no separate data was found
            combined_data.loc[index, 'Tp_par'] = data_bv.loc[index, 'Tp_mom']
            combined_data.loc[index, 'Tp_perp'] = data_bv.loc[index, 'Tp_mom']
            combined_data.loc[index, 'r_sun'] = 1 - np.sqrt(
                data_bv.loc[index, 'x_gse'] ** 2 + data_bv.loc[index, 'y_gse'] ** 2 + data_bv.loc[
                    index, 'z_gse'] ** 2) * 4.26354E-5  # earth radius to au, 1- because distance initially from earth
            combined_data.loc[index, 'Bx'] = data_bv.loc[index, 'Bx_gse']
            combined_data.loc[index, 'By'] = data_bv.loc[index, 'By_gse']
            combined_data.loc[index, 'Bz'] = data_bv.loc[index, 'Bz_gse']

        return combined_data
Exemplo n.º 2
0
 def test_merged(self):
     df = imp.merged(self.probe, self.starttime, self.endtime)
     check_data_output(df)
Exemplo n.º 3
0
 def test_mereged(self):
     df = imp.merged(self.probe, self.starttime, self.endtime)
     check_datetime_index(df)