Re: What do I need to do to visualize Sentinel-1 data with rasterio?

Sean Gillies

Thanks, Sebastian! cannot deal with complex arrays. It looks like a library called mpmath can, might be worth looking in

On Wed, May 26, 2021 at 1:46 PM Yann-Sebastien Tremblay-Johnston <yanns.tremblay@...> wrote:
Looks like your data is Single Look Complex (SLC), you'll need to convert it to float. You can do this yourself with numpy, or with GDAL (which rasterio uses under the hood) will compute the intensity for you. 


src ='DERIVED_SUBDATASET:INTENSITY:../x.SAFE/measurement/y-001.tif')


On Wed, May 26, 2021 at 12:38 PM <earthdata@...> wrote:
I'm a first time user. I downloaded a Sentinel-1 granule. I'm now trying to visualize it via the following script:
import rasterio
from rasterio.plot import show
path = '.../x.SAFE/measurement/y-001.tiff'
src =
However this gives me the following error:
TypeError: Image data of dtype complex128 cannot be converted to float
What else do I need to do?


Sean Gillies

Join to automatically receive all group messages.