Error in SNAP - StaMPS processing of RS2 data: "Index in position 1 is invalid"

Hi @ABraun , I want to ask one more thing. I read following in StaMPS Persistent Scatterer Practical by Andy Hooper


When I plotted ps_plot(‘vdrop-do’) I got following results:

All of these deformation maps look similar. Does that mean dropping any interferogram has no effect on deformation velocity? Even if I drop any interferogram atmospheric noise will remain the same? Or I am comprehending it wrong?
Said tutorial is attached
D3B2_Stamps_S1_PS_Exercise_2018.pdf (159.1 KB)

Based on your screenshots above, I would also expect some more differences here. But according to the description dropping any of the interferograms will not have an effect.

Have you fixed it? I encountered the same error and do not know how to solve it.

Hi,I wonder how did you solve the problem in step 2 ( ps_est_gamma_quick )? I encounter the same problem.

Actually that problem occured in IW2 of my data . These results are for IW3. I have increased number of S1 images initially I was working on 4 interferograms now I have 11 of them. i will again process IW2 and update in forum if that error occurs again.

Hello @ABraun, I have done atmospheric correction using linear method described in TRAIN manual and I am getting following results:



These results are exactly the same as what I got without atmospheric correction. Does it mean that atmospheric correction isn’t done properly or deformation maps(before atmospheric correction) were not varying due to atmospheric error?
Secondly, I tried to implement atmospheric correction using GACOS method described in TRAIN manual and I am getting following error:

although when I run ‘time = str2num(UTC_sat(1:2)) + str2num(UTC_sat(4:5))/60;’ individually in command window it executes without any error.
Can you guide me about how to overcome this error ? or tell me some other person to contact with regarding this error?

@mdelgado Sir can you help me with the problem I described in my above post?

sorry but I have never used gacos correction in APS.

However, I believe that you should use StaMPS 4.b1 instead of StaMPS 3.

I haven’t used TRAIN or GACOS so far, sorry.

I am already using StaMPS4.b1

Sir have you used linear method for atmospheric correction? my results before and atmospheric correction with linear method are same. What could be the reason? Does that mean there was no as such atmospheric noise in the scene ? or I have done something wrong (or something is missing) while implementing linear method?

Yes, I did used the linear method.

I suggest you to plot the APS using the proper command.
Last time it happened that to me that was an error i did, as the heights were not taken properly.

Pretty much sure you are doing something wrong.

Sir, Thank you for your reply. Can you please tell me that at which step I am getting mistaken ? My processing steps are as under:

  1. To implement atmospheric correction using linear method I just used one following command after step 8 of StaMPS:
    aps_linear

  2. I am using following commands to plot the output:
    ps_plot(‘v-dao’,‘a_linear’)
    ps_plot(‘u-dao’,‘a_linear’)

  3. When I plot atmosphere using ps_plot(‘a’,‘a_linear’), I get following plot


    Doesn’t this plot mean that there exists atmospheric noise in scene. If this noise exists then why the plots before and after atmospheric correction are same?

You should apply aps_linear after first step 6, not step 8. Please check ti

Sir I have one more question since my results are still same as before aps_linear. According to my analysis there could be three reasons for that and they are:

  1. because atmospheric noise’s phase has very small value (-0.014 to 0.0209 rad) as compared to unwrapped phase’s value(-5.5 to 4.9 rad)
  2. because I ran step 6 after step 8 . I don’t know how steps 7,8 can be undone
  3. because I ran all stamps steps with default parameters

Moreover, you suggested me that heights might not have been taken properly. How can I verify that heights are taken properly or not?

That was before looking at your previous plot. Please plot the dem and check them along.
Best

sir when I have plotted DEM and deformation map together as below:


Since DEM is bare earth’s elevation model so is it possible that DEM can show more subsidence and uplift as compared to deformation map? because it is showing so in my case. I suppose that heights are not taken properly. Is my analysis alright or I have comprehended it wrong? and If this actually depicts that heights are not taken properly than how can it be corrected?

@mdelgado sir I have two more questions:

  1. I haven’t performed Goldstein filtering before StaMPS . Will applying it improve the deformation results?
  2. The atmospheric noise as plotted by psplot(‘a’,‘a_linear’) shows following plot

    Which shows noise value in an arc sort of shape while same arc is shown on USGS EarthExplorer as follows:

    I can’t comprehend the correlation among both of them. Can you please tell me that usgs earth explorer is showing this place as a heightened place? If it actually is heightened place then why atmospheric noise exists only in this place?

You should not apply any Goldstain or any other filtering to apply PSI.

Not sure what you mean with 2

Hi, so far I have been using Stamps 4.1 without problems, without having to modify the script as suggested by @mdelgado
Currently I intend to analyze the collapse of the Miami building.
however in matlab, it gives me the error in step 2:

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

STAMPS: Will process patch subdirectories

STAMPS: ########################################
STAMPS: ################ Step 1 ################
STAMPS: ########################################
STAMPS: Directory is PATCH_1

PS_LOAD_INITIAL_GAMMA: Starting
PS_LOAD_INITIAL_GAMMA: Loading data into matlab…

master_master_flag =

'0'

