Step 2 error (StaMPS 4.1b)

1,031 views
Skip to first unread message

Stoorm

unread,
Aug 18, 2018, 9:44:45 AM8/18/18
to MAINSAR
Hi community and developers, 
Could you please help with the following issue.
I'm trying to process sentinel SLC with snap2stamps/Stamps 4.1.b chain and i'v have error at step 2:

STAMPS: ########################################
STAMPS: ################ Step 2 ################
STAMPS: ########################################
STAMPS: Directory is PATCH_1

PS_EST_GAMMA_QUICK: Starting
PS_EST_GAMMA_QUICK: Estimating gamma for candidate pixels
GETPARM: filter_grid_size=50 
GETPARM: filter_weighting='P-square'
GETPARM: clap_win=32 
GETPARM: clap_low_pass_wavelength=800 
GETPARM: clap_alpha=1 
GETPARM: clap_beta=0.3 
GETPARM: max_topo_err=20 
GETPARM: lambda=0.0554658 
GETPARM: gamma_change_convergence=0.005 
GETPARM: gamma_max_iterations=3 
GETPARM: small_baseline_flag='n'
Found look angle file 
PS_EST_GAMMA_QUICK: n_trial_wraps=0.174557
PS_EST_GAMMA_QUICK: Initialising random distribution...
PS_EST_GAMMA_QUICK: 4162797 PS candidates to process
PS_EST_GAMMA_QUICK: iteration #1
PS_EST_GAMMA_QUICK: Calculating patch phases...
Subscript indices must either be real positive integers or logicals.

Error in ps_est_gamma_quick (line 221)
        ph_grid(grid_ij(i,1),grid_ij(i,2),:)=ph_grid(grid_ij(i,1),grid_ij(i,2),:)+shiftdim(ph_weight(i,:),-1);
        
Error in stamps (line 326)
                    ps_est_gamma_quick(est_gamma_parm);
 
 
Also I can't create ps_plot('w') after step 1 with error:
>> ps_plot('w')
Nonfinite endpoints or increment for colon operator in index.

Error in ps_plot_ifg (line 540)
                  R(ix1b(i):ix1e(i),ix2b(i):ix2e(i))=col_ix(i)+1;

Error in ps_plot (line 2119)
    ps_plot_ifg(ph_disp(:,i_im),plot_flag,lims,lon_rg,lat_rg,ext_data);

I have such errors when trying to calculate any pre-processed data by SNAP GUI or snap2stamps. 
In this case, most of the data (3 stacks of 4) is processed without any errors in the version of Stamps 3.3. Only on one stack I get an error about the impossibility to plot 'w'.

I hope for your help. Thank you.




Jose Manuel Delgado Blasco

unread,
Aug 18, 2018, 1:52:40 PM8/18/18
to mai...@googlegroups.com
Not clear what you mean with having errors in 1 stack of 4. Are all the stacks over the same area?

Had you checked the interferograms? Or maybe the information in one of the matrices had zero values at some point. 

These are some thoughts, but if you provide more info we could provide more ideas...

Cheers


I would suggest 2 things:
1) check the calamp.out to see whether some amplitude had zero values.



--
You received this message because you are subscribed to the Google Groups "MAINSAR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mainsar+u...@googlegroups.com.
To post to this group, send email to mai...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stoorm

unread,
Aug 19, 2018, 3:16:08 PM8/19/18
to MAINSAR
Thank you for your response.
All of my stacks were pre-processed in snap2stamps for different territories. I checked the interferograms in SNAP - they look normal and there are no zero points.
I checked in calamp.out all amplitude values and also not found any zero values.
As I understand in the data there are incorrect values but it is not clear in witch data they are present.
Do you have more ideas how to check it out?



суббота, 18 августа 2018 г., 20:52:40 UTC+3 пользователь Jose Manuel Delgado Blasco написал:

Jose Manuel Delgado Blasco

unread,
Aug 21, 2018, 1:11:08 AM8/21/18
to mai...@googlegroups.com
Hi,

