Closed abradley60 closed 2 months ago
Sorry @abradley60, but I need more context.
If I remember correctly s1etad_tools
was never part of the s1etad
package.
It is an experimental code in a sandbox.
@avalentino yes apologies, they are two separate things but I had been working with them together. I have isolated the issue and it was a problem with multiple conflicting Conda environments on my end. This issue is resolved and can be closed.
You mention s1etad_tools is experimental, I really like the ease of the s1etad_slc_correct_main
function to apply corrections directly to an slc. Do you plan on a firm release?
Thanks @abradley60 for the feedback.
The problem with s1etad_tools
is that the 2D interpolator for SLC data is largely suboptimal (very time consuming and memory hangry). This is why the code repository was never published, I only made available conda packages that were needed in the context of the S1-NRB project.
Another issue is related to the interpolation of the tropospheric layer that , currently, does not take into account of the vertical gradient and could introduce artifacts in hi-resolution interferograms.
If you think that it is useful I can talk to my colleagues and publish the repository. In this period I do not have time to improve it and to introduce at least the correct troposphere interpolation but I do not exclude that I could do it in the (not so far) future.
May I ask for what kind of application do you use it?
Thanks @avalentino . I was not aware of those existing issues so that is good information for me.
We are doing some software testing for creating radiometrically terrain corrected (RTC) backscatter products over Australia and Antarctica. We have an interest in creating products at a continental scale and wanted to understand the different software options we have. We have found that the ETAD (applied with the etad_tools package) increases the geometric accuracy of our scenes. We have tested using corner reflectors over both Australia and Antarctica. However, one thing we have noticed is that the ETAD correction appears so slightly worsen accuracy in the azimuth direction. Here is a preliminary
figure showing the geolocation accuracy of products created at a 10m resolution with four softwares we are considering. The figure considers 40 corner reflectors across 12 scenes.
We are not yet considering ETAD for interferometric products but that may come down the line. Do you have any concerns with our current approach to applying the corrections for RTC products?
Thanks for sharing. I'm very interested in your analysis, it could be relevant to one of the project I'm following. Maybe I can contact you via email if you agree.
Regarding your questions, I think that, for the assessment of geolocation, the current implementation should be fine, also considering that CR are on relatively flat areas.
I'm a little bit surprised by the results obtained with SNAP. According to [1] the out-of the box geolocation error for S1 SLC products is in the order of 2-4m, apparently SNAP is introducing a very large degradation.
Regarding results obtained with ISCE3+ETAD I see your point but I do not have an explanation at the moment. I should look more closely at the ISCE3 code.
As a general comment the out of the box accuracy of S1 SLC is better than 1m in azimuth and 0.5m in range [1], so the general comment is that the RTC processing and the reduced resolution seem to degrade the geolocation accuracy in a non negligible way.
This is even more evident when the ETAD product is applied, indeed, according to [1], the S1 SLC geolocation accuracy over the Surat calibration site should be in the order of 30cm in azimuth and 6cm in range.
@abradley60 I have just discussed shortly with my colleagues and we find this study case very interesting. Please feel free to contact us at "s1-etad at esa dot int"
@abradley60, @avalentino I just discovered this. Would you mind adding me to the further discussions? I'd be very interested.
Sure @johntruckenbrodt, it is always a pleasure to discuss with you :) Do you have any comment regarding the results obtained with SANP? Could it be another issue related to DEM management?
Great thanks for that @avalentino. I agree the results are curious and we are keen to dive deeper to understand what is happening. The Copernicus 30m DEM referenced over the WGS84 Ellipsoid is being used for all products. S1ard handles the DEM sourcing itself which could explain the small differences between pyroSAR-SNAP and S1ard-SNAP. Where the larger SNAP offset and increased variance across corner reflectors comes from we are unsure and are keen to investigate further.
Excellent @johntruckenbrodt! It would be great to have you involved. We were planning to discuss our consolidated results with you so perhaps now is a great time to start the conversation. This is a part of a broader study to compare the software options so you may be interested in some of our other findings too. We are happy to share files and code.
I will send an email to "s1-etad at esa dot int" and cc you in John along with some other members of my team.
Thank you both for your interest.
Sounds great! Yes indeed, the DEM handling likely plays a major role. pyroSAR does offer functionality to prepare the DEM and use it in SNAP. This is also used inside s1ard. The major reasons are full control over the output grid and the possibility to seamlessly extrapolate the DEM tiles over ocean (where no DEM tiles exist). So it sure would be interesting to compare results between the SNAP auto-downloaded Copernicus DEM, the pyroSAR-prepared Copernicus DEM, and the SNAP auto-downloaded SRTM DEM w.r.t. ALE.
Furthermore, I think the output CRS plays a role as well. s1ard outputs data in UTM. The DEM itself however needs to be prepared in WGS84 because otherwise the RTC result is inferior. It would be worth checking differences between WGS84 and UTM as geocoding output.
Some further reading: https://forum.step.esa.int/t/pixel-misalignment-after-processing-series-of-sentinel-1-grd-images/32674 https://forum.step.esa.int/t/terrain-flattening-results-in-garbage-when-using-copernicus-30m-auto-download/33777 https://forum.step.esa.int/t/pixel-alignment-dem-resampling-during-terrain-correction/33854 https://forum.step.esa.int/t/terrain-flattening-and-sar-simulation-incorrect-for-sentinel-1-images/35927 https://forum.step.esa.int/t/inferior-terrain-flattening-results-when-using-external-dem/37221
Thank you for putting together that comparison plot - very helpful. This showed up in my feed and I have a couple of related observations / questions:
Thanks again.
Thanks for your observations and feedback @piyushrpt.
I did quite limited tests on the tool long time ago. Of course the easiest way to check is to measure the location of any PT in the SLCs before and after the ETAD correction. I can try to recover the results in my records but probably it is easy for you to do this kind of test.
Great to have you jump in as well @piyushrpt. So this is what is done in s1ard:
from s1etad_tools.cli.slc_correct import s1etad_slc_correct_main
s1etad_slc_correct_main(s1_product='<SLC path>',
etad_product=<ETAD product>,
outdir='.',
nthreads=2,
order=0)
The default order=1
introduced a bias of about -0.5 dB. Antonio and I had some mail exchange on this some while ago. Here some demo plot for a test site over the Alps:
I can confirm I am applying the corrections in the same way as @johntruckenbrodt. Here is the ETAD file and where it is used for our pyroSAR implementation.
s1etad_slc_correct_main(s1_product=slc_path,
etad_product=etad,
outdir=slc_corrected_dir,
nthreads=nthreads,
order=0) # using the default 1 introduces a bias of about -0.5 dB.
Here are the links to all of our workflows for the project if you are interested. I'll also release the comparison code where we do the analysis/comparison of the products and make the figures I have sent through (I'm just in the process of tidying it up). Our workflows are basically wrappers around the existing projects that handle acquiring files and uploading our results in AWS. Thanks to the amazing work of folks like @johntruckenbrodt we have all this at out fingertips! The hype-GAMMA products we just order from the ASF.
I'm not very familiar with the s1etad_tools
code base but couple of quick observations after looking at it briefly:
scipy map_coordinates
is used for interpolation and the prefilter
kwarg might need to be set/unset along with order
for desired performance - if radiometric calibration is of interest. I would still expect this call to blur the imagery - understandable since this was a sandbox tool.
order=0
probably just means nearest neighbor interpolation and probably should not be used for geolocation evaluation. For evaluating geolocation, might be worth using higher order at the expense of radiometric accuracy.
If the sign flip is the source of error - i, e. replace +=
by -=
to test. The line to change is
lines_grid += delta_t / (dt / klines)
in slc_correct.py
Thank you for sharing your interesting analysis. I understand that this issue is closed and the topic has diverged from the original question. But I thought I could provide a bit more clarification with regard to ISCE3 that may be of interest to the team here:
1- In the ISCE3 based workflow we developed for OPERA project to process Sentinel-1 SLCs to RTC we did not use ETAD products directly. Instead we implemented ETAD algorithm and for RTC we only applied hydrostatic tropospheric delay and bistatic delay which are the major contributors. Other ETAD components such as Doppler induced range shift or wet tropospheric delay or even ionospheric delay leading to cm level geolocation accuracy do not matter for 30 m or even 10 m RTC products and therefore we ignored them for RTC. However, I doubt if that is a source of the discrepancy between ISCE3 and other software. But I thought that clarification is needed. I wonder if you guys produce the ISCE3 RTC in the same way or you have changed the workflow to use the ETAD products.
2- The RTC products are not ideal products for evaluating the geolocation. The reason is that for geolocation error analysis we need to find the peak of the CR precisely and for that we need to oversample the complex SAR signal. While oversampling can be done easily for band limited SAR complex signal, it can not be done precisely for low resolution multilooked SAR backscatter products such as RTC. Basically I'm trying to say that your peak estimation has a larger error bar when you estimate it from RTC images compared to estimating it from complex SLCs. That is why most of our validation of ETAD corrections were done with Geocoded SLCs and not with RTC. Despite RTC, our geocoded SLC products are produced with additional corrections such as ionospheric delay and Doppler induced range shift. The following plot shows the results of geolocation analysis over our Rosmaond CRs from 2014 to 2023. Each point is the average geolocation error in east and north direction for all CRs in a given date and the bars show the standard deviation for that date. It is worth noting that most of the improvement comes from hydrostatic tropospheric delay in range and bistatic delay in azimuth directions. Ionosphere can contribute 10s of cm.
Our results seem to show consistent improvement in both range and azimuth directions after ETAD corrections.
NOTE: in this plot the X and Y axis are indeed east and north directions as the SLCs are geocoded.
Hi @hfattahi thank you for joining the discussion, it's great to have your input here as well - your feedback is very valuable to us. Similar to John, we were planned on circulating our findings to yourself and Gustavo at JPL.
Yes I can confirm we had changed the workflow to enable the ETAD corrections. We are aware of the native OPERA-RTC atmospheric correction options for apply_bistatic_delay_correction
and apply_static_tropospheric_delay_correction
that you have mentioned. We had run three versions of the workflow in our tests; with these set to False
and no ETAD correction, with these set to False
and applying ETAD correction, and with these set to True
and no ETAD correction. These represent the OPERA-ISCE3
, OPERA-ISCE3 (with ETAD)
and OPERA-ISCE3 (native atmospheric)
scenarios in the figure below respectively. Our other testing has shown the importance of enabling these corrections on the RTC quality.
Yes this is true and we expect the estimation from oversampling pixels at 10m would introduce some of the additional variability and error when assessing geolocation with the RTC products. I have attached an example of this below for a CR in the Surat Basin. This is a very important call out that we will be sure to include with our analysis. Your teams analysis is far more robust for evaluating the corrections. For our purposes, we are not trying to assess the ‘true’ geolocation accuracy, but only as it applies to the RTC product, as that is what we will be delivering for people to use.
@abradley60 do you mind if I convert this issue into a discussion and change the title?
@avalentino yes please go ahead
Hi there, thanks for making this code publicly available. We are applying ETAD corrections directly to slc files as a part of our sentinel-1 workflow, and on a recent environment build I been encountering issues with installing s1etad that I have not previously faced. It appears that
s1etad_tools
is not longer installing.Here are the imports that are now breaking but were previously working (s1etad_tools is not found).
conda env create --file environment.yml
My conda environment file if you wish to replicate: