예제 #1
0
times = data.index
print(length)
X = data['GEI_X'].to_numpy() / Re
Y = data['GEI_Y'].to_numpy() / Re
Z = data['GEI_Z'].to_numpy() / Re
position = np.stack((X,Y,Z),axis=1)
ticks = Ticktock(times)
coords = spc.Coords(position,'GEI','car')

#find B based on position
bField = irb.get_Bfield(ticks,coords,extMag='T89')
Field_GEO = bField['Bvec'] #b field comes out in xyz
#convert to GEIcar, because the direction cosines take GEI to body fixed
Field_GEO_coords = spc.Coords(Field_GEO,'GEO','car')
Field_GEO_coords.ticks = Ticktock(times)
Field_GEI = irb.coord_trans(Field_GEO_coords,'GEI','car')
Field_Mag = bField['Blocal']
#rotate b to body fixed
BX = Field_GEI[:,0]
BY = Field_GEI[:,1]
BZ = Field_GEI[:,2]

A11 = data['A11']
A12 = data['A12']
A13 = data['A13']
A21 = data['A21']
A22 = data['A22']
A23 = data['A23']
A31 = data['A31']
A32 = data['A32']
A33 = data['A33']
예제 #2
0
 def test_coord_trans(self):
     self.loci.ticks = self.ticks
     expected = array([[2.86714166, -0.02178308, 0.88262348],
                       [1.91462214, 0.06992421, 0.57387514]])
     numpy.testing.assert_almost_equal(
         expected, ib.coord_trans(self.loci, 'GSM', 'car'))
예제 #3
0
 def test_coord_trans(self):
     self.loci.ticks = self.ticks
     expected = array([[ 2.86714166, -0.02178308,  0.88262348],
         [ 1.91462214,  0.06992421,  0.57387514]])
     numpy.testing.assert_almost_equal(expected, ib.coord_trans(self.loci, 'GSM', 'car'))