Is pyroSAR a good substitute for python based SNAP toolbox solution?

hI @falahfakhri. I am not quite sure what you mean by implementing flowcharts. If you are referring to creating SNAP workflows you might want to check out pyroSAR’s SNAP API. With it you can create arbitrary SNAP workflows. the geocode function just is a complex example of how to use this API.
Your error message hints to missing dependencies, libspatialite in this case. This module is needed for creating SQLite databases with spatial functionality. If you are running Windows you best install anaconda/miniconda and install pyroSAR into a conda environment. All dependencies, including libspatialite, will be installed with it.

Thanks for your response,

First would you please to have a look again at my post the end of the post.

Second I meant something like,

“from pysar import ApplyOrbit”

“ApplyOrbit(scene)”

“Sigma0Cal(scene)”

Something like this, because I think you’re offering a tool to process radar data such as S-1 GRD, Therefore gives the users to work in flexible way according to their need, for instance, if I create an arbitrary workflows in SNAP, the gpt and bash are very convenient to me out of your module,

what is the new thing could get from your module?

I think I still prefer to work in python 3.6 for many other works, I think it’s stable and better than anaconda or miniconda in many aspects.

You get a NotADirectoryError because the files don’t exist. Use double backslashes for file and directory names:

from pyroSAR.snap.auxil import gpt
gpt(‘D:\\pyrosar_test\\spdivpy201524.xml’, ‘D:\\pyrosar_test’)

The idea of directly importing nodes and executing them is interesting. I’ll think about it. I work mostly on automated processing and there is no benefit for it, however I get that it would be quite convenient for data exploration and more interactive processing. For the time being I focus on the SNAP API, it is very flexible already. The “new thing” is that with it one can work in Python without snappy and with better performance. This surely will not be a benefit to all.

You are of course free to work with any Python distribution you like, installation of dependencies might be more difficult though.

I got same error, by the way in both cases one backslash and double I got the same error and also I got the results, that I could plot using rasterio as you see below,

image

Any solution,

I also used your example as below, because the last *.xml file of the previous post, I created in SNAP

It works, but the later step gives this error,

image

image

The first error might occur because you want to store data in a subdirectory “VV”, which doesn’t exist.
It’s just a guess though with the limited info I got.
Same for the second error. I need to see the full message to interpret this error.

Now we’re getting more into discussing issues than talking about the benefits of using pyroSAR.
I’d appreciate if you could open an issue on GitHub, there we can continue the discussion much better.

Dear Johntruckenbrodt,

Very nice good morning to you,

I created an issue in GitHub, I appreciate if you could have time to have a look.

great, thanks. I’ll have a look at it.

Hi Johntruckenbrodt,

I am trying to do the Interferometric coherence estimation by pyroSAR in jupyter hub. I used Sentinel-1 SLC pair data. I got error like this

. I think the error is from back-geocoding. I used this code for my process image. I already used the similar kind of workflow while doing it in Snappy, it worked properly. But I am just stuck with the error. I also referred this link. But it is for GRD data and not for SLC data. I tried the workflow with GRD data, it was working good. If there is any solution to this problem or any documentation, please let me know.

Greetings,
Karlmarx

Hi @Karlmarx . SNAP is trying to download OSV files from qc.sentinel1.eo.esa.int, which is offline since February/March. Are you using the latest version of SNAP? If not then this is apparently not properly fixed yet.
You can instead use the pyroSAR functionality for downloading orbit files described here.

Dear Johntruckenbrodt,

Thank you for your response. I use the latest version of the snap 8.0. So, Is the error from orbit file application? As mentioned earlier, the processing chain is working fine with GRD, but when I use SLC computing I get the error. So I have to download the orbit files and continue with the backgeoding, right?

Greetings,
Karlmarx

Hi @Karlmarx. technically speaking SNAP consists of multiple components. SNAP Engine is currently in version 8.0.8 and the Sentinel Toolbox (S1TBX) in version 8.0.5. You can check in the GUI.
Yes, the error comes from the orbit file application in Apply-Orbit-File. This is most likely not related to GRD vs. SLC. Perhaps you already have the orbit file for the acquisition time range of this GRD (most likely found in your home directory under .snap/auxdata/Orbits/Sentinel-1) but not for the SLC.
Cheers

2 Likes

Dear Johntruckenbrodt,

Thank you so much for your explanation. I got it. I will retry to download the OSV files (link) and do the processing again. Thank you.

Greetings,
Karlmarx

Dear John,

Based on your last suggestions, I have computed the Interferometric coherence and it’s working properly. Thank you for that. Currently, I have list of pair of images for estimating coherence in a time series, is it now possible to do the batch processing for coherence by using geocode function of pyroSAR?

Greetings,
Karlmarx.

Hi @Karlmarx. Great you got it to work! The geocode function is made for processing backscatter. I admit, its name is misleading and I have to change it. For coherence processing there is no such convenience function yet. There are some developments, but it might take some time until ready.
Cheers,
John

Dear Johntruckenbrodt,

Thank you for your kind response. I am expecting for it. Thank you

Greeting,
Karlmarx.

Dear John,
I have Just started with the PyroSAR. I want to know Is it Possible to do the Sentinel-1 Preprocessing without using the SNAP software. I want to do it on cloud based plateforms like google colab or AWS? Any suggestion for cloud based Sentinel-1 data preprocessing, i will be grateful to you!

Regards
Pyare Lal

Dear Pyare Lal,

pyroSAR only supports SNAP and GAMMA. There are other free software options available but SNAP is by far the most comprehensive. I don’t see why it can’t run on cloud platforms, you might just have to install it yourself. If you are looking for SAR processing without having to worry about software yourself you might find the ASF services useful: Custom Processing – ASF.

Regards,
John

1 Like

Dear John,

are you planning to include SAOCOM images processing in pyroSAR? SNAP did include them since version 8.0.

Thanks
Matias

Dear Matias,

currently I do not have any plans for SAOCOM. Unfortunately I don’t have the time. If you are interested, I would very much welcome a contribution :grinning:. The last two drivers were also added by the community:
EORC_PSR
BEAM_DIMAP

Cheers
John

1 Like

Hi

Does anyone know if there are any formats that you can both write and read with pyroSAR, i.e. to write out of one pyroSAR workflow and read that file into another pyroSAR workflow. From what I’ve read this doesn’t seem possible, but I couldn’t see from the information on the drivers which ones support reading and which ones support writing.

Thanks,
Sonia