Hi
I’m reading OLCI L3 water products (S3A_OL_2_WRR* and S3A_OL_2_WFR*) with snappy.
All the bands’ data are stored as integers with a scaling factor and an offset.
The call
readvar.readPixels(0,0,w,h,band)
reads the data as floats, thus applying the scaling factor and offset (as shown by readvar.getScalingFactor() and readvar.getScalingOffset() )
Is there a way to access the raw integers, instead of the floats?
I’m trying to do something like this:
read_band=p.getBand(band_name)
band_type=snappy.ProductData.getTypeString(read_band.getDataType())
band_nptype=np.dtype(band_type) # band_ntype is e. g. dtype(‘uint16’)
# for band_name ‘Oa01_reflectance’
band=np.zeros(w*h, band_nptype)
read_band.readPixels(0,0,w,h,band)
but it fails with a
RuntimeError: no matching Java method overloads found
readPixels returns ScalingFactor*value + ScalingOffset
Is there an alternative to readPixels to access the raw data?
Thanks
Mario