General StaMPS questions

Hello all!

I’ve been reading/watching all tutorials, manuals, git pages and workshops and I can not find answers to the following questions:

  1. Phase sign convention. StaMPS performs the difference between master and slave, and if the master precedes the slave then a positive difference reflects a subsidence. If my master image is in the middle of my timeline, does StaMPS automatically change the phase sign in the before- or after-master interferograms? Or must it be observed by the user?

  2. Exported units. I am exporting .mat files through the -1 parameter in the ps_plot function. However, I am unsure of the velocity units, as the variable in the .mat file is called ph_mm (displacement in mm?). The mean velocity is written in the mean_v.mat file, but I am uncertain of the necessary conversion to obtain the mm/yr values.

I am using this to obtain the velocity in mm/yr:

data = loadmat(‘/INSAR_20250820/ps_plot_ts_v.mat’)
m = loadmat(‘/INSAR_20250820/mean_v.mat’)[‘m’]

lambda_w = data[‘lambda’]
v = -m[1,:] * 365.25 / (4*np.pi) * lambda_w * 1000
  1. Displacement. I am assuming the displacement is given by the unwrapped phase .mat file (variable ph_disp). Is each image’s displacement integrated since the image’s date to the master’s date? This is, does my first image displacement carry my second image’s displacement and so on until the master’s image? Is the only true displacement the one in the images right before and after the master image? So, for a time series, would I need to subtract the displacement of other images in order to obtain the true displacement for only that image?

  2. Standard deviation. Currently, the nanmean function is not part of the MATLAB Statistical Toolbox. This imposes an obstacle to the calculation of the standard deviation. Would anyone happen to have a solution?

  3. Displacement vs velocity. I have a script that first plots the velocity in a 2D map, followed by a plot of the same velocity along a transect of the map. Then I have a plot of the displacement along the same transect. However, the velocity and displacement have opposite signs, where the velocity points to a subsidence (negative velocity), the displacement exposes an uplift (positive displacement). Is this because of the sign convention: two different convections, one for the velocity and another for the rest of the variables?

  4. ps_plot. I have saved .mat files of (u-dm) and (v-da, a_gacos). But does the saved file actually contains the corrections? Or does it contain the original unwrapped phase and velocity?

Please let me know if I have not been clear enough. Thanks for your time and (hopefully) help!

Maria