image_output_1.png
import h5py

import numpy as np

event = h5py.File('../input/insar-dataset/insar_data_event.hdf5', 'r')

disp = np.zeros(shape=(16000, 40, 40))
sim = np.zeros(shape=(16000, 9, 40, 40, 1))
topo = np.zeros(shape=(16000, 1, 40, 40, 1))

for i in range(len(event.keys())):
    for j in range(100):
        disp[i * 100 + j] = np.array(event['event{}'.format(i)]['displacement'])
        sim[i * 100 + j] = np.array(event['event{}'.format(i)]['simulation'])
        topo[i * 100 + j] = np.array(event['event{}'.format(i)]['topography'])

img2 = np.expand_dims(sim[0][1], axis=2)
print(img2.shape)