I am stuck on what feels like should be simple task. I am following the documentation here:
and trying to follow the first contact step to get a numpy array from a S1 grd image.
p = ProductIO.readProduct(‘C:/Users/f72w381/Downloads/S1B_IW_GRDH_1SDV_20201012T012004_20201012T012029_023773_02D2C9_779C.SAFE/manifest.safe’)
rad13 = p.getBand(‘Intensity_VV’)
w = rad13.getRasterWidth()
h = rad13.getRasterHeight()
rad13_data = np.zeros(w * h, np.float32)
rad13.readPixels(0, 0, w, h, rad13_data)
rad13_data.shape = h, w
imgplot = plt.imshow(rad13_data)
This returns a numpy array still filled with zeros.
Things I have tried:
trying with the zipped and unzipped files.
exporting p as a GeoTiffs and BEAM-DIM fomats and trying with those formats.
Performing the extraction for just a single line of pixels
Checking the grd image in snap desktop to be sure it actually has values in it
Trying with the other bands
What am I missing?