Commit edfb5dbe authored by Cedrick Copol's avatar Cedrick Copol

style: suppression de doublon

parent 42fe39d8
......@@ -173,43 +173,6 @@ def slices(height=3):
#data_tmp[ (elevation<sl*slice_height) | (elevation>(sl+1)*slice_height) ] = 0
make_image(data_tmp, f"Soufriere_{sl:03d}.png", size=data_tmp.shape[::-1])
def laser(height=3):
# https://matplotlib.org/examples/pylab_examples/contour_image.html
extent = (min(X), max(X), min(Y), max(Y))
thickness = 3 # mm
widthIRL = 400 # mm
scale = xsize/widthIRL
slice_height = thickness * scale
nb_slices = int(elevation.max() // slice_height)
levels = np.arange(nb_slices)*slice_height
norm = cm.colors.Normalize(vmax=abs(elevation).max(), vmin=-abs(elevation).max())
cmap = cm.PRGn
size=elevation.shape[::-1]
fig = plt.figure()
dpi = fig.get_dpi()
fig.set_size_inches(size[0]/float(dpi), size[1]/float(dpi))
#ax.imshow(elevation, cmap="gray", extent=extent)
#ax.imshow(elevation, cmap=cmap, norm=norm, extent=extent)
print("nb couches", nb_slices)
for level in range(nb_slices):
plt.clf()
# Remove axis and fill the space
ax = plt.Axes(fig, [0., 0., 1., 1.])
ax.set_axis_off()
fig.add_axes(ax)
levels = [level*slice_height]
plt.contour(elevation, levels, colors='k', origin='upper', extent=extent)
plt.plot(X[430], Y[707], 'ro')
plt.plot(X[419], Y[466], 'ro')
plt.savefig(f"contour_{level:03d}.png", dpi=dpi)
if __name__ == "__main__":
for w in [400]:
asc2fmt("lidar_souf_5m_ll.asc", f"Soufriere_{w}", fmt="png", cellsize=5, widthIRL=w)
......
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