StaMPS-Visualizer, SNAP-StaMPS Workflow

Hi @thho thank you for responding…

Ya,it’s strange and this never happen when I process Sentinel 1 data…

Regarding to your question…

● Sorry,I dont think I’m understand about regional subset…but in this case, I did export into stamps visualizer using script that available on shiny apps and I set up my TS Plot as big as I could…for example if my area of interest is covering 1000 meter, I will input 10000 meter as my TS plot just to make sure the plot covers all my result.

● It seems like you are aware something, YES, This shifting phenomena is also happen when I try to export it into Google Earth.

@thho Here I share the Exported data from SNAP to be processed on StaMPS. Perhaps, you can help me to perform further analysis for my problem. Thank You in Advance.

Share Exported Data :

Badrul

Ok, from what you said, I do not think that the problem is related to the export (not 100% sure but my first idea), because.

the two export processes StaMPS–>Google Earth and StaMPS–>StaMPYVisualizer are slightly different but use the same initial data. If both show the same strange result and you also were never confronted with it when processing S1, then I think it it because of ALOS2. Since StaMPS does not really show the data n front of a map, I think that the problem was there all the time, but you simply couldn’t see it…
From my side, I would suggest checking the coordinates of your data–> which coordinates are in the Matlab objects during StaMPS processing (some extreme like upper left) and which coordinates do you expect from your study side…I could imagine they differ. So what to do then, I not sure, since I have until now never processed ALOS2 I do not know if @ABraun can help, but would not be surprised :wink:

Concerning your SNAP output for StamPS processing…atm I do not have access to a Matlab installation, hence I can not process just, comment on screenshots -.-

3 Likes

@thho thank you for your respond…
yes, actually I rarely processed ALOS 2 data, so this is new phenomena to me. Anyway, thank you for your opinion, I will check the coordinates in Matlab and share it here if I could find something.

Badrul

1 Like

hi,error with pl_plot when add a ‘a’ ,I’ve run stamps(8,8) with stamps4.1b1540

You cannot include a when you did not remove the tropospheric disturbance. Plot your results without a.

Please check here: PSInSAR Result

thank you for your attention ,do you know how can I run sub topo remove using snap2stamps scripts by @mdelgado with snap6?

Hi, Did you ever know what the error was due to?

proceed as described here and it should work:

1 Like

@ABraun:so appreicate for your careness of still remembering my question. the step by step guiding me to visualize the PSI results is very important to me,thank you again. :+1: :+1: :+1:

1 Like

Hello, I am trying to export results into Windows to be able to plot the data using acsii files in another software which is very handy, 3DField. When I type ps_output in matlab, it gives only ps_u-dm data for each interferogram in ascii file. But, instead, I would like to get ps_u-dms data in ascii file for each ifg since this seem to give me more smoothed and hence presumably more accurate results.

Could anyone help me how to generate u-dms output in ascii file?

I assume all ps_u-dm and ps_u-dms or even ps_u-dmo files generate displacement results for each point in mm. Am I understanding this correctly?

Any help here would be greatly appreciated!

PS: Screenshots from matlab of ps_plot(‘u-dm’), ps_plot(‘u-dms’) and ps_plot(‘u-dmo’) are provided below for comparison of the results.

The study area is an oilfield with subsidence. Empty area in the center is a trace of river and in the south-east is a trace of sandy desert. Persistent blue areas are where the cluster of production wells, in the center and in the north-east. Persistent red area in the west - I have no idea, this zone is outside the area of oilfield.



1 Like

I have tried many times with a 300-10 radius. But i have got error. What should be i have to do?

From the Matlab code I see that you are using code I wrote for StaMPS 3.x however I think you are using StaMPS 4.x…please go to the github repo and use the up to date version of the StamPS-Visualizer, within in the Manual Tab you can find the new Matlab code for exporting the .csv from StaMPS 4.x. Your problem will be solved :slight_smile:

https://github.com/thho/StaMPS_Visualizer

1 Like

Ohh bi… :grinning: :grinning: :grinning:
Thank you so much.

Hi…Have a good day… @thho Thank you very much for sharing your work in Subseting .csv file created from TS Plot. I have an error like this when trying to execute command in R studio.

R - Script
###########################
###subset ts plot export###
###########################
library(sp)
library(rgdal)
library(rgeos)

