import numpy as np from gaussian import Convert_v2, Inverse_v2 def get_T(): h = 19.34 rot = [[-0.330806583166, -0.941249847412, 0.067936882377], [0.943696200848, -0.329787790775, 0.026026830077], [-0.002092991956, 0.072721630335 ,0.997349977493]] rot = np.array(rot) BL = [31.2840452,121.1597165] XY = Convert_v2(BL) # print(XY) Trans = np.zeros([4,4]) Trans[:3,:3] = rot Trans[0,3] = XY[0] Trans[1,3] = XY[1] Trans[2,3] = h Trans[3,3] = 1 return Trans print(get_T())