Exemplo n.º 1
0
logger.info("elevation array:\n  type: %s\n  shape: %s\n  dtype: %s"
            % (type(full_elevation), full_elevation.shape, full_elevation.dtype))
ax = plt.contourf(full_elevation)
plt.colorbar(ax)
plt.show()
# - read the first 10 rows of the elevation layers
selection_slice = slice(0, 10)
sliced_elevation = bag_0.elevation(mask_nan=True, row_range=selection_slice)
logger.info("sliced elevation array:\n  type: %s\n  shape: %s\n  dtype: %s"
            % (type(sliced_elevation), sliced_elevation.shape, sliced_elevation.dtype))
ax = plt.contourf(sliced_elevation)
plt.colorbar(ax)
plt.show()

# - get uncertainty shape
logger.info("uncertainty shape: %s" % (bag_0.uncertainty_shape(), ))
# - read the full uncertainty
full_uncertainty = bag_0.uncertainty(mask_nan=True)
logger.info("uncertainty array:\n  type: %s\n  shape: %s\n  dtype: %s"
            % (type(full_uncertainty), full_uncertainty.shape, full_uncertainty.dtype))
ax = plt.contourf(full_uncertainty)
plt.colorbar(ax)
plt.show()
# - read the first 10 rows of the uncertainty layers
selection_slice = slice(10, 20)
sliced_uncertainty = bag_0.uncertainty(mask_nan=True, row_range=selection_slice)
logger.info("sliced uncertainty array:\n  type: %s\n  shape: %s\n  dtype: %s"
            % (type(sliced_uncertainty), sliced_uncertainty.shape, sliced_uncertainty.dtype))
ax = plt.contourf(sliced_uncertainty)
plt.colorbar(ax)
plt.show()