How to decode Sentinel-A L0 raw data? how to accomplish range compression correctly?

I am using the following product:

S1A_S3_RAW__0SDH_20220710T213600_20220710T213625_044043_0541DB_56CE

This is the same dataset used as an example in [Rich-Hall’s Sentinel-1 Level 0 Decoding Demo]https://github.com/Rich-Hall/sentinel1Level0DecodingDemo.

I have implemented a method to select the ISPs of the same burst, similar to how it is done in Rich-Hall’s library. I am extracting ISPs from 408 to 19,658 to reproduce the example image. However, when accessing the IQ data from both decoders, I noticed differences in standard deviation, mean, min, and max values. Even after adjusting the scale to match the output, I obtain a similar image but with lower contrast.

I investigated the sample value reconstruction process in both decoders. As expected, both decode this ISP interval in FDBAQ mode, but the reconstructed values obtained from the LUTs differ between the two implementations.

In Rich-Hall’s approach, the decoding process follows this path (as seen in its example):

10file.get_burst_data() -> decode_packets() -> data_decoder.decode() -> FDBAQDecoder() -> reconstruct_channel_vals()

My main question is whether s1isp correctly implements the sample reconstruction law for each bitrate of the FDBAQ mode, as detailed in Section 4.4 of the SAR Space Packet Protocol Data Unit. If so, is this implemented in get_fdbaq_lut()?

Another suspicious observation is the value of THIDX. For the same ISP (e.g., ISP 408), s1isp always assigns a value of 2 for all BAQ blocks, whereas in the other library, it varies. Since this parameter determines whether simple or normal reconstruction is applied, it seems that s1isp is always decoding using simple reconstruction.

I am new to SAR (Junior Engineer BTW) and I want to use this to test RFI mitigation techniques so I need to understand how samples values of IQ data are reconstructed. I have also started a discussion in GitHub, answer where you prefer.

Thanks in advanced!

1 Like

@jmfriedt I am curious how you determine which packets don’t contain SAR instrument returns and then pick a few of the packets which do to reconstruct an image (eg: choosing burst 8 to reconstruct the São Paulo image). Thanks!

I am sorry but I am not sure I understand the question. Since this investigation was completed quite a few years ago, my memory is not completely clear about the parameters I used anymore, but maybe if you can clarify the question I can remember.

@jmfriedt Thanks for your response! I am referencing the Python-inspired software of your C software. demo If you look at section 3.1, you will see how it says “We want to exclude all packets that don’t contain SAR instrument returns, and then pick a small set of these to operate on.” I was wondering if you would know how I can determine which packets would be relevant and how the burst number 8 was chosen? I tried to replicate this to another dataset and it gave me a ton of errors. I appreciate your response, thanks!

The relevant packets are selected according to their Process Identifier (PID) which refers to which instrument the information is referring to, so that you can make sure to only keep packets with SAR information and not telemetry or other maintenance information (see the signal type field where 0 indicates echo, cf https://sentiwiki.copernicus.eu/__attachments/1673968/S1PD.SP.00110.ATSR%20-%20Sentinel-1%20Level-0%20Product%20Format%20Specifications%202023%20-%203.1.pdf on page 25 of the PDF). Once the instrument is selected, the Swath will indicate which fraction of the image is being analyzed: in my C software, each swath number is accumulated in a given binary file for further processing with range and azimuth compression, but this is not relevant for StripMap mode I believe. Finally, the burst tells you which fraction of the dataset along the path is being analyzed. In the considered dataset, burst 8 must be at the shore of the harbor where the ships are stationed in the ocean, making for point-like targets best suited to assess azimuth and range compression. If you download S1A_S3_SLC__1SDH_20230518T213602_20230518T213627_048593_05D835_8BAA.SAFE (7 GB !) from the browser.dataspace.copernicus.eu/ and open in SNAP, using RADAR → S1 TOPS → S1 TOPS Split you can have an overview of the Swath and Burst incides against a background image. Unfortunately either this option is not available on SM datasets or my laptop is running out of memory, but I cannot demonstrate with SNAP9 I have installed. This is all from older memories so I might be wrong.