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

KeyError: 'range_resolution' in prep_aria.py #408

Closed
ReemAlshammari opened this issue Jul 21, 2020 · 4 comments
Closed

KeyError: 'range_resolution' in prep_aria.py #408

ReemAlshammari opened this issue Jul 21, 2020 · 4 comments
Labels

Comments

@ReemAlshammari
Copy link

Description of the problem
I got error with step - correct_topography, when reading "incidenceAngle".
I think "incidenceAngle" is empty, the geometryGeo.h5 created by using "prep_aria.py".

Full script that generated the error

smallbaselineApp.py 

Full error message

open geometry file: geometryGeo.h5
read 2D incidenceAngle,slantRangeDistance from geometry file: geometryGeo.h5
read mean bperp from timeseries file
/mintpy/dem_error.py:259: RuntimeWarning: invalid value encountered in sin
inps.sinIncAngle = np.sin(inps.incAngle * np.pi / 180.)```


**System information**

* Operating system: macOS
* Python environment: conda
* Version of MintPy: MintPy release version v1.2, release date 2020-01-03
@welcome
Copy link

welcome bot commented Jul 21, 2020

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

@yunjunz
Copy link
Member

yunjunz commented Jul 21, 2020

You can run view.py inputs/geometryGeo.h5 incidenceAngle to see how it looks like.

My guess is this is a bug/warning related with no-data, and it has been fixed before. You should try it with the latest version.

@ReemAlshammari
Copy link
Author

You're right I'm using old version but this is because when I RUN the latest version (MintPy release version v1.2.3, release date 2020-07-14), I got error when running ""prep_aria.py"" .
The error is :
""
extract metadata from /stack/unwrapStack.vrt
Traceback (most recent call last):
File "/MintPy/mintpy/prep_aria.py", line 504, in
main()
File "/MintPy/mintpy/prep_aria.py", line 442, in main
metadata = extract_metadata(inps.unwFile)
File "/MintPy/mintpy/prep_aria.py", line 261, in extract_metadata
rgfact = sen_dict['IW2']['range_resolution'] / sen_dict['range_pixel_size']
KeyError: 'range_resolution' ""

how to solve it ?
Thank you.

@yunjunz yunjunz changed the title RuntimeWarning: invalid value encountered in sin inps.sinIncAngle KeyError: 'range_resolution' in prep_aria.py Jul 23, 2020
@yunjunz
Copy link
Member

yunjunz commented Jul 23, 2020

Hi @ReemAlshammari, the KeyError above is a bug introduced in the recent commit 46f3d8b, after the v1.2.3 release. Thank you for identifying this! It should be fixed now. Please update your mintpy code and try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants