From 2d090608a582c4a9dc9cc2da25e4ff31eea3d81f Mon Sep 17 00:00:00 2001
From: Nattapon Jaroenchai <b_nj18@live.com>
Date: Wed, 25 Oct 2023 16:10:46 -0500
Subject: [PATCH] Update test_h5image.py

---
 test_h5image.py | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/test_h5image.py b/test_h5image.py
index f5129a3..040fea9 100644
--- a/test_h5image.py
+++ b/test_h5image.py
@@ -1,14 +1,13 @@
 from data_util import DataLoader
 from h5Image import H5Image
+import random
+
 
 # Load the HDF5 file using the H5Image class
 h5_image = H5Image('/projects/bbym/shared/data/commonPatchData/256/AZ_Tucson.hdf5', mode='r')
 
-# Get the size of the map
-map_width, map_height = h5_image.get_map_size('map')
-
-print(map_width, map_height)
-
-# # Calculate the number of patches based on the patch size and border
-# num_rows = math.ceil(map_width / h5_image.patch_size)
-# num_cols = math.ceil(map_height / h5_image.patch_size)
\ No newline at end of file
+maps = h5_image.get_maps()
+print(len(maps))
+map = random.choice(maps)
+layers = h5_image.get_layers(map)
+print(map, len(layers))
-- 
GitLab