ngageoint / sarpy

A basic Python library to demonstrate reading, writing, display, and simple processing of complex SAR data using the NGA SICD standard.
MIT License
246 stars 85 forks source link

SentinelReader - Encountered an error estimating noise for RNIIRS #371

Closed jayepraveen999 closed 1 year ago

jayepraveen999 commented 1 year ago

@utwade @Darder Hi everyone!

I came across the package Sarpy since I want to retrieve the complex values of a particular pixel of Sentinel 1 SLC data using python. I have used SentinelReader (from sarpy.io.complex.sentinel import SentinelReader) to read the downloaded SLC data (.SAFE file) but I am facing a warning Encountered an error estimating noise for RNIIRS. Radiometric is not populated, so no noise estimate can be derived.

and then if I try to view the data using data = reader_sicd[:] I see zero values.

Sorry for asking you some basic questions but I couldn't figure out this error.

Screenshot 2023-02-12 at 10 43 08 PM

utwade commented 1 year ago

The first and last pixels in Sentinel SLC are usually zeroes (which are what are being displayed in the attached screenshot), since there are black bars on the top and bottom of the image. Have you tried looking in some of the middle pixels?

With regard to the radiometric parameters, the SAFE directory structure should have an "annotation" directory and then a "calibration" subdirectory under that. Within that, there should be calibration and noise files for each measurement GEOTIFF. Can you check to make sure that structure exist like that?

jayepraveen999 commented 1 year ago

The first and last pixels in Sentinel SLC are usually zeroes (which are what are being displayed in the attached screenshot), since there are black bars on the top and bottom of the image. Have you tried looking in some of the middle pixels?

With regard to the radiometric parameters, the SAFE directory structure should have an "annotation" directory and then a "calibration" subdirectory under that. Within that, there should be calibration and noise files for each measurement GEOTIFF. Can you check to make sure that structure exist like that?

I have checked the directory and it has an annotation directory and calibration subdirectory in it.

One thing i found is the library cannot open the zip file, rather one has to extract and provide the path of the extracted folder.

utwade commented 1 year ago

Yes, you definitely have to unzip.

If you are still having this issue, is there any chance you put the directory structure (with measurement directory deleted) back into a zip and then attach it to this issue conversation for us to review? We don't see the same issue with the radiometric parameters. Might be something we could tell at a glance if we could see your directory structure.

Darder commented 1 year ago

Closing