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

bool error #307

Closed
RBasant opened this issue Nov 6, 2023 · 19 comments
Closed

bool error #307

RBasant opened this issue Nov 6, 2023 · 19 comments

Comments

@RBasant
Copy link

RBasant commented Nov 6, 2023

Hi,

Can you please assist with the below error?

LiCSBAS01_get_geotiff.py Successfully finished!!

Output directory: /home/srcgps/LiCSBAS/GEOC

LiCSBAS02_ml_prep.py ver1.7.4 20201119 Y. Morishita
LiCSBAS02_ml_prep.py -i GEOC -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
12 parallel processing...
0/498th IFG...
110/498th IFG...
100/498th IFG...
90/498th IFG...
80/498th IFG...
70/498th IFG...
60/498th IFG...
50/498th IFG...
40/498th IFG...
No 20210518_20210611.geo.cc.tif found. Skip
130/498th IFG...
30/498th IFG...
120/498th IFG...
20/498th IFG...
10/498th IFG...
220/498th IFG...
210/498th IFG...
200/498th IFG...
190/498th IFG...
180/498th IFG...
170/498th IFG...
160/498th IFG...
140/498th IFG...
150/498th IFG...
260/498th IFG...
250/498th IFG...
240/498th IFG...
230/498th IFG...
330/498th IFG...
320/498th IFG...
310/498th IFG...
300/498th IFG...
290/498th IFG...
270/498th IFG...
280/498th IFG...
390/498th IFG...
380/498th IFG...
370/498th IFG...
360/498th IFG...
350/498th IFG...
340/498th IFG...
440/498th IFG...
430/498th IFG...
420/498th IFG...
400/498th IFG...
410/498th IFG...
490/498th IFG...
480/498th IFG...
470/498th IFG...
460/498th IFG...
450/498th IFG...

Create slc.mli.par

Create EQA.dem_par

Copy baselines file

Elapsed time: 00h 03m 37s

LiCSBAS02_ml_prep.py Successfully finished!!

Output directory: GEOCml1

