comet-licsar / licsbas_dev_obsolete

GNU General Public License v3.0
10 stars 3 forks source link

ValueError: zero-size array to reduction operation maximum which has no identity #4

Open nganji1993 opened 1 year ago

nganji1993 commented 1 year ago

Hi I'm trying to execute this codes! First of all I execute LiCSBAS01_get_geotiff.py as follows: LiCSBAS01_get_geotiff.py -f 028A_05385_191813 -s 20141019 -e 20220721 and as output directory I use a external HDD. Output for this command is:

LiCSBAS01_get_geotiff.py ver1.6.3 20201207 Y. Morishita
LiCSBAS01_get_geotiff.py -f 028A_05385_191813 -s 20141019 -e 20220721

Frame ID is 028A_05385_191813

028A_05385_191813.geo.E.tif already exist. Skip download.
028A_05385_191813.geo.N.tif already exist. Skip download.
028A_05385_191813.geo.U.tif already exist. Skip download.
028A_05385_191813.geo.hgt.tif already exist. Skip download.

Download baselines
    baselines, 6.18KB, 1s, 6.18KB/s
Download network.png
    network.png, 1.18MB, 7s, 173.28KB/s
Download metadata.txt
    metadata.txt, 193.0B, 1s, 193.0B/s

028A_05385_191813.geo.mli.tif already exist. Skip.

Download geotiff of unw and cc
1216 IFGs available from 20141019 to 20220721
Checking existing unw and cc (4 parallel, may take time)...
1216 unw already downloaded
0 unw will be downloaded
1216 cc already downloaded
0 cc will be downloaded

Elapsed time: 00h 12m 45s

LiCSBAS01_get_geotiff.py Successfully finished!!

Output directory: /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOC

It seems to be fine! for the second step I run this: LiCSBAS02_ml_prep.py -i /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOC -o /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1 -n 1

and the output is:


LiCSBAS02_ml_prep.py ver1.7.4 20201119 Y. Morishita
LiCSBAS02_ml_prep.py -i /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOC -o /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1 -n 1

Create E.geo
  E.geo created

Create N.geo
  N.geo created

Create U.geo
  U.geo created

Create slc.mli
  slc.mli[.png] created

Create hgt
  hgt[.png] created

Create unw and cc
  1249/1249 unw and cc already exist. Skip

Copy baselines file
ERROR: bperp for 20210127 not found! using just zero
ERROR: bperp for 20210208 not found! using just zero
ERROR: bperp for 20210503 not found! using just zero

Elapsed time: 00h 00m 05s

LiCSBAS02_ml_prep.py Successfully finished!!

Output directory: ../../../../../media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1

Finally I run this command: LiCSBAS03op_GACOS.py -i /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1 -o /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1GACOS -g /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GACOS

and here is the error:


LiCSBAS03op_GACOS.py ver1.5.5 20201119 Y. Morishita
LiCSBAS03op_GACOS.py -i /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1 -o /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1GACOS -g /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GACOS

Convert ztd/sltd.geo.tif files to sltd.geo files...
  193/196 sltd already exist. Skip
  3 parallel processing...
  Finished    0/   3th sltd...
    No 20220627.ztd|ztd.tif|sltd.geo.tif! Skip.
    No 20220709.ztd|ztd.tif|sltd.geo.tif! Skip.
    No 20220721.ztd|ztd.tif|sltd.geo.tif! Skip.

Correct unw data...
  1241/1249 corrected unw already exist. Skip
  8 parallel processing...
  Finished    0/   8th unw...
  ztd file not available for 20210912_20220627
  ztd file not available for 20210924_20220627
  ztd file not available for 20211006_20220709
  ztd file not available for 20211006_20220721
  ztd file not available for 20211018_20220709
  ztd file not available for 20211018_20220721
  ztd file not available for 20211030_20220709
  ztd file not available for 20211030_20220721

Traceback (most recent call last):
  File "/home/ava/Desktop/newLicsbas/licsbas/bin/LiCSBAS03op_GACOS.py", line 550, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/ava/Desktop/newLicsbas/licsbas/bin/LiCSBAS03op_GACOS.py", line 369, in main
    plot_lib.plot_gacos_info(gacinfofile, pngfile)
  File "/home/ava/Desktop/newLicsbas/licsbas/LiCSBAS_lib/LiCSBAS_plot_lib.py", line 147, in plot_gacos_info
    xylim1 = np.max(np.concatenate((std_bf, std_af)))+1
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<__array_function__ internals>", line 180, in amax
  File "/home/ava/.pyenv/versions/miniconda3-latest/envs/licsbas2/lib/python3.11/site-packages/numpy/core/fromnumeric.py", line 2793, in amax
    return _wrapreduction(a, np.maximum, 'max', axis, None, out,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ava/.pyenv/versions/miniconda3-latest/envs/licsbas2/lib/python3.11/site-packages/numpy/core/fromnumeric.py", line 86, in _wrapreduction
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: zero-size array to reduction operation maximum which has no identity

Can anyone help why this error happens?

Thanks.

espiritocz commented 1 year ago

hi, indeed, this might be something we can improve. can you please try following, to check if the problem is only related to the missing GACOS corrections?

will it work this time? cheers!

Osmanpour commented 1 year ago

hi, i deleted data releted the epochs : --rm GEOC/20220627 GEOC/20220709 GEOC*/20220721

--run LiCSBAS03op_GACOS.py again and the out put was:

licsbas2) (miniconda3-latest) ava@asus:~/Desktop/newLicsbas/licsbas$ LiCSBAS03op_GACOS.py -i /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1 -o /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1GACOS -g /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GACOS

LiCSBAS03op_GACOS.py ver1.5.5 20201119 Y. Morishita LiCSBAS03op_GACOS.py -i /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1 -o /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1GACOS -g /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GACOS

Convert ztd/sltd.geo.tif files to sltd.geo files... 193/196 sltd already exist. Skip 3 parallel processing... Finished 0/ 3th sltd... No 20220709.ztd|ztd.tif|sltd.geo.tif! Skip. No 20220627.ztd|ztd.tif|sltd.geo.tif! Skip. No 20220721.ztd|ztd.tif|sltd.geo.tif! Skip.

Correct unw data... 1241/1258 corrected unw already exist. Skip 8 parallel processing... Finished 0/ 17th unw... ztd file not available for 20210924_20220627 ztd file not available for 20210912_20220627 ztd file not available for 20211006_20220709 ztd file not available for 20211006_20220721 ztd file not available for 20211018_20220709 ztd file not available for 20220522_20220627 ztd file not available for 20220510_20220627 ztd file not available for 20211018_20220721 Finished 10/ 17th unw... ztd file not available for 20211030_20220709 ztd file not available for 20220522_20220709 ztd file not available for 20211030_20220721 ztd file not available for 20220603_20220627 ztd file not available for 20220603_20220721 ztd file not available for 20220603_20220709 ztd file not available for 20220615_20220627 ztd file not available for 20220615_20220709 ztd file not available for 20220615_20220721

Traceback (most recent call last): File "/home/ava/Desktop/newLicsbas/licsbas/bin/LiCSBAS03op_GACOS.py", line 550, in sys.exit(main()) ^^^^^^ File "/home/ava/Desktop/newLicsbas/licsbas/bin/LiCSBAS03op_GACOS.py", line 369, in main plot_lib.plot_gacos_info(gacinfofile, pngfile) File "/home/ava/Desktop/newLicsbas/licsbas/LiCSBAS_lib/LiCSBAS_plot_lib.py", line 147, in plot_gacos_info xylim1 = np.max(np.concatenate((std_bf, std_af)))+1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<__array_function__ internals>", line 180, in amax File "/home/ava/.pyenv/versions/miniconda3-latest/envs/licsbas2/lib/python3.11/site-packages/numpy/core/fromnumeric.py", line 2793, in amax return _wrapreduction(a, np.maximum, 'max', axis, None, out, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ava/.pyenv/versions/miniconda3-latest/envs/licsbas2/lib/python3.11/site-packages/numpy/core/fromnumeric.py", line 86, in _wrapreduction return ufunc.reduce(obj, axis, dtype, out, **passkwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: zero-size array to reduction operation maximum which has no identity

Osmanpour commented 1 year ago

and then deleted other epochs in this error

then run it:

error was shown again :

**_-------LiCSBAS03op_GACOS.py -i /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1 -o /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1GACOS -g /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GACOS

LiCSBAS03op_GACOS.py ver1.5.5 20201119 Y. Morishita LiCSBAS03op_GACOS.py -i /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1 -o /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GEOCml1GACOS -g /media/ava/book/comet_licsbas/licsbas/028A_05385_191813/GACOS

Convert ztd/sltd.geo.tif files to sltd.geo files... 193/193 sltd already exist. Skip

Correct unw data... 1241/1241 corrected unw already exist. Skip

Traceback (most recent call last): File "/home/ava/Desktop/newLicsbas/licsbas/bin/LiCSBAS03op_GACOS.py", line 550, in sys.exit(main()) ^^^^^^ File "/home/ava/Desktop/newLicsbas/licsbas/bin/LiCSBAS03op_GACOS.py", line 369, in main plot_lib.plot_gacos_info(gacinfofile, pngfile) File "/home/ava/Desktop/newLicsbas/licsbas/LiCSBAS_lib/LiCSBAS_plot_lib.py", line 147, in plot_gacos_info xylim1 = np.max(np.concatenate((std_bf, std_af)))+1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<__array_function__ internals>", line 180, in amax File "/home/ava/.pyenv/versions/miniconda3-latest/envs/licsbas2/lib/python3.11/site-packages/numpy/core/fromnumeric.py", line 2793, in amax return _wrapreduction(a, np.maximum, 'max', axis, None, out, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ava/.pyenv/versions/miniconda3-latest/envs/licsbas2/lib/python3.11/site-packages/numpy/core/fromnumeric.py", line 86, in wrapreduction return ufunc.reduce(obj, axis, dtype, out, **passkwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: zero-size array to reduction operation maximum which has no identity**

Osmanpour commented 1 year ago

and also like #154 I check the zise by ls -l GEOCml1//.unw, and solved the error RESHAPE AND RESIZE

and than run step LiCSBAS03op_GACOS.py , but doesn't work !!

ValueError: zero-size array to reduction operation maximum which has no identity**