StaMPS icon indicating copy to clipboard operation
StaMPS copied to clipboard

Empty pscands files --- Error in llh2local (line 39) z=llh(2,:)~=0; Error in ps_load_initial_isce (line 161) xy=llh2local(lonlat',ll0)*1000; Error in stamps (line 281) ps_load_initial_isce(data_inc)

Open tonianr opened this issue 2 years ago • 7 comments

Hello,

I am using ISCE ( stackStripMap ) to create StaMPS - PS Processing with TerraSAR-X datasets. With the following steps:

  1. !stackStripMap.py -s /home/toni/WCF_TerraSARX_processing/scenes/HS_044/SLC/ -d /home/toni/WCF_TerraSARX_processing/scenes/HS_044/DEM/demLat*.dem.wgs84 -t 120 -b 400 -a 1 -r 2 -m 20160627 -u snaphu -W slc --nofocus –zero

  2. Ran all files run_files 1-7 using: !run_files/run_0*

  3. In terminal StaMPS processing dir:

      $ make_single_reference_stack_isce  input_file
    
                              Input_file:
                              source_data slc_stack
                              slc_stack_path /home/toni/WCF_TerraSARX_processing/scenes/HS_044/merged/SLC/
                              slc_stack_reference 20170627
                              slc_stack_geom_path /home/toni/WCF_TerraSARX_processing/scenes/HS_044/merged/geom_reference/
                              slc_stack_baseline_path /home/toni/WCF_TerraSARX_processing/scenes/HS_044/merged/baselines/
                              maskfile /home/toni/WCF_TerraSARX_processing/scenes/HS_044/merged/geom_reference/shadowMask.rdr
                              azimuth_looks 1
                              range_looks 2
                              aspect_ratio 2
                              lambda 0.056
                              slc_suffix
                              geom_suffix
    
  4. $ cd INSAR_20170627/

  5. $ mt_prep_isce 0.4 2 1 50 50

  6. $ matlab a. >> stamps b. Error message at STEP 1 of StaMPS STAMPS: ######################################## STAMPS: ####### StaMPS/MTI Version 4.0b6 ####### STAMPS: ####### Beta version, Jun 2018 ####### STAMPS: ########################################

                                                  ans =
    
                                                       0
    
                                                  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 = -10.8843
                                                  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 161)
                                                  xy=llh2local(lonlat',ll0)*1000;
    
                                                  Error in stamps (line 281)
                                                                      ps_load_initial_isce(data_inc)
    

My selpsc_patch command produces empty pscands.1.ij and pscands.1.da files which in return makes the pscands.1.hgt, pscands.1.ll, and pscands.1.ph files empty (literally 0-bytes). The input files (selpsc.in, patch.in, maskfile) for the selpsc_patch are not empty. Any ideas why?

tonianr avatar Sep 08 '21 18:09 tonianr

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

tonianr avatar Oct 12 '21 18:10 tonianr

Had the some issue with segmentation fault. Compiled with g++-7 and it's gone. I am curious, how long does it takes you to run the mt_prep_isce. Mine is running for few hours, and not sure if it's doing soemthing.

mariosgeo avatar Oct 21 '21 15:10 mariosgeo

@mariosgeo -- Mine took about 1hr, I used a stack of 17 interferograms, my smallest stack, and I also increased my multi looking to -a 10 and -r 6 for stackstripmap. My study area is quite "small" ~10kmx6km. I also ran >> mt_prep_suggestion('n') in Matlab to get an estimation of the # of patches to use and used mt_prep_isce 0.4 3 3 50 50.

All of these, including the capabilities of my instrument, can affect how long your mt_prep_isce runs!

After running mt_prep_isce, you should see outputs in the terminal from selpsc_patch which includes the creation and filling of the PATCH_* directories (9 in my case) with pscands.* files.

tonianr avatar Oct 21 '21 15:10 tonianr

What a coincidence, I have recently encountered exactly the same problem, but have not found a solution. So I started learning matlab and reading the source code. It's been bothering me for more than three days, and it wasn't until tonight that I solved this tricky problem.

qgmeng1 avatar May 24 '22 15:05 qgmeng1

Firstly, for the character shown at the top ' ans =

                                               0

' It can be removed if you change the 'fclose(fid)' in the code "sb_load_initial_isce.m" in to 'fclose(fid);' , just add the " ; ". However, this is not a big problem.

qgmeng1 avatar May 24 '22 15:05 qgmeng1

Secondly, for the wrong ' Index in position 1 exceeds array bounds.

                                          Error in llh2local (line 39)
                                             z=llh(2,:)~=0;

' It is due to the fact that the contents of the file below the PATCH_* folder are empty, usually several PATCHes in the upper right corner and lower right corner of the image. Open "../SMALL_BASAELINES/patch.list", and edit this file and delete the PATCH_* which causes the error.

qgmeng1 avatar May 24 '22 15:05 qgmeng1

Thanks a lot!!! It helped me a lot !!!

Wi11iam21 avatar Mar 18 '24 09:03 Wi11iam21