insarlab / MintPy

Miami InSAR time-series software in Python
https://mintpy.readthedocs.io
Other
603 stars 257 forks source link

AttributeError: 'NoneType' object has no attribute 'astype' #1031

Closed venjiehu closed 1 year ago

venjiehu commented 1 year ago

Description of the problem Hi all, 1)In step - correct_unwrap_error, I got some error message. It seems to be missing some files in the 'ifgramStack.h5'. 2) And in the previous step-Quick overview, mintpy don't generate 'numTriNonzeroIntAmbiguity.h5' file, I find some warning message. I want to know what triangles file is, and how connected between it and error.

Warning: No triangles found from ifgramStack file: /mnt/f/Luding/topstack/Process/mintpy2/inputs/ifgramStack.h5!
                       Skip calculating the number of triplets with non-zero integer ambiguity. 

Full script that generated the error

AttributeError: 'NoneType' object has no attribute 'astype'

Full error message

******************** step - correct_unwrap_error ********************

unwrap_error_bridging.py /mnt/f/Luding/topstack/Process/mintpy2/inputs/ifgramStack.h5 --template /mnt/f/Luding/topstack/Process/mintpy2/smallbaselineApp.cfg --update -i unwrapPhase -o unwrapPhase_bridging
read options from template file: smallbaselineApp.cfg
--------------------------------------------------
update mode: ON
1) output dataset: unwrapPhase_bridging NOT found.
run or skip: run.
--------------------------------------------------
correct unwrapping error in /mnt/f/Luding/topstack/Process/mintpy2/inputs/ifgramStack.h5 with bridging ...
estimate and remove a linear ramp while calculating phase offset
open /mnt/f/Luding/topstack/Process/mintpy2/inputs/ifgramStack.h5 with r+ mode
input  dataset: unwrapPhase
output dataset: unwrapPhase_bridging
create /unwrapPhase_bridging of np.float32 in size of (216, 4234, 5042)
[==================================================] 20220517_20220610  935s /    19s
close /mnt/f/Luding/topstack/Process/mintpy2/inputs/ifgramStack.h5 file.
add/update the following configuration metadata to file:
add/update mintpy.unwrapError.connCompMinArea = 2500.0
add/update mintpy.unwrapError.ramp = linear
add/update mintpy.unwrapError.bridgePtsRadius = 50

time used: 15 mins 58.2 secs
Done.

unwrap_error_phase_closure.py /mnt/f/Luding/topstack/Process/mintpy2/inputs/ifgramStack.h5 --template /mnt/f/Luding/topstack/Process/mintpy2/smallbaselineApp.cfg --update --cc-mask /mnt/f/Luding/topstack/Process/mintpy2/maskConnComp.h5 -i unwrapPhase_bridging -o unwrapPhase_bridging_phaseClosure
read options from tempalte file: smallbaselineApp.cfg
--------------------------------------------------
update mode: ON
1) output dataset: unwrapPhase_bridging_phaseClosure NOT found.
run or skip: run.
--------------------------------------------------
calculating the integer ambiguity for the common regions defined in /mnt/f/Luding/topstack/Process/mintpy2/maskConnComp.h5

WARNING: No triangles found from input date12_list:
['20191211_20191223', '20191223_20200104', '20200104_20200116', '20200116_20200128', '20200128_20200209', '20200209_20200221', '20200221_20200304', '20200304_20200316', '20200316_20200328', '20200328_20200409', '20200328_20200515', '20200503_20200515', '20200515_20200608', '20200527_20200608', '20200608_20200620', '20200620_20200702', '20200620_20200726', '20200714_20200807', '20200726_20200831', '20200807_20200831', '20200819_20200831', '20200831_20200924', '20200912_20200924', '20200924_20201006', '20201006_20201018', '20201018_20201030', '20201030_20201111', '20201111_20201123', '20201123_20201205', '20201205_20201217', '20201217_20201229', '20201229_20210110', '20210110_20210203', '20210122_20210203', '20210203_20210215', '20210215_20210227', '20210227_20210311', '20210227_20210323', '20210323_20210404', '20210404_20210428', '20210416_20210428', '20210416_20210522', '20210510_20210522', '20210522_20210615', '20210603_20210615', '20210615_20210627', '20210627_20210709', '20210627_20210721', '20210721_20210802', '20210721_20210814', '20210814_20210907', '20210826_20210907', '20210907_20210919', '20210919_20211001', '20211001_20211013', '20211013_20211025', '20211025_20211106', '20211106_20211118', '20211118_20220105', '20211130_20211212', '20211212_20220105', '20220105_20220117', '20220117_20220129', '20220129_20220210', '20220129_20220222', '20220210_20220306', '20220306_20220318', '20220318_20220330', '20220330_20220423', '20220411_20220423', '20220423_20220505', '20220505_20220517', '20220517_20220610']!

Traceback (most recent call last):
  File "/home/ven-j/anaconda3/envs/insar/bin/smallbaselineApp.py", line 8, in <module>
    sys.exit(main())
  File "/home/ven-j/tools/MintPy/src/mintpy/cli/smallbaselineApp.py", line 208, in main
    run_smallbaselineApp(inps)
  File "/home/ven-j/tools/MintPy/src/mintpy/smallbaselineApp.py", line 1117, in run_smallbaselineApp
    app.run(steps=inps.runSteps)
  File "/home/ven-j/tools/MintPy/src/mintpy/smallbaselineApp.py", line 886, in run
    self.run_unwrap_error_correction(sname)
  File "/home/ven-j/tools/MintPy/src/mintpy/smallbaselineApp.py", line 366, in run_unwrap_error_correction
    mintpy.cli.unwrap_error_phase_closure.main(iargs_closure)
  File "/home/ven-j/tools/MintPy/src/mintpy/cli/unwrap_error_phase_closure.py", line 153, in main
    run_unwrap_error_phase_closure(inps)
  File "/home/ven-j/tools/MintPy/src/mintpy/unwrap_error_phase_closure.py", line 403, in run_unwrap_error_phase_closure
    common_regions = get_common_region_int_ambiguity(
  File "/home/ven-j/tools/MintPy/src/mintpy/unwrap_error_phase_closure.py", line 214, in get_common_region_int_ambiguity
    C = matrix(ifgramStack.get_design_matrix4triplet(date12_list).astype(float))
AttributeError: 'NoneType' object has no attribute 'astype'

System information

yunjunz commented 1 year ago

Triangles, or triplets of interferograms, are defined in equation 8 in Yunjun et al. (2019). You can find more descriptions about the phase closure unwrapping error correction methods. Based on the printout msg, your stack of interferograms has a sequential connection of 1, and could not form any triplets, therefore, you could not use phase closure for unwrapping error correction.

You could either turn off this option or generate more interferograms using a sequential connection of 2, 3 or more and re-run.