Commit a4a41563 authored by rmapaah's avatar rmapaah

Issue #13: lint syntax corrected

variables name fixed to comply pep 8.
unwanted semicollins removed
length of long line reduced to 120 characters.
Trailing line removed.
parent e3c78e62
......@@ -70,26 +70,24 @@ def pivot_calibration(matrices4x4):
# Residual Matrix
x_values = np.transpose(x_values)
residualMatrix = (a_values * x_values - b_values)
residualError = 0.0;
residual_matrix = (a_values * x_values - b_values)
residual_error = 0.0
for i in range(number_of_matrices * 3):
residualError = residualError + residualMatrix[i, 0] * residualMatrix[i, 0]
residual_error = residual_error + residual_matrix[i, 0] * residual_matrix[i, 0]
residualError = residualError / float(number_of_matrices * 3)
residualError = np.sqrt(residualError)
residual_error = residual_error / float(number_of_matrices * 3)
residual_error = np.sqrt(residual_error)
# Output
# MakeIdentity(outputMatrix);
# MakeIdentity matrix
outputMatrix = np.identity(4)
output_matrix = np.identity(4)
x_values = np.transpose(x_values)
outputMatrix[0, 3] = x_values[0, 0]
outputMatrix[1, 3] = x_values[1, 0]
outputMatrix[2, 3] = x_values[2, 0]
print("DoPivotCalibration:Pivot = (", x_values[3, 0], ", ", x_values[4, 0], ", ",
x_values[5, 0], "), residual= ", residualError)
return residualError
output_matrix[0, 3] = x_values[0, 0]
output_matrix[1, 3] = x_values[1, 0]
output_matrix[2, 3] = x_values[2, 0]
print("pivotCalibration=(", x_values[3, 0], ",", x_values[4, 0], ",", x_values[5, 0], "),residual=", residual_error)
return residual_error
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment