Prepare Stack to Stamps with TerrasarX data (ISCE)

Dear
I’m trying to prepare stack with stripmapp to STAMPS with https://github.com/isce-framework/isce2/blob/master/contrib/stack/stripmapStack/README.md

But in the case of Sentinel then I run make_single… in the case of TerrasarX what are the steps to prepare after run_files??

Thanks
Pedro

Maybe it is worth directly asking this in the ISCE forum: http://earthdef.caltech.edu/projects/isce_forum/boards/4

1 Like

Here are the steps I took to prepare StripmapStack (ISCE) to Stamps PS using TerraSARX data.

However, I received an error in Step 1 of StaMPS…

  1.   In ISCE prep_TSX.py then stackStripMap.py processing with workflow  –W slc:
    
            i.          !stackStripMap.py -s /home/toni/WCF_TerraSARX_processing/scenes/HS_021/SLC/ -d /home/toni/WCF_TerraSARX_processing/scenes/HS_021/DEM/demLat*.dem.wgs84 -t 44 -a 2 -r 2 -u snaphu -W slc --nofocus --zero
    
            ii.         Ran all files run_files 1-7 using: !run_files/run_0*
    
  2.  In terminal StaMPS processing dir:
    
            i.          $ make_single_reference_stack_isce  input_file
    

Input_file:
source_data slc_stack
slc_stack_path /home/toni/WCF_TerraSARX_processing/scenes/HS_021/merged/SLC/
slc_stack_reference 20161118
slc_stack_geom_path /home/toni/WCF_TerraSARX_processing/scenes/HS_021/merged/geom_reference/
slc_stack_baseline_path /home/toni/WCF_TerraSARX_processing/scenes/HS_021/merged/baselines/
maskfile /home/toni//WCF_TerraSARX_processing/scenes/HS_021/merged/geom_reference/shadowMask.rdr
range_looks 2
azimuth_looks 2
aspect_ratio 4
lambda 0.056
slc_suffix
geom_suffix

          ii.          $ cd INSAR_20161118/

          iii.          $ mt_prep_isce 0.4

          iv.          $ matlab
  1.  In Matlab command window: >> stamps
    
           i.          After running stamps it goes to the PATCH_1 dir /home/toni/WCF_TerraSARX_processing/scenes/HS_021/StaMPS/INSAR_20161118/PATCH_1
    
           ii.          Then error message:
    

STAMPS: Will process patch subdirectories

STAMPS: ########################################

STAMPS: ################ Step 1 ################

STAMPS: ########################################

STAMPS: Directory is PATCH_1

Found inc angle file, will load the data

Loading data into Matlab…

SETPARM: heading = -169.7074

SETPARM: lambda = 0.056

Index in position 1 exceeds array bounds.

Error in llh2local (line 39)

z=llh(2,:)~=0;

Error in ps_load_initial_isce (line 171)

xy=llh2local(lonlat’,ll0)*1000;

Error in stamps (line 281)

                ps_load_initial_isce(data_inc) 

Has anyone ever received this error message? Any idea how to address it?
I have attached the directory layout.
I’ve realized that the selpsc_patch.c script is producing empty pscands.1.ij and pscands.1.da files which in return makes the pscands.1.hgt , pscands.1.ll, and pscands.1.ph


pscands.1.ph
files empty. Any help will be appreciated!

I am also getting the same error. One more things we experienced which is - while using StaMPS-4.1-beta version, then there is no load.isce.m file under StaMPS-4.1-beta/matlab. So if we process stamps(1,1), then load_isce error is also coming. If we are using StaMPS-master version, where load_isce.m file is there but the above error related to ps_load_initial_isce(data_inc) is coming. Do you get the solution of these errors. If yes, kindly help me also.

Thanks
Hari Shankar

Hi I still haven’t solved this problem as yet!

@hariiirs Are you also using TerraSARX data? I tried with Sentinel and still received the same error.

Hi

I have not tried for TerraSAR data. I am only trying Sentinel-1 data.

I noticed that outside of the empty pscands.* files I was also seeing a Segmentation Fault (core dumped) error message while running mt_prep_isce
I referenced this snap forum to address this:

Solved by
Installing g+±7 and gcc-7 (just incase, to make sure both are present)
Changing the compiler from CC = g++ to CC = g+±7 in the StaMPS_master/src/Makefile
cd StaMPS_master/src
make
make install

my PATCH_* pscands.* files are no longer empty

1 Like

Dear @tonianr
I would be very much appreciated if you let me know which of StaMPS_Config.bash’s items are necessary to ISCE/StaMPS combination:

export STAMPS="/home/user/StaMPS-4.1"
#export SAR="/home/ahooper/software/ROI_PAC_3_0"
#export GETORB_BIN="/home/ahooper/software/getorb/bin"
#export SAR_ODR_DIR="/home/ahooper/software/SAR_FILES/ODR"
#export SAR_PRC_DIR “/home/ahooper/software/SAR_FILES/PRC”
#export VOR_DIR="/home/ahooper/software/SAR_FILES/VOR"
#export INS_DIR="/home/ahooper/software/SAR_FILES/INS"
export TRIANGLE_BIN="/home/user/software/triangle/bin"
export TRAIN_BIN="/home/user/software/TRAIN/bin"
export SNAPHU_BIN="/home/user/software/snaphu-v2.0.4/bin"

Hello Peyman,

Here’s my complete .bash file:

Paths variables like VOR_DIR & INS_DIR don’t seem to be necessary for my processing, so they weren’t edited.

export STAMPS=/home/toni/StaMPS-master
export SAR=/home/toni/StaMPS-master/ROI_PAC_SCR
export GETORB_BIN=/home/ahooper/software/getorb/bin
export SAR_ODR_DIR=/home/ahooper/software/SAR_FILES/ODR
#export SAR_PRC_DIR=/home/ahooper/software/SAR_FILES/PRC
export VOR_DIR=/home/ahooper/software/SAR_FILES/VOR
export INS_DIR=/home/ahooper/software/SAR_FILES/INS
export DORIS_BIN=/home/ahooper/software/doris_v4.02/bin
export TRIANGLE_BIN=/home/toni/triangle/bin
export SNAPHU_BIN=/home/toni/snaphu-v2.0.4/bin
export ISCE_CONTRIB_BIN=/home/toni/.conda/envs/isce2/share/isce2/prepStackToStaMPS/bin
export ISCE_APP=/home/toni/.conda/envs/isce2/lib/python3.8/site-packages/isce/applications
export MATLAB_COMMAND=/usr/local/MATLAB/R2020b/bin
export ANACONDA_PATH=/opt/anaconda3/bin

export ROI_PAC="$SAR/ROI_PAC"
#####################################

ROI_PAC VERSION 3

#####################################
export INT_BIN="$ROI_PAC/INT_BIN"
export INT_SCR="$ROI_PAC/INT_SCR"
#####################################

#####################################

ROI_PAC VERSION 2.3 and before

#####################################
#set MACH=uname -s
#if ($MACH == “HP-UX”) then

export ARCHC=HP

#else if ($MACH == “IRIX”) then

export ARCHC=SGI

#else if ($MACH == “SunOS”) then

export ARCHC=SUN

#else if ($MACH == “Linux”) then

export ARCHC=LIN

#else if ($MACH == “Darwin”) then

export ARCHC=MAC

#fi
#export INT_LIB="$ROI_PAC/LIB/$ARCHC"
#export INT_BIN="$ROI_PAC/BIN/$ARCHC"
#export FFTW_LIB="$SAR/FFTW/$ARCHC""_fftw_lib"
#####################################

#####################################

shouldn’t need to change below here

#####################################

export MY_BIN="$INT_BIN"
export MATLABPATH=$STAMPS/matlab:echo $MATLABPATH
export DORIS_SCR="$STAMPS/DORIS_SCR"

Needed for ROI_PAC (a bit different to standard)

use points not commas for decimals, and give dates in US english

export LC_NUMERIC=“en_US.UTF-8”
export LC_TIME=“en_US.UTF-8”

export MY_SAR="$SAR"
export OUR_SCR="$MY_SAR/OUR_SCR"
export MY_SCR="$STAMPS/ROI_PAC_SCR"

export SAR_TAPE="/dev/rmt/0mn"

export PATH=${PATH}:$STAMPS/bin:$MY_SCR:$INT_BIN:$INT_SCR:$OUR_SCR:$DORIS_SCR:$GETORB_BIN:$DORIS_BIN:$TRIANGLE_BIN:$SNAPHU_BIN:$ISCE_CONTRIB_BIN:$MATLAB_COMMAND:$MATLABPATH:$ANACONDA_PATH:$ISCE_APP

1 Like

@tonianr
Thanks a bunch, it was very helpful.

1 Like

had the same problem with sentry 1.2 in data processing 5 and stamps4 1-b.1. Execute MT_ extract_ info_ isce , And execute MT_ prep_ “Error using exit function or variable settings cannot be recognized” 2 When I perform stamps (1, 1), it shows that pscands, 1, ij cannot be found. I would appreciate it if you could ask me for a solution.

Hi - if you’re processing isce to StaMPS the steps after stacking in isce with stackStripMap.py or stackSentinel.py are:
e.g:
>> make_single_reference_stack_isce input_file
then
>> mt_prep_isce 0.4 6 5 50 200

for mt_prep_isce suggestions use mt_prep_suggestions(‘n’) for ps processing

mt_prep_isce runs mt_extract_info_isce so I don’t believe that you will need to run it separately also I’m not familiar with the sentry data type!

Dear Tonianr, I did my ISCE possessing but i don’t know how can I start my stamps can you help me?

Hi -
Here’s a link to the steps: https://aria.atlassian.net/wiki/spaces/ARIA/pages/18317313/Displacement+Time+Series+using+Persistent+Scatterers

Dear Toninar, thanks for your guide but I couldn’t find how to find the ‘slc_stack’ directory? I don’t have it.

another question that I have is, in which directory i should make input_file?

Hi your SLC stack is the full path of

“merged/SLC/”

Your input_file should be in the INSAR_YYYYMMDD directory!

Here’s an example of my input file for stripmapdtack to stamps processing:

	input_file example (no file ext)
		source_data slc_stack
		slc_stack_path /home/toni/WCF_TerraSARX_processing/scenes/HS_021/merged/SLC/
		slc_stack_reference 20170513
		slc_stack_geom_path /home/toni/WCF_TerraSARX_processing/scenes/HS_021/merged/geom_reference/
		slc_stack_baseline_path /home/toni/WCF_TerraSARX_processing/scenes/HS_021/merged/baselines/
		maskfile /home/toni/WCF_TerraSARX_processing/scenes/HS_021/merged/geom_reference/shadowMask.rdr
		range_looks 2
		azimuth_looks 2
		aspect_ratio 1
		lambda 0.031
		slc_suffix

geom_suffix

Looks like you need to fully activate your isce2 environment and source the stamps .bash script.

cd INSAR_YYYYMMDD

And run

make_single_reference_stack_isce

Hi, how did you download orbital parameters for terrasar-x?