Well, in such a case you could verify the dem information, either in the den band before mtprep or in the loaded variables inside step2. For that you should do some debugging.

You could for example try step 2 in other patches to see if this is something affecting all patches or only some of them.

After verifying that we can try to see how to proceed.

Let us know.
Cheers

Jose Manuel Delgado Blasco

unread,
Aug 21, 2018, 5:31:50 PM8/21/18
to mai...@googlegroups.com
I have seen that it was similar case than yours that has been solved by D Bekaert. Please try to download last version (not official release) from github and try again starting from step 1.

Apparently SNAP sometimes saves NaN values within the exported coordinates bands.

Try and let us know

Carlos Sierralta J.

unread,
Aug 21, 2018, 6:51:07 PM8/21/18
to mai...@googlegroups.com
It’s true what José Manuel is pointing out. I can say in my own experience that SNAP sometimes saves empty files in the stack. It happened to me with all the amplitude, elevation band, and lat/lon images. 
My advice is to not hurry SNAP setting High Priority in the task manager. Leave it alone and easy. Patience is the mother of all virtues!

Greetings

Enviado desde mi iPhone

Stoorm

unread,
Aug 22, 2018, 7:08:22 AM8/22/18
to MAINSAR
Hi, José Manuel, Carlos

I just looked at my data obtained from SNAP and saw that there really are NaN values. I will try to process with updated scripts.
Interesting but i was able to process the data in the old version of StaMPS (3.3b).
Thank you for help!

среда, 22 августа 2018 г., 0:31:50 UTC+3 пользователь Jose Manuel Delgado Blasco написал:

Stoorm

unread,
Aug 22, 2018, 8:13:49 AM8/22/18
to MAINSAR
I tried the updated script and got a new error:

Matrix dimensions must agree.

Error in ps_load_initial_gamma (line 202)
ix_nan = (sum(isnan(lonlat),1)==1 | sum(isnan(ph),1))


Error in stamps (line 263)
                    ps_load_initial_gamma;


среда, 22 августа 2018 г., 15:08:22 UTC+4 пользователь Stoorm написал:

David Bekaert

unread,
Aug 22, 2018, 8:19:10 AM8/22/18
to mai...@googlegroups.com
Could you try to replace  this with the following and see if this work.
ix_nan = (sum(isnan(lonlat),1)==1 | sum(isnan(ph),1)==1)

Also, can you also add the following above the statement to see what is happening
size(lonlat)
size(ph)

Thanks,
D.


To unsubscribe from this group and stop receiving emails from it, send an email to mainsar+unsubscribe@googlegroups.com.

Stoorm

unread,
Aug 22, 2018, 9:09:31 AM8/22/18
to MAINSAR
Hi, David
I added and replace this code:
% removing Nan values if pressent in lonlat, phase
size(lonlat)
size(ph)
ix_nan = (sum(isnan(lonlat),1)==1 | sum(isnan(ph),1)==1)

and got the following result:
ans =

     2886551           2


ans =

     2886551          17

Matrix dimensions must agree.

Error in ps_load_initial_gamma (line 204)
ix_nan = (sum(isnan(lonlat),1)==1 | sum(isnan(ph),1)==1)



Error in stamps (line 263)
                    ps_load_initial_gamma;


среда, 22 августа 2018 г., 16:19:10 UTC+4 пользователь David Bekaert написал:

David Bekaert

unread,
Aug 22, 2018, 9:16:47 AM8/22/18
to mai...@googlegroups.com
ok i made a mistake here before.
it should be: >> ix_nan = (sum(isnan(lonlat),2)>=1 | sum(isnan(ph),2)>=1)

I will commit the fix to the repository
D.

To unsubscribe from this group and stop receiving emails from it, send an email to mainsar+unsubscribe@googlegroups.com.

Stoorm

unread,
Aug 22, 2018, 9:33:30 AM8/22/18
to MAINSAR
Excellent! The process goes on.

Thank you all!

среда, 22 августа 2018 г., 17:16:47 UTC+4 пользователь David Bekaert написал:
Reply all
Reply to author
Forward
0 new messages