Fixed function argument warnings

This commit is contained in:
2022-10-08 18:47:00 +02:00
parent 3fe39b0cf9
commit c5f8bb9414
2 changed files with 8 additions and 6 deletions
+6 -4
View File
@@ -500,7 +500,7 @@ class MagnetometerCalibrationComplete(Thread):
# Use collected data to build and solve system of equations
# sensor_parameters = self.solve_system(raw_data) # FLAG: untested!
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(
self.view_queue, raw_data, self.matrix_trans_mgm_to_hh)
raw_data, self.matrix_trans_mgm_to_hh)
# Pass results to UI
self.put_message('calibration_data', {'results': sensor_parameters, 'raw_data': raw_data})
@@ -509,7 +509,8 @@ class MagnetometerCalibrationComplete(Thread):
progress = int(offset_complete) * 0.2 + (test_vec_index / self.calibration_points) * 0.8
self.put_message('progress', progress)
def solve_system(self, raw_data, matrix_trans_mgm_to_hh_tk):
@staticmethod
def solve_system(raw_data, matrix_trans_mgm_to_hh_tk):
u_tesla = 10 ** 6
# Unpack data:
mag_x_set = np.zeros(len(raw_data))
@@ -751,13 +752,14 @@ class MagnetometerCalibrationComplete(Thread):
return q_mat, n, d
def plot_magnetometer_calibration(self, mag_x_set, mag_y_set, mag_z_set, mag_x_m, mag_y_m, mag_z_m, cal_x, cal_y,
@staticmethod
def plot_magnetometer_calibration(target_column, 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):
plot_fontsize = 5
ax_width = 0.2
# Plot frame (overwrite plotframe)
plot_frame = LabelFrame(self.right_column, text="Result plots:")
plot_frame = LabelFrame(target_column, text="Result plots:")
plot_frame.grid(row=1, column=0, padx=(100, 0), pady=20, sticky="nw")
# Plot calibrated results
+2 -2
View File
@@ -1803,8 +1803,8 @@ class CalibrateMagnetometerComplete(Frame):
# 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(
self.view_mpi_queue, raw_data, self.mgm_to_helmholtz_cos_trans)
MagnetometerCalibrationComplete.plot_magnetometer_calibration(self, mag_x_set, mag_y_set, mag_z_set,
raw_data, self.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,
cal_z, mag_amp_avg_set)