Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiCSBAS13_sb_inv.py (IndexError: index 0 is out of bounds for axis 0 with size 0) #328

Closed
marchelgamaliel opened this issue Feb 15, 2024 · 5 comments

Comments

@marchelgamaliel
Copy link

LiCSBAS13_sb_inv.py ver1.5.2 20210311 Y. Morishita
LiCSBAS13_sb_inv.py -d GEOCml1GACOSclip

In geographical coordinates

Not enough memory available compared to mem_size (8000 MB).
Reduce mem_size automatically to 583 MB.
Read cum data on memory (fast but need memory).

Size of image (w,l)    : 261, 291
# of all images        : 78
# of images to be used : 56
# of all ifgs          : 305
# of ifgs to be used   : 42
# of removed ifgs      : 263
Threshold of used unw  : 56

Reference area (X/Y)   : 1:2/35:36
Allowed memory size    : 583 MB
Number of patches      : 1
Inversion algorism     : LS
Gamma value            : 0.0001

Process 291/291th line (1/1th patch)...
  Reading 42 ifg's unw data...
  75951/75951 points removed due to not enough ifg data...
  Elapsed time for 1th patch: 00h 00m 14s

Find stable reference point...
/home/LiCSBAS2/bin/LiCSBAS13_sb_inv.py:772: RuntimeWarning: All-NaN slice encountered
  sumsq_cum_wrt_med = sumsq_cum_wrt_med + (cum[i, :, :]-np.nanmedian(cum[i, :, :]))**2
/home/LiCSBAS2/bin/LiCSBAS13_sb_inv.py:777: RuntimeWarning: All-NaN slice encountered
  min_n_gap = np.nanmin(n_gap)
/home/LiCSBAS2/bin/LiCSBAS13_sb_inv.py:783: RuntimeWarning: All-NaN slice encountered
  min_rms = np.nanmin(rms_cum_wrt_med)
Traceback (most recent call last):
  File "/home/LiCSBAS2/bin/LiCSBAS13_sb_inv.py", line 996, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/LiCSBAS2/bin/LiCSBAS13_sb_inv.py", line 785, in main
    refy1s, refx1s = refy1s[0], refx1s[0] ## Only first index
                     ~~~~~~^^^
IndexError: index 0 is out of bounds for axis 0 with size 0
@marchelgamaliel
Copy link
Author

Python version: 3.12.1
  OK

Check required modues and versions
  astropy(5.3.4) OK
  bs4(4.12.2) OK
  h5py(3.9.0) OK
  matplotlib(3.8.0) OK
  numpy(1.26.3) OK
  psutil(5.9.0) OK
  requests(2.31.0) OK
  statsmodels(0.14.0) OK
  gdal(3.6.2) OK

Check LiCSBAS commands
  OK

Check LiCSBAS library
  OK

LiCSBAS install is OK

@yumorishita
Copy link
Owner

#244 (comment)

@yumorishita
Copy link
Owner

#244 (comment)

thank you sir for your response, can you give me some explanation of the variable p11_unw_thre, p11_coh_thre, and/or p12_loop_thre?

Please upload the full log file including step11 and step12.

@ajisugiantoro123
Copy link

Hello Prof, I also have the same problem. Can you help me, please? Here is my code and log error.

LiCSBAS11_check_unw.py ver1.3.3 20210402 Y. Morishita
LiCSBAS11_check_unw.py -d GEOCml1GACOSmaskclip -u 0.05

coh_thre : 0.05
unw_cov_thre : 0.05

Size : 2105 x 1930

Reading unw and cc data...
0/ 36th unw to identify valid area...
0/ 36th cc and unw...

0/36 ifgs are discarded from further processing.
ifg dates unw_cov coh_av

Check network/, 11bad_ifg_ras/ and 11ifg_ras/* in TS dir.
If you want to change the bad ifgs to be discarded, re-run with different thresholds or make a ifg list and indicate it by --rm_ifg_list option in the next step.

Elapsed time: 00h 00m 01s

LiCSBAS11_check_unw.py Successfully finished!!

Output directory: TS_GEOCml1GACOSmaskclip

LiCSBAS12_loop_closure.py ver1.6.2 20230822 Y. Morishita
LiCSBAS12_loop_closure.py -d GEOCml1GACOSmaskclip -l 1 --multi_prime

loop_thre : 1.0 rad

1st Loop closure check and make png for all possible 46 loops,
with 16 parallel processing...
0/ 46th loop...

2nd Loop closure check without bad ifgs to define ref area...
with 16 parallel processing...
0/ 46th loop...
/mnt/HDD_8TB/skripsi20/aji/ascending/LiCSBAS2/bin/LiCSBAS12_loop_closure.py:396: RuntimeWarning: All-NaN slice encountered
refyx = np.where(loop_ph_rms_points_masked==np.nanmin(loop_ph_rms_points_masked))
Traceback (most recent call last):
File "/mnt/HDD_8TB/skripsi20/aji/ascending/LiCSBAS2/bin/LiCSBAS12_loop_closure.py", line 890, in
sys.exit(main())
File "/mnt/HDD_8TB/skripsi20/aji/ascending/LiCSBAS2/bin/LiCSBAS12_loop_closure.py", line 397, in main
refy1 = refyx[0][0] # start from 0, not 1
IndexError: index 0 is out of bounds for axis 0 with size 0

@yumorishita
Copy link
Owner

#244 (comment)

The cause of the error is

  • The number of interferograms is too small
  • Too many unwrapping errors are included

Try

  • change p11_unw_thre, p11_coh_thre, and/or p12_loop_thre
  • crop the area by step05
  • improve unwrapping quality and/or increase unwrapped data if you created them manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants