StaMPS-Visualizer, SNAP-StaMPS Workflow

can you please share an example?

Hi @ABraun,

sure :slight_smile: The example is on page 7 of this article. It is referring to the option in SARPROZ to create a cumulative estimation.
https://www.ias.ac.in/article/fulltext/jess/129/0146

I would also like to understand why his ‘ts’ plots always start with 0 although the are ps estimation and his cumulative value falls perfectly with his last date value on the plot. If anyone knows how, please let me know.

Hope this helps.

Aster

the image you refer to shows the same information as the time series plot of StaMPS, the only difference is that the latter starts at y=0 (as you say).
I think this can be easily changed with matlab code, but I am not very experienced with it, so maybe someone else can answer this.

That is what the subtract offset button in the StaMPS-Visualizer does, though not in StamPS in Matlab and neither do I know from the top of my head how to accomplish that, but should not be to hard.

However, @asterios_papas, much of the plots is relative and I alwys need some time to wrap my head around it ;). If I do understand the PS plot of StamPS right, they are relative to the prime date, hence the first date does not start at 0. What the StamPS-Visualizer does is to simply offset all measurement points (MP) in order to let the curve start at 0 on the first date.

Lets discuss an example:
Assumptions:

  • you have this series of images [t-1, t, t+1] where t is the prime date
  • lets assume that we look at a MP on a slope that from t-1 constantly moves downslope.
  • also MP’s position is along the line of sight (LOS) of our sensor
  • lets assume we have just ascending images, and the slope we look at is west->east orientated (so S1 would look downslope and therewith in the direction the MP moves)

In this setting, we would have this time series plot:

example

  • in t-1 the point is relative to t upslope therefore its displacement is positive
  • in t the point is relative to t…well exactly the same hence 0
  • in t+1 the point moved (in this example a bit slower, hence the slope is less steep) further downslope and lies in t+1 beneath t, hence -1 mm displaced relative to the t position.

If you want to get a “cumulative” displacement (the entire distance the MP has moved from t-1 to t+1) you have to subtract the offset:

example_cd

In publications, I recognized, that cumulative displacement is used more often.

So, this is how I explain it to me, comments on that?

6 Likes

Dear @thho

I have problem to install R, using the following commands:
./configure
make
‘make’ does not existe , what shall I do

Thanks

please provide proper system information:

Which OS and version
Which R version
From which source does the download come from

If you are on Ubuntu simply follow this

@thho I success to install R and rstudio from : https://linuxconfig.org/how-to-install-r-on-ubuntu-20-04
but the application doesn’t launch, have look please


Capture d’écran de 2020-12-15 10-58-05|690x388

failed to install leaflet package, so I downlod ‘‘leaflet_2.0.3’’ and I put it in the directory R/x86_64-pc-linux-gnu-library/3.4, after that I rerun the script but also it failled !!!

Here is the error:

install.packages(“leaflet”)
Installing package into ‘/home/smiloudi/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘raster’ is not available
essai de l’URL ‘https://cloud.r-project.org/src/contrib/leaflet_2.0.3.tar.gz
Content type ‘application/x-gzip’ length 2039454 bytes (1.9 MB)

downloaded 1.9 MB

ERROR: dependency ‘raster’ is not available for package ‘leaflet’

  • removing ‘/home/smiloudi/R/x86_64-pc-linux-gnu-library/3.4/leaflet’
    Warning in install.packages :
    installation of package ‘leaflet’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpDs3jta/downloaded_packages’

First guess is, that your Ubuntu installation is missing some dependencies, otherwise installing such standard R packages does not cause such errors. My advice is:

  • avoid downloading and putting R packages by hand into folders, use this as a last option and before, try to figure out what causes the installation error.
  • R 3.4 is rather old, try to install 3.6 at least (latest release is 4.0) I use 3.6 on Ubuntu 20 and this does the installation without troubles
  • The error for leaflet installation is pointing to the missing raster package dependency. raster uses sp which relies on gdal, R uses the libgdal-dev library. To add it to you Ubuntu run this in Ubuntu terminal:
sudo apt install gdal-bin libgdal-dev -y
  • after that return to R and run:
