<jupyter_start><jupyter_text>List available data<jupyter_code>print(list(os.listdir("data")))
lidar_cloud = PyntCloud.from_file(os.path.join("data", "lidar_data03.pcd"))
lcpoints = lidar_cloud.points
print("len:", len(lidar_cloud.points))
print("max z:", np.max(lidar_cloud.points.z))
print("min z:", np.min(lidar_cloud.points.z))
print("max intensity =", np.max(lidar_cloud.points.intensity))
cm1 = plt.cm.get_cmap("cool_r")
cm2 = plt.cm.get_cmap("turbo")
px = 1/plt.rcParams['figure.dpi']  # pixel in inches
fig1 = plt.figure(figsize=(1000*px, 1000*px))
ax = fig1.add_subplot(111, projection='3d')
ax.scatter(lcpoints.x, lcpoints.y, lcpoints.z, c = lcpoints.z, s=2.0, cmap=cm1)
ax.set_xlabel('X-axis')
ax.set_ylabel('Y-axis')
ax.set_zlabel('Z-axis')
ax.set_xlim3d([-12, 12])
ax.set_ylim3d([-12, 12])
ax.view_init(azim=10)
ax.xaxis.pane.fill = False
ax.yaxis.pane.fill = False
ax.zaxis.pane.fill = False
plt.show()
fig2 = plt.figure(figsize=(1000*px, 1000*px))
lcpoints = lcpoints[lcpoints.x > -20].dropna()
lcpoints = lcpoints[lcpoints.x <  20].dropna()
lcpoints = lcpoints[lcpoints.y > -20].dropna()
lcpoints = lcpoints[lcpoints.y <  20].dropna()
plt.scatter(lcpoints.x, lcpoints.y, c = lcpoints.z, vmin=0.6, vmax=1.4, s=2.0, cmap=cm1)
plt.colorbar()
plt.axis('equal')
plt.xlim(-16, 16)
plt.ylim(-16, 16)
plt.grid()
plt.show()<jupyter_output><empty_output><jupyter_text>Remove 0,0,0 elements 
Out of range measurements (e.g. no reflectivity) are collected to `[0,0,0]`, here is an easy way to remove them<jupyter_code>filter_arr = (lcpoints.x > 0.00001) | (lcpoints.x < -0.00001) | (lcpoints.y > 0.00001) | (lcpoints.y < -0.00001)
lcpoints_no_zero = lcpoints[filter_arr]
print("Length of the original data is: %d and woithout the zeros only: %d" % (len(lcpoints), len(lcpoints_no_zero)))
fig3 = plt.figure(figsize=(1000*px, 1000*px))
plt.scatter(lcpoints_no_zero.x, lcpoints_no_zero.y, c = lcpoints_no_zero.z, vmin=0.6, vmax=1.4, s=2.0, cmap=cm1)
plt.colorbar()
plt.axis('equal')
plt.xlim(-16, 16)
plt.ylim(-16, 16)
plt.grid()
plt.show()<jupyter_output>Length of the original data is: 27549 and woithout the zeros only: 18034
{'fraction_non_alphanumeric': 0.1812730627306273, 'fraction_numerical': 0.05996309963099631, 'mean_word_length': 5.214899713467049, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '356903', 'license': 'MIT', 'n_tokens_mistral': 1028, 'n_tokens_neox': 970, 'n_words': 164, 'path': 'display_lidar_data.ipynb', 'repo_name': 'horverno/lidar-tinkering-ipython', 'size': '2168'}