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

Problem in example parse_angelier_data.py #28

Open
jlberzal opened this issue Apr 24, 2019 · 0 comments
Open

Problem in example parse_angelier_data.py #28

jlberzal opened this issue Apr 24, 2019 · 0 comments

Comments

@jlberzal
Copy link

jlberzal commented Apr 24, 2019

When running the examples in Ubuntu 16.04 and Python 3.5.2, I found the following error in parse_angelier_data.py

$ python parse_angelier_data.py Traceback (most recent call last): File "parse_angelier_data.py", line 66, in <module> main() File "parse_angelier_data.py", line 29, in main ax.rake(strike, dip, rake, 'ro') File "/home/jlb/.virtualenvs/open3d/lib/python3.5/site-packages/mplstereonet/stereonet_axes.py", line 319, in rake lon, lat = stereonet_math.rake(strike, dip, rake_angle) File "/home/jlb/.virtualenvs/open3d/lib/python3.5/site-packages/mplstereonet/stereonet_math.py", line 226, in rake lon, lat = _rotate(lon, lat, strike) File "/home/jlb/.virtualenvs/open3d/lib/python3.5/site-packages/mplstereonet/stereonet_math.py", line 78, in _rotate lon, lat = map(np.radians, [lon, lat]) AttributeError: 'float' object has no attribute 'radians'

This prevented the execution of all examples with angelier data.

Digging a little, I found that there is a case in the load function when parsing the rake value that returns a vector instead of an integer. In my case, the problem was solved by inserting:

rake = rake[0]

In line 58
I don't know if this is the right way to fix it though.

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

1 participant