#read subsetpolygon
roi <- readOGR("/home/cresos/TOKYOSENTINEL1/ROI/ROI.kml")
#read exported .csv
pnts <- read.csv("/home/cresos/TOKYOSENTINEL1/DESCENDING/SUBSET2/STAMPSEXPORT/INSAR_20190714/tokyosentineldescendingsubset2.csv")
#create spatial object
lon <- pnts$export_res_.1[2:nrow(pnts)]
lat <- pnts$export_res_.2[2:nrow(pnts)]
loc <- data.frame(lon, lat)
pnts.geo <- SpatialPointsDataFrame(loc, pnts[2:nrow(pnts), ],
proj4string = CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"))
#spatial subset
pnts.sub <- pnts.geo[roi, ]
#create table from spatial subset
sub.csv <- rbind(pnts[1, ], pnts.sub@data)
#export csv to StaMPS-Visualizer application
#adapt path to your machine
write.table(sub.csv, file = “/home/cresos/stamps_tsexport_subset_descending.csv”,
row.names = F, col.names = T, sep = “,”)

Response

###########################
###subset ts plot export###
###########################
library(sp)
library(rgdal)
library(rgeos)

#read subsetpolygon
roi <- readOGR("/home/cresos/TOKYOSENTINEL1/ROI/ROI.kml")
OGR data source with driver: KML
Source: “/home/cresos/TOKYOSENTINEL1/ROI/ROI.kml”, layer: “ROI.kml”
with 1 features
It has 2 fields
Warning message:
In readOGR("/home/cresos/TOKYOSENTINEL1/ROI/ROI.kml") :
Z-dimension discarded
#read exported .csv
pnts <- read.csv("/home/cresos/TOKYOSENTINEL1/DESCENDING/SUBSET2/STAMPSEXPORT/INSAR_20190714/tokyosentineldescendingsubset2.csv")
#create spatial object
lon <- pnts$export_res_.1[2:nrow(pnts)]
lat <- pnts$export_res_.2[2:nrow(pnts)]
loc <- data.frame(lon, lat)
pnts.geo <- SpatialPointsDataFrame(loc, pnts[2:nrow(pnts), ],
proj4string = CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"))
Error in .local(obj, …) :
cannot derive coordinates from non-numeric matrix
#spatial subset
pnts.sub <- pnts.geo[roi, ]
Error: object ‘pnts.geo’ not found
#create table from spatial subset
sub.csv <- rbind(pnts[1, ], pnts.sub@data)
Error in rbind(pnts[1, ], pnts.sub@data) : object ‘pnts.sub’ not found
#export csv to StaMPS-Visualizer application
#adapt path to your machine
write.table(sub.csv, file = “/home/cresos/stamps_tsexport_subset_descending.csv”,
row.names = F, col.names = T, sep = “,”)
Error in is.data.frame(x) : object ‘sub.csv’ not found

I need your advice
Thank you in advance

Best Regards
Badrul

Dear @badrulhudahusain,
please provide the dimensions of these objects:

pnts
lon
lat
loc

My first guess is, that your .csv export behaves strange. Therefore a screenshot of it opened in libre calc or microsoft excel would help further.

1 Like

Hi,when I run ui.R, error occurs:

shiny::runApp(‘C:/StaMPS_Visualizer-master’)
Loading required package: shiny
Warning: package ‘shiny’ was built under R version 4.0.2
Warning: package ‘lubridate’ was built under R version 4.0.2

Attaching package: ‘lubridate’

The following objects are masked from ‘package:base’:

date, intersect, setdiff, union

Error in .local(x, …) : Parameter is not used(origin = “0000-01-01”)

first try this out:

restart Rstudio, run the install_packages.R script and check that all packages are up to date.

to check further, remove all custom study stie .csv tables from StaMPS_Visualizer/stusi/ folder and then run the app again. If this produces errors, please post the versions of the packages you are using plus the R Version.

1 Like

thank you for your quickly reply ,I do as you said ,also I modified my csv file’s structure as same as Maoxian_PS.csv.now It works successfully ,thank you again

1 Like

Thank you and I’m sorry for late reply. @thho
I try to change (delete “.”) in your R script, turns out it works. I try to adapt it with my .csv export result.

in command for #create spatial object, I delete “.” to adapt with my .csv export result.
Original Script :
#create spatial object
lon <- pnts$export_res_.1[2:nrow(pnts)]
lat <- pnts$export_res_.2[2:nrow(pnts)]
loc <- data.frame(lon, lat)
pnts.geo <- SpatialPointsDataFrame(loc, pnts[2:nrow(pnts), ],
proj4string = CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"))

Modified Script :
#create spatial object
lon <- pnts$export_res_1[2:nrow(pnts)] #modified line
lat <- pnts$export_res_2[2:nrow(pnts)] #modified line
loc <- data.frame(lon, lat)
pnts.geo <- SpatialPointsDataFrame(loc, pnts[2:nrow(pnts), ],
proj4string = CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"))

Anyway, you did excellent in creating this script and share it here

Thank You

Best Regards
Badrul

3 Likes