got 'KeyError: 'STARTING_RANGE' error while processing smallbaselineApp.py. #1414
-
|
i ran stackSentinel.py for interferograms, after that i ran ___________________________________________________________
******************** step - load_data ********************
load_data.py --template /home/incois/mohanty/karthi/SBAS/puri/mintpy/smallbaselineApp.cfg /home/incois/mohanty/karthi/SBAS/puri/mintpy/mintpy.txt --project mintpy
processor : isce
SAR platform/sensor : unknown from project name "mintpy"
--------------------------------------------------
prepare metadata files for isce products
prep_isce.py -m /home/incois/mohanty/karthi/SBAS/puri/output/reference/IW1.xml -g /home/incois/mohanty/karthi/SBAS/puri/output/merged/geom_reference -b /home/incois/mohanty/karthi/SBAS/puri/output/baselines -f "/home/incois/mohanty/karthi/SBAS/puri/output/merged/interferograms/*/filt_*.unw" --geom-files hgt.rdr lat.rdr lon.rdr los.rdr los.rdr shadowMask.rdr swbdLat_N19_N20_Lon_E085_E086.wbd
extract metadata from ISCE/topsStack xml file: /home/incois/mohanty/karthi/SBAS/puri/output/reference/IW1.xml
--------------------------------------------------
updateMode : True
compression: default
multilook x/ystep: 1/1
multilook method : nearest
--------------------------------------------------
searching geometry files info
input data files:
height : /home/incois/mohanty/karthi/SBAS/puri/output/merged/geom_reference/hgt.rdr
latitude : /home/incois/mohanty/karthi/SBAS/puri/output/merged/geom_reference/lat.rdr
longitude : /home/incois/mohanty/karthi/SBAS/puri/output/merged/geom_reference/lon.rdr
azimuthAngle : /home/incois/mohanty/karthi/SBAS/puri/output/merged/geom_reference/los.rdr
shadowMask : /home/incois/mohanty/karthi/SBAS/puri/output/merged/geom_reference/shadowMask.rdr
waterMask : /home/incois/mohanty/karthi/SBAS/puri/output/merged/geom_reference/swbdLat_N19_N20_Lon_E085_E086.wbd
All datasets exists in file geometryGeo.h5 with same size as required, no need to re-load.
/home/incois/mohanty/karthi/SBAS/puri/mintpy/inputs/geometryRadar.h5 exists, but can not read, remove it.
--------------------------------------------------
create HDF5 file /home/incois/mohanty/karthi/SBAS/puri/mintpy/inputs/geometryRadar.h5 with w mode
create dataset /height of <class 'numpy.float32'> in size of (944, 2280) with compression = lzf
create dataset /latitude of <class 'numpy.float32'> in size of (944, 2280) with compression = lzf
create dataset /longitude of <class 'numpy.float32'> in size of (944, 2280) with compression = lzf
create dataset /azimuthAngle of <class 'numpy.float32'> in size of (944, 2280) with compression = lzf
create dataset /shadowMask of <class 'numpy.bool_'> in size of (944, 2280) with compression = lzf"
**The error is**
"**/home/incois/mohanty/.conda/envs/mintpy_env/lib/python3.10/site-packages/mintpy/load_data.py:708: UserWarning: prep_isce.py failed. Assuming its result exists and continue...
warnings.warn('prep_isce.py failed. Assuming its result exists and continue...')
Traceback (most recent call last):
File "/home/incois/mohanty/.conda/envs/mintpy_env/bin/smallbaselineApp.py", line 10, in <module>
sys.exit(main())
File "/home/incois/mohanty/.conda/envs/mintpy_env/lib/python3.10/site-packages/mintpy/cli/smallbaselineApp.py", line 209, in main
run_smallbaselineApp(inps)
File "/home/incois/mohanty/.conda/envs/mintpy_env/lib/python3.10/site-packages/mintpy/smallbaselineApp.py", line 1155, in run_smallbaselineApp
app.run(steps=inps.runSteps)
File "/home/incois/mohanty/.conda/envs/mintpy_env/lib/python3.10/site-packages/mintpy/smallbaselineApp.py", line 908, in run
self.run_load_data(sname)
File "/home/incois/mohanty/.conda/envs/mintpy_env/lib/python3.10/site-packages/mintpy/smallbaselineApp.py", line 176, in run_load_data
mintpy.cli.load_data.main(iargs)
File "/home/incois/mohanty/.conda/envs/mintpy_env/lib/python3.10/site-packages/mintpy/cli/load_data.py", line 121, in main
load_data(inps)
File "/home/incois/mohanty/.conda/envs/mintpy_env/lib/python3.10/site-packages/mintpy/load_data.py", line 850, in load_data
geom_radar_obj.write2hdf5(
File "/home/incois/mohanty/.conda/envs/mintpy_env/lib/python3.10/site-packages/mintpy/objects/stackDict.py", line 763, in write2hdf5
data = self.get_incidence_angle(box=box, xstep=xstep, ystep=ystep)
File "/home/incois/mohanty/.conda/envs/mintpy_env/lib/python3.10/site-packages/mintpy/objects/stackDict.py", line 552, in get_incidence_angle
data = ut.incidence_angle(self.extraMetadata,
File "/home/incois/mohanty/.conda/envs/mintpy_env/lib/python3.10/site-packages/mintpy/utils/utils0.py", line 137, in incidence_angle
range_n = float(atr['STARTING_RANGE'])
KeyError: 'STARTING_RANGE'**" |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Hello karthi The fix is simple: use a slightly larger bounding box when running stackSentinel.py. Once the full stack is prepared, you can always subset down to your exact AOI later in MintPy using mintpy.subset.lalo or subset.py. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks Arpan Shastri, Next time I will keep this in my mind. |
Beta Was this translation helpful? Give feedback.
-
|
Welcome Karthi.. |
Beta Was this translation helpful? Give feedback.
Hello karthi
Just wanted to share a tip from my experience. Sometimes the error can occur if the bounding box passed to the stackSentinel.py command is too tight (i.e., the AOI is very small). In that case, ISCE may not generate a proper data.rsc and MintPy will fail.
The fix is simple: use a slightly larger bounding box when running stackSentinel.py. Once the full stack is prepared, you can always subset down to your exact AOI later in MintPy using mintpy.subset.lalo or subset.py.