Exemplo n.º 1
0
plt.pcolor(x_points, y_points, probe_result)
plt.colorbar()
plt.title("Z probing results [mm]")
plt.axis('equal') # 1:1 aspect ratio
pltShowNonBlocking()

# Interpolation
Z_workbed_surface = interpolate.RectBivariateSpline(y_points, x_points, probe_result)

x_points = np.linspace(min(x_points),max(x_points),100) 
y_points = np.linspace(min(y_points),max(y_points),100) 

z_points = Z_workbed_surface(y_points,x_points)
print z_points

plt.figure()
plt.pcolor(x_points, y_points, z_points)
plt.colorbar()
plt.title("Z probing results (interpolated) [mm]")
plt.axis('equal') # 1:1 aspect ratio
pltShowNonBlocking()

# TODO:
# - Export results to a file with a standarized format
# - 

cy.close() # Close the serial port connection

raw_input("Press enter to exit...")