install.packages("rgdal")
install.packages("raster")
install.packages("leaflet")

@thho Thank you this makes absolute sense.

I’d like to point out that it is quite weird that this the first time anywhere that I’ve seen how time-series stamps analysis, or any other to be frank, are interpreted and explained decently. Not even in the manual…
So thank you @thho for being polite and honest enough to help out.

Aster

1 Like

Thx @asterios_papas :slightly_smiling_face:
During the upcoming holiday I will work on a new StamPS-Visualizer version and thought about putting a similar explanation there :wink: I’ll keep you updated

2 Likes

I use again R 3.6 on ubuntu 18.04.
when I run ui.R script : this error figure

shiny::runApp(‘Téléchargements/stamps_visualizer_01beta’)
Erreur : package ‘htmltools’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version

I return to R and run :
install.packages(“shiny”), but the error still occured.

From this, I estimated that you use 3.4 and I think I was not totally wrong, since your error now reports some conflicts with different R versions installed on your machine:

You have to tidy up your R installations on your machine. In order to purge all R related installations, try to follow this steps:

#in Ubuntu Terminal
R -e '.libPaths()'

This will output you something like this:

R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> .libPaths()
[1] "/home/thho/R/x86_64-pc-linux-gnu-library/3.6"
[2] "/usr/local/lib/R/site-library"               
[3] "/usr/lib/R/site-library"                     
[4] "/usr/lib/R/library"                          
> 
> 

The entries here at the end are the paths to folders you now have to delete like this:

#in Ubuntu Terminal
rm -rf /home/<user>/R/x86_64-pc-linux-gnu-library/3.6
#do this for ALL paths in the output above, in my case 4

#now delete all R installations:
sudo apt-get remove r-base-core
sudo apt-get remove r-base
sudo apt-get autoremove

#check if there is anything left:
dpkg -l | grep ^ii | awk '$2 ~ /^r-/ { print $2 }'

#if this outputs a r-package do
dpkg -l | grep ^ii | awk '$2 ~ /^r-/ { print $2 }' | sudo xargs apt-get remove --purge -y

This should clear your conflicting R installations, after that, start setup R here:

Reinstall the packages you need within the new R installation and try again.

1 Like

Please tell me how this works for you I just want to use the time series analysis and selecting the stable area among the study location for construction purpose. I already subset it on SNAP

What I want is to export the final result on ggogle earth as well using StaMPS-Visualizer to make a time series like you post here. Thanks a lot for your effort

Please haev a look at these instructions StaMPS - Detailled instructions

Hi @thho,

it works good, thank you very much

@CDE cool have fun :smiley: !

Handling versions in processing environments is always an issue. On the other hand, there are many good tools available to keep environments stable and easy to set up for other people. Hence, in the next version release I will provide a solution with renv to set all up, and a also a Docker solution :slight_smile:

Dear sir I follow your instruction but I cant be success full what is the problem would you tell me please

some comments on your screenshot:

  • you don’t use the current version of the visualizer. to do so use the version from github:
    https://github.com/thho/StaMPS_Visualizer
  • your current plot shows the extend of PS, which you have included in the ps_plot() in matlab.
    • to select a larger extend, after trigger ps_plot(), you are asked to input a radius in which the PS processed by StaMPS are selected, choose a larger radius
    • after that, again perform the export
    • this might lead to a: errors or b: a large file with to mnay PS to be processed by StamPS-Visualizer
      • in case of a:
        • choose a very very large radius during ps_plot() then continue with case b
      • in case of b:
        • when your StaMPS export holds to many points the visualizer might crash due to rendering issues, therefore subset the points with a shape of your choice, a workflow to do this is in the manual tab of the visualizer

First guess: you do not use the up to date Visualizer version, there is a change in the matlab export procedure, you have to use the right export script depending if you work with StamPS 3.x or StaMPS 4.x see in the manual tab of the latest Visualizer version.

when I choose a larger radius (10000) this error is occured:


export_res = [lon2 lat2 disp disp_ts];
Error using horzcat
Dimensions of arrays being concatenated are not consistent.