forked from zietzm/Helmholtz_Test_Bench
fixed loading CSV trafo matrix
This commit is contained in:
+1
-1
@@ -531,7 +531,7 @@ class MagnetometerCalibrationComplete(Thread):
|
||||
matrix_trans_mgm_to_hh_np = np.zeros((3, 3))
|
||||
for row in range(3):
|
||||
for col in range(3):
|
||||
matrix_trans_mgm_to_hh_np[row][col] = matrix_trans_mgm_to_hh_tk[row][col].get()
|
||||
matrix_trans_mgm_to_hh_np[row][col] = matrix_trans_mgm_to_hh_tk[row][col]
|
||||
# matrix_trans_mgm_to_hh_np = [[-1, 0, 0], [0, 1, 0], [0, 0, -1]] # hardcoded for MGM 1 / 3
|
||||
# matrix_trans_mgm_to_hh_np = [[0, 1, 0], [-1, 0, 0], [0, 0, 1]] # hardcoded for MGM 0 / 2
|
||||
ui_print("Applying transformation matrix to data. h_{set,mgm} = mgm_T_hh * h_{set,hh}")
|
||||
|
||||
@@ -578,8 +578,8 @@ class CalibrateAmbientField(Frame):
|
||||
self.controller = controller
|
||||
|
||||
# To center window
|
||||
# self.columnconfigure(0, weight=1)
|
||||
self.rowconfigure(0, weight=1)
|
||||
#self.columnconfigure(0, weight=1)
|
||||
#self.rowconfigure(0, weight=1)
|
||||
self.left_column = Frame(self)
|
||||
self.left_column.grid(row=0, column=0, sticky="nsew")
|
||||
self.right_column = Frame(self)
|
||||
@@ -1824,9 +1824,12 @@ class CalibrateMagnetometerComplete(Frame):
|
||||
return
|
||||
self.calibration_raw_results = raw_data
|
||||
|
||||
# Note: Imported data must already have the MGM and set field aligned!
|
||||
ui_print('Imported data transformed with unity matrix. Make sure, MGM and set field of file are in same COS!')
|
||||
mgm_to_helmholtz_cos_trans = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
|
||||
# Execute calibration function and display results
|
||||
sensor_parameters, mag_x_set, mag_y_set, mag_z_set, mag_x_m, mag_y_m, mag_z_m, cal_x, cal_y, cal_z, mag_amp_avg_set = MagnetometerCalibrationComplete.solve_system(
|
||||
raw_data, self.mgm_to_helmholtz_cos_trans)
|
||||
raw_data, mgm_to_helmholtz_cos_trans)
|
||||
MagnetometerCalibrationComplete.plot_magnetometer_calibration(self.right_column, mag_x_set, mag_y_set, mag_z_set,
|
||||
mag_x_m,
|
||||
mag_y_m, mag_z_m, cal_x, cal_y,
|
||||
|
||||
Reference in New Issue
Block a user