LiCSBAS04op_mask_unw.py ver1.3.5 20210105 Y. Morishita
LiCSBAS04op_mask_unw.py -i GEOCml1 -o GEOCml1mask -c 0.1
/home/srcgps/LiCSBAS/bin/LiCSBAS04op_mask_unw.py:176: FutureWarning: In the future np.bool will be defined as the corresponding NumPy scalar.
bool_mask = np.zeros((length, width), dtype=np.bool)
Traceback (most recent call last):
File "/home/srcgps/LiCSBAS/bin/LiCSBAS04op_mask_unw.py", line 326, in
sys.exit(main())
^^^^^^
File "/home/srcgps/LiCSBAS/bin/LiCSBAS04op_mask_unw.py", line 176, in main
bool_mask = np.zeros((length, width), dtype=np.bool)
^^^^^^^
File "/home/srcgps/miniconda3/envs/licsbas/lib/python3.11/site-packages/numpy/init.py", line 324, in getattr
raise AttributeError(former_attrs[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
np.bool was a deprecated alias for the builtin bool. To avoid this error in existing code, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'bool_'?

@yumorishita
Copy link
Owner

Please use LiCSBAS2 in which the bug was fixed (yumorishita/LiCSBAS2#22), apply the bug fix to your code yourself, or try downgrading numpy.

@RBasant
Copy link
Author

RBasant commented Nov 7, 2023

Thank you. I am using LiCSBAS2 now. However, I received the error:

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 "/home/srcgps/LiCSBAS2-master/bin/LiCSBAS12_loop_closure.py", line 890, in
sys.exit(main())
^^^^^^
File "/home/srcgps/LiCSBAS2-master/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

you suggested in an earlier comment to clip the data or remove bad ifs. I tired clipping but still got the same error. I also created a list with the list of bad_ifs (ls > bad_ifs.txt in 11ifg_ras folder) but still got the error. Can you please assist with the way forward? Below is the log file with bad_ifs.txt added to the batch_file processing.

[202311071146batch_LiCSBAS_05_16.log](https://github.com/yumorishita/LiCSBAS/files/13283112/202311071146batch_LiCSBAS_05_16.log)

@RBasant
Copy link
Author

RBasant commented Nov 7, 2023

@yumorishita
Copy link
Owner

Can you attach info/11ifg_stats.txt?

@RBasant
Copy link
Author

RBasant commented Nov 8, 2023

@yumorishita
Copy link
Owner

You said

I tired clipping but still got the same error.

but you did not according to the log. Please try clipping.

@RBasant
Copy link
Author

RBasant commented Nov 14, 2023

Hi,

I am attaching the logfile, 11ifg_stats.txt and the batch_licsBAS.sh files with the clip applied which still resulted in the Nan error described in an earlier comment. Any Advice would be much appreciated.

202311141509batch_LiCSBAS_01_16.log
11removed_image.txt
11ifg_stats.txt
11bad_ifg.txt

Thanks

@yumorishita
Copy link
Owner

I checked the real data in 164A_07620_000518 and found that most of the unwrapped data are not correctly masked. For example, in the attached image, the correlated area in the left top interferogram is correctly masked. However, the right top and the left bottom ones are not correctly masked. Recent interferograms (until July 2023) also have this issue. This unmasked unwrapped data is the root cause of the error in step12.

@espiritocz
I wonder if the unwrapping step in LiCSAR may have an issue. Could you check the data in 164A_07620_000518? The cropped area is -61.3/-61.1/13.1/13.4.

image

@yumorishita
Copy link
Owner

The images like above are contained in the 12loop directory.

@espiritocz
Copy link

hi. i can invite you to test the current version of reunwrapping that is implemented in LiCSBAS02to05_unwrap.py in https://github.com/comet-licsar/LiCSBAS/tree/dev (although it is already in the main branch, there were some changes in the dev branch), that is using lics_unwrap tool. This way you can try several parameters to improve the unwrapped data. see below as fast preview - the bottom row is different unwrapping mechanisms that can be tried.. (e.g. ML4 with some lower threshold for masking would give more pixels, although probably more loop closure errors)
inkscape_LRNjhk2irK

@sonyakkk
Copy link

sonyakkk commented Mar 4, 2024

Hi Mr. Yumorisitha
Can you please assist with the below error?

LiCSBAS11_check_unw.py ver1.3.3 20210402 Y. Morishita
LiCSBAS11_check_unw.py -d GEOCml1clip

coh_thre : 0.05
unw_cov_thre : 0.3

Size : 691 x 981

Reading unw and cc data...
0/1355th unw to identify valid area...
100/1355th unw to identify valid area...
200/1355th unw to identify valid area...
300/1355th unw to identify valid area...
400/1355th unw to identify valid area...
500/1355th unw to identify valid area...
600/1355th unw to identify valid area...
700/1355th unw to identify valid area...
800/1355th unw to identify valid area...
900/1355th unw to identify valid area...
1000/1355th unw to identify valid area...
1100/1355th unw to identify valid area...
1200/1355th unw to identify valid area...
1300/1355th unw to identify valid area...
0/1355th cc and unw...
Traceback (most recent call last):
File "/home/sonya/LiCSBAS2/bin/LiCSBAS11_check_unw.py", line 356, in
sys.exit(main())
^^^^^^
File "/home/sonya/LiCSBAS2/bin/LiCSBAS11_check_unw.py", line 230, in main
coh = io_lib.read_img(ccfile, length, width)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sonya/LiCSBAS2/LiCSBAS_lib/LiCSBAS_io_lib.py", line 199, in read_img
data = np.fromfile(file, dtype=dtype).reshape((length, width))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: cannot reshape array of size 128 into shape (981,691)

I have attached the logfile below, please help me sir
202403041717batch_LiCSBAS_01_16.log

@yumorishita
Copy link
Owner

Please check all the GEOCml1clip/*_*/*_*.cc files have the same size. If not, some files are corrupted.

@yumorishita
Copy link
Owner

Maybe you changed the clip area? If so, please remove GEOCml1clip and rerun from step05.

@sonyakkk
Copy link

sonyakkk commented Mar 5, 2024

Thank you for your response sir, I want to ask again. I experienced an error during processing. can you help me sir?

I have attached the log file below
202403052028batch_LiCSBAS_01_16.log

thanks sir

@yumorishita
Copy link
Owner

Maybe there was an network disruption. Please try again.

@sonyakkk
Copy link

Hi Mr. Yumorishita

I want to ask about my processing process. why does my processing stop as below?

Elapsed time: 00h 00m 06s

LiCSBAS15_mask_ts.py Successfully finished!!

Output png: TS_GEOCml1clipGACOS/mask_ts.png

LiCSBAS16_filt_ts.py ver1.6.0 20230116 Y. Morishita
LiCSBAS16_filt_ts.py -t TS_GEOCml1clipGACOS
No bperp field found in cum.h5. Skip.

Size of image (w,l) : 691, 981
Number of images : 129
Width of filter in space : 2 km (18.0x18.0 pixels)
Width of filter in time : 0.160 yr (58 days)
Deramp flag : []
hgt-linear flag : False

HP filter in time, LP filter in space,
with 12 parallel processing...
0/129th image...
30/129th image...
10/129th image...
20/129th image...
60/129th image...
40/129th image...
50/129th image...
70/129th image...
90/129th image...
100/129th image...
120/129th image...
110/129th image...

can you help me sir?

@yumorishita
Copy link
Owner

#244 (comment)

@sonyakkk
Copy link

Hi Mr Yumorishita
I got stuck during ascending processing, even though I have modified p16_n_para="1". could you help me to handle the problem?

Identifing gaps, and counting n_gap and n_ifg_noloop,
with 12 parallel processing...
Running 4/12th patch...
Running 7/12th patch...
Running 3/12th patch...
Running 11/12th patch...
Running 6/12th patch...
Running 10/12th patch...
Running 9/12th patch...
Running 8/12th patch...
Running 2/12th patch...
Running 1/12th patch...
Running 5/12th patch...
Running 12/12th patch...

@yumorishita
Copy link
Owner

yumorishita commented Mar 28, 2024

It seems to be step13, not step16. Set 1 here

p13_n_para="" # default: # of usable CPU

or it is just taking a very long time. You should check the resource by top command.

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

4 participants