How to prepare Sentinel-1 images stack for PSI/SBAS in SNAP

:flushed::flushed::flushed: oh thanks @ABraun :flushed::flushed::flushed:

Hi @ABraun

My firsts results, how make the export for .kmz format???

@ledotimea

Yeah, you are right.
It seems if I get an mt_prep warning, invariably Stamps(1,1) will get an array bounds error. I guess a parameter or setting in the SNAP processing gets messed up at some point as returning to SNAP to create and export a new stack and subset of the same image products often seems to resolve the issue.

Thank you.

Latest SNAP-StamPS workflow hurdle, getting ps_plot() to work.

Thanks to this forum I’ve been able to get StaMPS to run to completion all the way to Stamps(1,8) using SNAP and sentinel-1 images. However, at no point have I been able to get ps_plot() to work at any stage of the process.
The errors always seem to be a variation of:

Warning: Colon operands must be real scalars.
In ps_plot (line 1401)

Warning: Colon operands must be real scalars.
In ps_plot (line 1402)

Index exceeds array bounds

Anyone have any suggestions or experience overcoming this type of issue in the workflow?

Thank you.

(I’m running SNAP_6.0 in Win7 and StaMPS_3.3b1/Matlab_R2018a in Ubuntu18.04)

I was able to do some plotting, but also not any of the available options. Is viStaMPS a solution for you or the one @thho pvovides here: StaMPS-Visualizer, SNAP-StaMPS Workflow

Thanks for the suggestions @ABraun, especially the link to StaMPS-Visualizer by @thho , seems great from the test/example data included.
(Only problem is it still requires proper StaMPS ps_plot() functionality to create the csv export, thus I’m still hope someone can help overcome the ps_plot) “Colon operands must be real scalars. warning which apparently leads to an array bounds index error”)

Hi all,
What is the general opinion about ESD step after back geocoding?
According to some articles, it seems necessary, although none of the workflows mentioned here.
I also face some difficulties implementing this step in case of a stack.

Hello,
to detect the soil diplacement with the PSI method of sentinel images with snap and stamps. I followed the steps of bayzidul (from 1 to 12), I have not realised the steps 13 and 14 concerning Run mt_prep_gamma.
ı need help on running mt_prep_gamma script .
can you explain me this steps in detail?

thank you very much

Hi all,

@saidbenchelha
For the mt_prep you should just follow the StaMPS manual.
For me it works the modified mt_prep_gamma_snap for which you should get amplitude average per scene higher than 0.xxxx in my cases between 50 - 80.

mt_prep_gamma_snap usage is indicated while running it without parameters, more or less as follows:
mt_prep_gamma_snap <INSAR_path> amp_disp_thr patch_x patch_y

being INSAR_path the folder which contains the rslc, diff0 and geo folder after exporting the snap interferograms into StaMPS format for PSI using SNAP.

@ledotimea
on the thread: Snap2stamps package: a free tool to automate the SNAP-StaMPS Workflow you can get a new package which includes the ESD in the xml graphs to run using SNAP. This new package uses python and snap, so it should work in Windows, Linux and Mac.

@twburns
For the ps_plot issues that you mentioned… please check as I have not any problems. ps_plot(‘v’), ps_plot(‘v-d’,1,‘ts’), ps_plot(‘v-d’,-1), ps_plot(‘d’) worked fine for me. Only when the ps obtained are very high, I got memory issues with Matlab.

I hope this helps.

1 Like

Is Stamps working satisfactory in windows?
If yes please tell how to install Stamps in windows.
Regards
ASVirk

a clear no. I tried it many times on different computers but there is always something. If you really are an expert on both systems and their combatibility (especially shell scripts) you could probably get it running but I would highly disadvise because you then never know if upcoming errors were caused by processing parameters or the operating system.

ok thanks ABraun

I would like just to add something:
Purely speaking, StaMPS itself are the matlab scripts (found inside the matlab folder within the stamps package) for doing PSI/SBAS/MTI , which obviously runs on MATLAB and hence, it should work on Windows, Linux or any other platform in which MATLAB runs. (please note that snaphu and triangle should be also installed in the system and included in the path).

The rest of the scripts provided within stamps package, are for the interferogram computation and SAR SLC image coregistration and resampling, that must be done previously to StaMPS. Currently there are different options to do this part that works also in Windows, such as for example you can use SNAP (v6.0) for doing the interferograms compatible with StaMPS PSI (and you can use the snap2stamps script for doing those interferograms automaticaly) . See the thread : Snap2stamps package: a free tool to automate the SNAP-StaMPS Workflow

The mt_prep scripts, that are used after interferograms and before StaMPS, which translates the interferograms in StaMPS compatible input runs on linux or similar (as they are bash/ctsh scripts using other functions) , and then you could face some issues as indicated by @ABraun before.

But if your plan is to do everything (interferograms + PSI/SBAS/MTI) using only the stamps package, then the answer is the same as given by @ABraun.

Cheers

that is right, thank you for pointing that out. I was minly speaking of the mt_prep_gamma script which needs to be executed before StaMPS itstelf.

But as you also mention, running the Matlab scripts on a Windows machine requires proper compilation of triangle which is designed for Linux in the first place. Furthermore, commands like “rm” which are called by the StaMPS Matlab scripts, are not recognized by Windows.

1 Like

thanks a lot Mdelgado for your clarification.

I missed that part, but indeed do not discard that matlab scripts can call system commands internally, which will need to be reviewed/changed when needed.

I should try to run stamps matlab scripts on windows once…

Thank you so much thho. ill update you soon.

Hi Thorsten

I´ve been using this script to export TS as a CSV file (as it´s explained in the manual). And I cannot do anything but the plot map (ps_plot’v-d or do’) Do you have any tip?
Thanks

Error using load
Unable to read file ‘ps_plot_v-do.mat’. No such file or directory.

Undefined function or variable ‘lon2’.

Did you mean:
Undefined function or variable ‘lat2’.

Did you mean:
Undefined function or variable ‘lon2_str’.

Undefined function or variable ‘lonlat’.

Undefined function or variable ‘lonlat_str’.

Undefined function or variable ‘ind’.

Undefined function or variable ‘lon2’.

Did you mean:
Undefined function or variable ‘day’.

Undefined function or variable ‘export_res’.

Undefined function or variable ‘export_res’.

Undefined function or variable ‘export_res’.

Dear @CarlosSierralta,
just to be certain what you have done so far, did you plot a ps_plot with ts option and did select radius to look at the points you are interested in? For me it looks like that you have not plotted with ts option, you have to do this because the objects which are reported in your error messages are created during this step.

hope that helps a bit, let me know if the error persists

Thanks Thorsten, I’ll check it and let you know