PSI using SNAP-STaMPS workflow in Windows Subsystem for Linux (WSL)

Hi there . I have used SNAP and StaMPS with WSL (Windows for Linux Subsystem). Unlike the of
@amirolinxa video of I work with matlab from Windows.
So far everything has been very good. I have been able to execute up to step 5 (stamps (5,5)). But when running step 6 Matlab does not recognize snaphu.
When I type the command snaphu it is not recognized by matlab. (Figure 1).

I guess the problem is related to the matlab path or snaphu installation. I have checked both and have not found any errors. Has anyone had similar problems

When I run step 6, is it necessary to change the path?
When I write the command snaphu in WLS if it recognizes me (Figure 2).

Just type stamps(7,7) in matlab and forward the error.

1 Like

@suribabu I donā€™t think this solves the problem.
@HugoLuVi You could add the snaphu/bin folder to the matlab path directories (the Set Path icon) so it is found from inside matlab as well.

1 Like

Thank you very much for answering.

@suribabu at first I did that but the process never ended. For that reason I decided to test if it recognized the snaphu command and found that it did not recognize it.

@ABraun I have selected the bin folder of the path where it is stored C:\Softwares_i\StaMPS-4.1-beta\bin.

But still unable to execute the command.

On the other hand when I run the command * whereis * in WSL, to locate matlab, snaphu and triangle, it gives me the following result:

matlab: /mnt/c/Program Files/MATLAB/R2017b/bin/matlab.exe
snaphu: /usr/bin/snaphu/usr/local/bin/snaphu/usr/share/man/man1/snaphu.1.gz
triangle: /usr/bin/triangle

I donā€™t know if this could help you understand the problem ā€¦
When changing path is it necessary to restart or do other things that maybe Iā€™m forgetting? ā€¦

Iā€™d say snaphu should also be compiled in a folder. Looks like it is currently still inside the gz archive.
Wheny you compile it, it will also be stored in a folder like /usr/bin/snaphu for example. It is not part of the stamps installation.

Iā€™m not a big friend of the WSL work around to be honest because it is kind of a mix of windows and linux and I never know where to search for errors in case of problems.

1 Like

When I installed SNAP and the snaphu plugin was installed in a folder with the following path: C:\Users\USER.snap\auxdata\tool-adapters. Now I have explored in that same directory and I have found a bin folder, with the following path: C:\Users\USER.snap\auxdata\snaphu-v2.0.4_win64\bin its content can be seen in the following figure.

I have tried using this route in matlab and it has not been successful.

Does anyone know if something else needs to be done when changing path in the file?.

In the StaMPS_CONFIG file is it necessary to make changes if you had already worked stamps up to step 6? ā€¦

Yes, the path to snaphu must be set correctly and the config file must always be sourced before processing.

1 Like

Run each command in terminal, if any problem while running these, please update
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install gawk
sudo apt-get install tcsh
sudo apt-get install Matlab-support
sudo apt-get make
sudo apt-get build-essential g++

For installation of snaphu and train packages
sudo apt-get install snaphu
sudo apt-get install triangle-bin

1 Like

By running the command sudo apt-get install Matlab-support
The result is:
Reading package listsā€¦ Done
Building dependency tree
Reading state informationā€¦ Done
E: Unable to locate package Matlab-support

Try this

When executing that, this appears to me:

This happened the first time.
Now when I try to run it appears this

sudo apt-get matlab-support
E: Invalid operation matlab-support

Type your matlab location (First try to get matlab location using terminal then copy here)

for example /use/local/bin/matlab

In this part I am not sure which address to enter.
The matlab.exe is located in mnt / c / Program Files / MATLAB / R2017b / bin /

However when I use the whereis matlab function the result is the following: / usr / lib / matlab / etc / matlab / usr / share / matlab / mnt / c / Program Files / MATLAB / R2017b / bin /

You have to install matlab in ubuntu (not in windows).

1 Like

Dear ABraun,

In my case I have 100 images over 5 years. The long duration interferograms have a total phase loss. What should I do to avoid the temporal decorrelation, please?.

And for combining the descending and ascending viewing geometries to create the time series by StaMPS: is there any prior step for this combination or just exporting their interferograms all together to StaMPS, please?.

Thank you.

The question is if the phase decreases because of the scattering variability of natural materials or because of severe changes within your study area, for example construction activity.

You cannot process ascending and descending at once. Each direction has to be calculated separately and then you have to chose a way to merge them. As both are computed along the line of sight (LOS) they might show you different patterns and value ranges of displacement.

Regarding the first question: I know that there are deep-seated landslides in the AOI, so I suppose the reason is the the scattering variability of natural materials. What could be the solution accordingly?

Regarding the second question: thank you.

PSI can only detect/measure creeping landslides. Sudden mass movements lead to complete phase decorrelation. Interferometry needs coherent scattering between the images. Also, there is a maximum displacement which can be detected between two images which is dependent on the wavelength of the sensor. So I canā€™t tell what is the matter in your case, but the nature of the movement is critical.

The nature of the movement is slow. There is not a sudden failure.

The materials provided here make suggestions for the variable configuration for cases with slow landslides. StaMPS/2_stamps_workflow.md Ā· master Ā· Matthias Schlƶgl / gis-blog Ā· GitLab

1 Like