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

Exception in Tkinter callback (ValueError: zero-size array to reduction ...) #11

Open
forkozi opened this issue Jan 12, 2018 · 1 comment
Assignees

Comments

@forkozi
Copy link
Collaborator

forkozi commented Jan 12, 2018

from email from Jaime Kum...

Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1541, in call
return self.func(*args)
File "Gui.py", line 416, in tpuProcessCallback
self.sbets_df, las_to_process)
File "D:\00408518_data\NGS_TPU-master\calc_aerial_TPU.py", line 381, in main
D = merge(sbets_df.values, t, x, y, z) # D for data
File "D:\00408518_data\NGS_TPU-master\calc_aerial_TPU.py", line 59, in merge
max_dt = np.max(dt)
File "C:\Python27\lib\site-packages\numpy\core\fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "C:\Python27\lib\site-packages\numpy\core_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity

image

@forkozi forkozi self-assigned this Jan 12, 2018
@forkozi
Copy link
Collaborator Author

forkozi commented Jan 12, 2018

I was able to reproduce this error.

image

LAS file File Name 2016_568500e_2780000n_SORTED_0000000.las has one point in it. The point has a suspicious GPS Time of 1000000000.000 (Standard Time). I'm thinking this is a flier that didn't match up with a time stamp in what was supposed to be the corresponding sbet file, which resulted in an empty array, which threw the ValueError: zero-size array exception at line 59.

There is currently a check to see if the las files contain > 0 points, but not if the merged data have > 0 points. I will add another comment when I update the code.

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