insarlab / MintPy

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

Error in load_data #815

Closed dream81 closed 2 years ago

dream81 commented 2 years ago

isce: 2.4.2 mintpy: 1.3.3 TestSen.txt:

-------------------------------- MintPy -----------------------------

########## 1. Load Data (--load to exit after this step)

load_data.py -H to check more details and example inputs.

mintpy.load.processor = isce

---------for ISCE only:

mintpy.load.metaFile = ../reference/IW*.xml mintpy.load.baselineDir = ../baselines

---------interferogram datasets:

mintpy.load.unwFile = ../merged/interferograms//filt_.unw mintpy.load.corFile = ../merged/interferograms//filt_.cor mintpy.load.connCompFile = ../merged/interferograms//filt_.unw.conncomp

---------geometry datasets:

mintpy.load.demFile = ../merged/geom_reference/hgt.rdr mintpy.load.lookupYFile = ../merged/geom_reference/lat.rdr mintpy.load.lookupXFile = ../merged/geom_reference/lon.rdr mintpy.load.incAngleFile = ../merged/geom_reference/los.rdr mintpy.load.azAngleFile = ../merged/geom_reference/los.rdr mintpy.load.shadowMaskFile = ../merged/geom_reference/shadowMask.rdr mintpy.load.waterMaskFile = None

Error:

**** step - load_data ****

load_data.py --template /home/test/InSAR/test/TSD/mintpy/pos/smallbaselineApp.cfg /home/test/InSAR/test/TSD/mintpy/pos/TestSen.txt --project TestSen processor : isce SAR platform/sensor : Sen

prepare metadata files for isce products Traceback (most recent call last): File "/home/test/MintPy/mintpy/smallbaselineApp.py", line 1301, in main(sys.argv[1:]) File "/home/test/MintPy/mintpy/smallbaselineApp.py", line 1283, in main app.run(steps=inps.runSteps) File "/home/test/MintPy/mintpy/smallbaselineApp.py", line 1039, in run self.run_load_data(sname) File "/home/test/MintPy/mintpy/smallbaselineApp.py", line 354, in run_load_data mintpy.load_data.main(iargs) File "/home/test/MintPy/mintpy/load_data.py", line 895, in main prepare_metadata(iDict) File "/home/test/MintPy/mintpy/load_data.py", line 765, in prepare_metadata geom_files = [os.path.basename(iDict[key]) for key in geom_keys File "/home/test/MintPy/mintpy/load_data.py", line 765, in geom_files = [os.path.basename(iDict[key]) for key in geom_keys File "/home/test/anaconda3/envs/mintpy/lib/python3.10/posixpath.py", line 142, in basename p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not NoneType

welcome[bot] commented 2 years ago

👋 Thanks for opening your first issue here! Please filled out the template with as much details as possible. We appreciate that you took the time to contribute! Make sure you read our contributing guidelines.

yuankailiu commented 2 years ago

Hi @dream81, this is just an input format error in the template. I believe it's here:

mintpy.load.waterMaskFile = None

It should be auto if you want to ignore the water mask.

mintpy.load.waterMaskFile = auto


By the way (not related to this error you report), your filenames for isce output files are weird. This could result in a further issue while reading the files in loading data.

mintpy.load.unwFile = ../merged/interferograms//filt_.unw
mintpy.load.corFile = ../merged/interferograms//filt_.cor
mintpy.load.connCompFile = ../merged/interferograms//filt_.unw.conncomp

I remember in isce, the default output is put into date12 folder and named as filt_fine.unw, filt_fine.cor, filt_fine.unw.conncomp. So unless you intentionally name your files and folder that way for your test dataset, these entries should look like:

mintpy.load.unwFile = ../merged/interferograms/*_*/filt_fine.unw
mintpy.load.corFile = ../merged/interferograms/*_*/filt_fine.cor
mintpy.load.connCompFile = ../merged/interferograms/*_*/filt_fine.unw.conncomp
dream81 commented 2 years ago

Hi @dream81, this is just an input format error in the template. I believe it's here:

mintpy.load.waterMaskFile = None

It should be auto if you want to ignore the water mask.

mintpy.load.waterMaskFile = auto

By the way (not related to this error you report), your filenames for isce output files are weird. This could result in a further issue while reading the files in loading data.

mintpy.load.unwFile = ../merged/interferograms//filt_.unw
mintpy.load.corFile = ../merged/interferograms//filt_.cor
mintpy.load.connCompFile = ../merged/interferograms//filt_.unw.conncomp

I remember in isce, the default output is put into date12 folder and named as filt_fine.unw, filt_fine.cor, filt_fine.unw.conncomp. So unless you intentionally name your files and folder that way for your test dataset, these entries should look like:

mintpy.load.unwFile = ../merged/interferograms/*_*/filt_fine.unw
mintpy.load.corFile = ../merged/interferograms/*_*/filt_fine.cor
mintpy.load.connCompFile = ../merged/interferograms/*_*/filt_fine.unw.conncomp

Thank you @yuankailiu for your quick response. It works well.