Workflow between SNAP and StaMPS


#354

Hi @muhannad, thank you for sharing your results!
I’m a student and I’m working for my master thesis on Sentinel-1 data using SNAP and StaMPS.
I’m trying to work in Windows with cygwin but I’m facing some problems.

I have some questions:

  1. What parameters did you choose in the function mt_prep_snap? In particular how many patches?
  2. Have you ever had some empty patches?

Currently, I’m having troubles with Matlab, so any advice will be very helpful.

Thank you,

Francesca


#355

Can someone please help with this error in the first step of StAMPS. I am close to giving up hope.
I ran snap2stamps in linux. Copied the data over to my PC with Matlab and Cywin + Stamps.
Then I ran mt_prep_snap with defaults.
Then Stamps(1,1,1) gives me the following error that I can’t work around, I have a feeling mt_prep_snap isn’t working as it should and not creating all the files so readparm can’t read it:

stamps(1,1,1)

STAMPS: ########################################
STAMPS: ####### StaMPS/MTI Version 4.0b6 #######
STAMPS: ####### Beta version, Jun 2018 #######
STAMPS: ########################################

STAMPS: Will process current directory only

STAMPS: ########################################
STAMPS: ################ Step 1 ################
STAMPS: ########################################
STAMPS: Directory is D:\cygwin\home\ATheron1\INSAR_20170730\PATCH_1

PS_LOAD_INITIAL_GAMMA: Starting
PS_LOAD_INITIAL_GAMMA: Loading data into matlab…

master_master_flag =

'0'

Error using textscan
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in readparm (line 19)
parms=textscan(fid,’%s’);

Error in ps_load_initial_gamma (line 77)
heading=readparm(rslcpar,‘heading:’);

Error in stamps (line 264)
ps_load_initial_gamma;


#356

I also experienced this error several times, but mostly under cygwin and never in Linux. I can’t promise that Windows is the reason but I observed a pattern here.


#357

That actually helps, thank you. Because right now I am not sure if it’s a Data, Cygwin, Matlab, mt_prep_snap, stamps.m, ps_load_initial_gamma.m, readparm.m or ps_load_initial.m issue. It means I will direct my focus to set up our linux server properly with Matlab instead of struggling on my Windows PC with cygwin.


#358

If you have the chance to test your data on Linux, it’s worth a try


#360

Hi Francesca!

To work under Windows you should:
1- manually change all the paths in all ( .txt) ( .in) (*.out) generated files of “mt_prep_gamma” from ‘/cygdrive/directory/’ to ‘ directory:’
for example: from ‘/cygdrive/G/’ to ‘ G:’
2- In cygwin: type csh before call Matlab.

For the parameters, they are as @ alvegavaleri mentioned:
mt_prep_gamma [masterdate in format yyyymmdd] [data directory] [amp_threshold] [rg_patches] [az_patches] [az_overlap] [rg_overlap]

For me I used: 0.4 1 1 50 200

Good luck!


#361

when running mt_prep_snap I get error “Segmentation fault (core dumped)”…

mt_prep_snap Andy Hooper, August 2017

Amplitude Dispersion Threshold: 0.35
Processing 3 patch(es) in range and 3 in azimuth

opening /mnt/DiscoD/Sentinel1Process/3stampsExport-subset/rslc/20171011.rslc…
Segmentation fault (core dumped)
3946
2075
mt_extract_cands Andy Hooper, Jan 2007

Patch: PATCH_1
selpsc_patch /mnt/DiscoD/Sentinel1Process/3stampsExport-subset/selpsc.in patch.in pscands.1.ij pscands.1.da mean_amp.flt f 1
file name for zero amplitude PS: pscands.1.ij0
dispersion threshold = 0.35
width = 11840
number of amplitude files = 0
Segmentation fault (core dumped)

psclonlat /mnt/DiscoD/Sentinel1Process/3stampsExport-subset/psclonlat.in pscands.1.ij pscands.1.ll
opening pscands.1.ij…
Error opening file pscands.1.ij

pscdem /mnt/DiscoD/Sentinel1Process/3stampsExport-subset/pscdem.in pscands.1.ij pscands.1.hgt
opening pscands.1.ij…
pscdem: Error opening file pscands.1.ij

pscphase /mnt/DiscoD/Sentinel1Process/3stampsExport-subset/pscphase.in pscands.1.ij pscands.1.ph
opening pscands.1.ij…
Error opening file pscands.1.ij


#362

according to the manual, reasonable values for the amplitude dispersion are between 0.4 and 0.42. I don’t know if this is the cause for your error and you probably know what you are doing there.


#363

Hi,

Values of amplitude threshold mentioned by @ABraun are ok, but you can use a lower threshold when the time series is shorter in time.

The segmentation fault message could be due to many things, but here two of them that come to my mind:

  1. anything went wrong while running the make command at the moment of installing StaMPS on your system
  2. you had not enough RAM on your system (less probable)

I hope this helps


#364

Hi @ABraun and @mdelgado, thank you…
I was able to solve the problem by reinstalling OS, going from opensuse Tumbleweed to Leap 15, and now I do not have core dumped in mt_prep_snap … just reinstalling StaMPS did not work.
I have another problem, SNAP download the srtm file “http://srtm.csi.cgiar.org/SRT-ZIP/SRTM_V41/SRTM_Data_GeoTiff/srtm_23_17.zip” … but the page is not found …


#365

is manually downloading an option? You can place the file in the directory under auxdata\dems\


#366

Regarding the DEM download, in fact this is a page not found so it should be any developer taking the action to fix it.
Can any of you (@marpet or @lveci) please solve this? Maybe getting a local repository instead of third party’s dependencies??

Regarding the StaMPS installation… it is weird that did not work. Can you share with us how did happen? You only need to compile the src folder with make and later make install and add the paths to your environment.

Thanks!