Snap2stamps package: a free tool to automate the SNAP-StaMPS Workflow

Thank you for providing these wrappers! Should make the preparation a lot easier.

I currently receive an error message at the spliting_slaves.py

Error: [NodeId: TOPSAR-Split] [latGrid] is null

I double-checked the AOI BBOX DEFINITION parameters, they seem alright and match the given IW.

LONMIN=91.34
LATMIN=22.32
LONMAX=91.46
LATMAX=22.43

Any idea what could go wrong here?

Hi ABraun,

Please note that the AOI BBOX definition it only used during the coregistration-interferogram computation on those scripts.

For the splitting, the IW is the parameter to consider during the splitting step. Was it defined in the project.conf file?

In addition,could you post the final xml which the scripts run? It might be called something like splitgraph2run.xml that should be found in the PROJECT/graphs/ folder.

With that info it should be easier to identify the issue.

Please let me know it this helped.

2 Likes

Thank you very much. You were right. Instead of

IW1=IW3

I had

IW1=3

Now it proceeds as expected.

Thanks @ABraun!
I am glad it works now.
Let me know if you find something that should be fixed!

Any feedback is welcome so we can include more functionality in the near future.
Cheers

Thank you!
How exactly do I enter the MASTER= information and does it have to be included in the slaves folder?

Hi @ABraun,

in the project.conf, the paramter MASTER must contain full path to the splitted and orbit corrected (preferibly with precise orbit information) master image in dim format, and it is suggested to put it in a separate folder (otherwise in the coreg-ifg step it will try to process it),

It could be for example:
MASTER=/home/pi/Desktop/PROJECT/master/S1A_IW_SLC__1SDV_20150405T175350_20150405T175417_005352_006C9E_0FE9_Orb.dim

The processing of TOPSAR-Split (with the minimum bursts of a single subwath covering your AOI) and ApplyOrbit should be done by now using SNAP GUI (so you can identify your AOI visually)

Indeed a sample of a full test could be included in the SNAP2StaMPS_User_Manual to put everything clearer.

I hope this helps.

2 Likes

thank you very much.

Two more suggestions:

To make it clearer it would be nice to number the scripts, e.g. like this
grafik

Another handy thing would be an overwrite-flag in the project.conf.
I just added one more scene to the original data and the scripts keep going through all of the data again.

1 Like

Thanks @ABraun,
I have taken note of the suggestions.
For the moment you can just move the slaves which were processed already in the past, but for sure I will include a check for future release.

I hope that the scripts are handy and it helps doing the processing of inteferogram stacks easier!
Cheers

that is fine.

One very minor thing: I found that the print command in the coregistration script says “prep baseline” instead of (?) “perp baseline”.

Hi @ABraun,

Where is that? Do you think it could be the SNAP logging?

I have not found any line on my python script with the printing of the perpendicular baseline information as it is calculated within SNAP directly. If you have found it, could you please refer to which line?

Can you confirm that? Thanks!

oh, you are right, that is printed by SNAP itself, sorry.

Thanks again for checking the scripts and reporting about their functionalities!!
All comments to improve the scripts are welcome!

The most important is that the snap2stamps package is useful for the community as it is its only reason of existence.

Please let me know when you will manage to run them all (and if they work or not properly on your system) and which is your impression about them, so we keep improving them.

Cheers,

1 Like

I’ve fixed this typo. Found it two times in the CreateStack operator

3 Likes

I just completed all scripts and they work like charm. No problems with mt_prep_gamma_snap (provided by katherine) and all of the data was included. Makes it a lot easier to prepare Sentinel-1 data.

I just have one question. In case 1) I add a new scene in the slaves folder or b) I don’t want all processed data to be exported - what should I do best?

2 Likes

Hi @ABraun,

Glad to see that snap2stamps works fine for you as well!
Regarding the mt_prep_gamma_snap run you made, could you tell me which values were reported as amplitude average per scene? if it was written in the script an s instead of f for the format type, the script will return values over 0.xxxxx instead of being a lot higher, and then you may get errors later inside StaMPS processing.

Regarding your question, in both cases you should let on the search folder only the data that you want to process or export.

  1. the splitting starts with reading data within the slaves folder, but later steps read all the other folders
  2. the stamps export reads the folders ifg and coreg

The current best option is to moved the already processed data. But with this indeed grows the need of the overwrite option (true or false) for the processing. I will take care of it.

Thanks for the comments.

Regarding the mt_prep_gamma_snap run you made, could you tell me which values were reported as amplitude average per scene? if it was written in the script an s instead of f
for the format type, the script will return values over 0.xxxxx instead
of being a lot higher, and then you may get errors later inside StaMPS
processing.

Thank you for pointing it out. I noticed it in the other topic but overlooked it.
With mt_prep_gamma_snap i get mean amplitudes of 30-50 while with mt_prep_gamma I get values between 24000 and 26000. I am currently testing the difference for the later steps.

In such case it should be ok. The values you got are in the expected range for C-band (and obviously it changes from site to site).
Hence, I expect you will manage to get through the entire StaMPS processing.
Good luck!

I now compared it:

  • mt_prep_gamma_snap: mean amplitudes of 30-50, but only 22 PS remaining (something seems wrong)
  • mt_prep_gamma: mean amplitudes between 24000 and 26000 with ~17.000 PS remaining, but the geocoding got lost (no lat/lon values displayed when checking with getparm)

Had you tried with Katherine’s script or with the one I have uploaded in the other thread?
I put it here again just in case. mt_prep_gamma_snap (6.4 KB)
This works perfectly for me.

Let me know

2 Likes

I didn’t see this one, thank you very much! I’ll try it.
Is it normal that I get these values for getparm?

            ref_centre_lonlat: [0 0]
            ref_lat: [-Inf Inf]
            ref_lon: [-Inf Inf]