READPARM: heading:=349.8209213366051
SETPARM: heading = 349.8209
READPARM: radar_frequency:=5.40500045433435E9
SETPARM: lambda = 0.055466
READPARM: sensor:=SENTINEL-1A
SETPARM: platform = SENTINEL-1A
READPARM: range_pixel_spacing:=2
READPARM: near_range_slc:=911404.8040852313
READPARM: sar_to_earth_center:=7072918.794501455
READPARM: earth_radius_below_sensor:=6369393.645448372
READPARM: center_range_slc:=911404.8040852313
READPARM: azimuth_lines:=1168
READPARM: prf:=1717.128973878037
READPARM: initial_baseline(TCN):=0.0000000 91.45382308959961 -37.208892822265625
READPARM: initial_baseline_rate:=0.0000000 0.32542833803041493 -0.3541218021721839
READPARM: initial_baseline(TCN):=0.0000000 -10.408884048461914 -47.74046516418457
READPARM: initial_baseline_rate:=0.0000000 0.35022359973743067 -0.34687546762464405
READPARM: initial_baseline(TCN):=0.0000000 84.73677444458008 -32.34070014953613
READPARM: initial_baseline_rate:=0.0000000 0.26148546958303 -0.3758720317397416
READPARM: initial_baseline(TCN):=0.0000000 12.35241413116455 -56.82339859008789
READPARM: initial_baseline_rate:=0.0000000 0.43819556051480646 -0.4768548395203686
READPARM: initial_baseline(TCN):=0.0000000 -22.084897994995117 -47.33003807067871
READPARM: initial_baseline_rate:=0.0000000 0.6515021667447704 -0.3846731568912075
READPARM: initial_baseline(TCN):=0.0000000 -90.50422286987305 -35.44691467285156
READPARM: initial_baseline_rate:=0.0000000 0.07825592274345519 -0.36824401574430654
READPARM: initial_baseline(TCN):=0.0000000 -17.564284324645996 -59.71782684326172
READPARM: initial_baseline_rate:=0.0000000 0.37021135908970754 -0.2894604745287609
READPARM: initial_baseline(TCN):=0.0000000 72.2780990600586 -34.059722900390625
READPARM: initial_baseline_rate:=0.0000000 0.39486068377252803 -0.22557373570606637
READPARM: initial_baseline(TCN):=0.0000000 -89.05400466918945 -27.280750274658203
READPARM: initial_baseline_rate:=0.0000000 0.19819370478205442 -0.13926321181952853
READPARM: initial_baseline(TCN):=0.0000000 -52.01198387145996 -12.436780452728271
READPARM: initial_baseline_rate:=0.0000000 -0.027026414288461968 -0.10388330613650716
READPARM: initial_baseline(TCN):=0.0000000 -39.39015579223633 -6.584448337554932
READPARM: initial_baseline_rate:=0.0000000 0.2649093766891487 -0.08037341283490322
READPARM: initial_baseline(TCN):=0.0000000 121.29307174682617 -3.4494776725769043
READPARM: initial_baseline_rate:=0.0000000 0.502506078003914 -0.052532417368120796
READPARM: initial_baseline(TCN):=0.0000000 36.85142135620117 -0.9310721158981323
READPARM: initial_baseline_rate:=0.0000000 0.32860527478789564 -0.029999179536131057
READPARM: initial_baseline(TCN):=0.0000000 49.73577690124512 -0.4019928425550461
READPARM: initial_baseline_rate:=0.0000000 -0.0031488719451354444 7.591970252079148E-4
READPARM: initial_baseline(TCN):=0.0000000 19.475311279296875 5.642600059509277
READPARM: initial_baseline_rate:=0.0000000 0.2894997652660442 -0.40103213600724535
READPARM: initial_baseline(TCN):=0.0000000 19.62454605102539 4.170413255691528
READPARM: initial_baseline_rate:=0.0000000 0.3500748562320009 -0.32328488798754756
READPARM: initial_baseline(TCN):=0.0000000 21.52863597869873 -0.11720381677150726
READPARM: initial_baseline_rate:=0.0000000 -0.02989744459137958 -0.11916950780064842
READPARM: initial_baseline(TCN):=0.0000000 27.93196392059326 0.4520964026451111
READPARM: initial_baseline_rate:=0.0000000 -0.23097621208252425 -0.1920434765616732
READPARM: initial_baseline(TCN):=0.0000000 69.47371292114258 -2.612198233604431
READPARM: initial_baseline_rate:=0.0000000 -0.07239598992576998 -0.277109501425777
Rotating by -169.8209 degrees
PS_LOAD_INITIAL_GAMMA: Finished
STAMPS: Finished

stamps(2,2)

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

STAMPS: Will process patch subdirectories
psver currently: 1
psver now set to: 1

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=40
GETPARM: filter_weighting=‘P-square’
GETPARM: clap_win=16
GETPARM: clap_low_pass_wavelength=800
GETPARM: clap_alpha=1
GETPARM: clap_beta=0.3
GETPARM: max_topo_err=10
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.093774
PS_EST_GAMMA_QUICK: Initialising random distribution…
PS_EST_GAMMA_QUICK: 2173058 PS candidates to process
PS_EST_GAMMA_QUICK: iteration #1
PS_EST_GAMMA_QUICK: Calculating patch phases…
Index in position 1 is invalid. Array indices must be positive integers or logical values.

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);

How can i solve it? or what is this problem due to?