PSI: Error on first step on Matlab

I face a problem like you how do you correct it ?

Hello @abity,
Did you find a way to fix that problem with Error in ps_load_initial_gamma?
As @Narayanee described, my pscands.1 files are also empty.
@thho suggested to check the interferogram before exporrting. What does it mean “to check them”?

Thanks,
Oded

In StaMPS it is a good thing to plot the ifgs and look at them visually, when you see very noisy ifgs which might come from atmosphere, snowcover whatever it is a good thing to exclude them from the further processing steps in StaMPS since they can lead to wrong weeding of points for instance. It is a subjective task and when you do it the first time you have to experiment a bit. I suggest to take precise notes of why you decided to exclude and what that did to your end result, and iterate this process to get a feeling…I had to do it every time, since ech study site is defferent…topography, atmospheric conditions, surface cover etc.

1 Like

@thho, Thank you!
I will do that.
You said to plot the ifgs - you mean to visualize them using Snap?

Oded

About the pscads. 1 files - should they be empty when I start processing with matlab?

Hello @thho,
It took me 2 weeks to understand better how to deal with SNAP, snap2stamps and StaMPS.

I finished successfully the snap2stamps chain, and all interferograms are ok.
I run mt_prep_snap and it’s also ok.
When I run stamps(1,1) in Matlab, it finishes successfully but it also says:

ix_0 =

0×1 empty double column vector

PS_LOAD_INITIAL_GAMMA: Finished
STAMPS: Finished

When I check with ps_info it looks ok:

ps_info
1 12-May-2020 2 m
2 24-May-2020 -4 m
3 05-Jun-2020 105 m
4 17-Jun-2020 15 m
5 29-Jun-2020 10 m
6 11-Jul-2020 7 m
7 23-Jul-2020 31 m
8 04-Aug-2020 31 m
9 16-Aug-2020 -32 m
10 28-Aug-2020 -101 m
11 09-Sep-2020 -84 m
12 21-Sep-2020 -50 m
13 03-Oct-2020 0 m
14 15-Oct-2020 -7 m
15 27-Oct-2020 -35 m
16 08-Nov-2020 -93 m
17 20-Nov-2020 -105 m
18 02-Dec-2020 20 m
19 14-Dec-2020 -1 m
20 26-Dec-2020 21 m
21 07-Jan-2021 10 m
22 19-Jan-2021 -23 m
23 31-Jan-2021 -71 m
Number of stable-phase pixels: 1165393

Yet, that line “0×1 empty double column vector” looks suspicious - is that a normal behaviour?

Thanks,
Oded

I remember this message and think you can proceed. But keep an eye on the outputs

Good job on getting into the processing.

1 Like

hmm tbh I can not remember if I saw such an message or not…and I am not sure what it means. What happens when you proceed with the processing? Does StamPS accept the loaded PS?

Right now I can’t go further because I need the Signal Processing Toolbox.
It’s on its way though.
I tried to import the required functions from Octave’s signal processing toolbox but it gets to a functions that Octave’s toolbox does not supply.

Regarding the “ix_0” - It starts in the ps_load_initial_gamma.m script :pouting_man:

EDIT:
ok I found the source for that message.
ps_load_initial_gamma.m line # 211:

% removing 0 values if present in lonlat, phase
ix_0 = find(lonlat(:,1)==0)

So, as you can see - the ‘;’ is missing and therefore it prints out the result, that’s all.
Since it looks for zeros, I think that the result “0×1 empty double column vector” is a good one, what do you think?

Oded

Hello,
I got the signal proccesing toolbox, abd it’s working.
Steps 3-4 took quite long time, some hours. I have 22 interferograms, and the hardware is awesome (128G ram).
However, step 6 took some seconds. Regarding step 5, I dont remember right now…
Is this ratio of processing time between Steps 3-4 and step 6 normal?

In addition, each step I started seperatly, with stamps(0,x) as x is the step number.
Until step 4, it always begun with
*** Step ‘this_step’ ***

From step 5, it always started from 4:
*** Step 4 *** - quick processing time of something
*** Step 5 ***

Step 6 started with
*** Step 4 ***

*** Step 5 ***

*** Step 6 ***

Is that normal?

Thank you all!

@Oded Jep, that is normal. RAM is not necessarily the bottleneck, lets say you have an i5 CPU with about 6 threads then you have 21G RAM per thread (lets assume OS does not count) I found that when using the implementation of StaMPS in Matlab, I could see an increase in performance from a 5G RAM / thread (32 G RAM in total) to 10G RAM / thread (64G RAM in total) but beyond, there was hardly no significant gain…so when you have 128G RAM I would suggest to try to use 12 threads (meaning two parallel i5 CPUs or simply better CPUs with more threads)…

Just to go sure: if you want to run step 5, you type stamps(5,5), not stamps(0,5)

Hello @thho,
My hardware is Xeon® Silver 4210 CPU @ 2.20GHz, 40 CPUs, 2 threads per socket.
Regarding parallelism, page #20 on StaMPS manual says:

Parallelisation of steps 1-5 for patch processing.
You can run stamps_mc_header(start step,end step) just like conventional
stamps(start step,end step) to increase the processing speed of the first 4 steps of StaMPS. You can specify the number of cores to be used using setparm(‘n cores’,XX), where XX are the number of cores to be used.

Anyway, I tried to use setparm(‘n_cores’, something bigger that 1) but it says that I cannot do that because I don’t have need for that, something like that. I think it’s because I have only 1 patch.
I tried it again later, and it let me set the n_cores parameter, but when I typed stamps_mc_header it says:

Decrease number of cores, as lesser patches are being processed…
1Done

Hello @ABraun,
I used stamps(0,x) because it says on page #20:

Re-start processing from last succesfull step.
You can run stamps(0,end step) or stamps_mc_header(0,end step) with the startstep set to 0. In this case StaMPS will check which is the last completed step for each patch prior to starting the next step.

That’s why I uset stamps(0,x), I wanted to be sure that the last step is completed. And that is exaclty the reason for my question -
If it starts from the last completed step, why does stamps(0,6) starts from
**** step 4 ****

**** step 5 ****

I want to emphasize that it does only minor calculations (if any) now, and then procceed to step 6. It’s not like running steps 4 and 5 for the first time.

Oh, I didn’t know that, sorry. In this case, it seems fine!

Thank you very much for the info, your fix worked for me.

Hi everyone, I’m running Stamp s and at step 1 it gives me an error message ps_load_initial_gamma. I checked the snap export and everything is ok.
The error is on line 70. I share the screenshot.


I am not a matlab expert I ask for your help, thanks to anyone who can help me.

Please try below one.

1 Like

thanks suribabu but it didn’t help, i decided to modify line 69 by removing the +1.
I would like to ask you two questions.

  1. is it correct what I did?
    i don’t understand how it works, but it seems to work.
    i share the screenshoot and the modified file.ps_load_initial_gamma.m (7.3 KB)
    I hope I didn’t make an irreparable mistake.
    2)I would like to understand why it doesn’t work, does anyone have any ideas?


Thanks for the support

Instead of changing code. Please reprocess the mt_prep_snap step once again. I feel changing code is not a good idea because it’s working for most of the users.