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

Plotting crashes when no photon in stream #65

Open
relleums opened this issue Dec 21, 2017 · 0 comments
Open

Plotting crashes when no photon in stream #65

relleums opened this issue Dec 21, 2017 · 0 comments
Labels

Comments

@relleums
Copy link
Member

When there is no photon in the stream, the 3D point cloud plotting fails.

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-4-5a25295627ec> in <module>()
      1 for e in run:
----> 2     ps_plot.event(e)
      3     plt.show()
      4 

~/Desktop/phd/FACT/single_photons/photon_stream/photon_stream/plot.py in event(event, mask)
     17     fig = plt.figure()
     18     ax = fig.gca(projection='3d')
---> 19     add_event_2_ax(event=event, ax=ax, mask=mask)
     20 
     21 

~/Desktop/phd/FACT/single_photons/photon_stream/photon_stream/plot.py in add_event_2_ax(event, ax, mask, color)
     30         fov_radius=fov_radius,
     31         ax=ax,
---> 32         color=color
     33     )
     34 

~/Desktop/phd/FACT/single_photons/photon_stream/photon_stream/plot.py in add_point_cloud_2_ax(point_cloud, ax, fov_radius, color)
     52     pcl[:, 2] *= 1e9 # to nano seconds
     53 
---> 54     min_time = pcl[:, 2].min()
     55     max_time = pcl[:, 2].max()
     56 

~/anaconda3/lib/python3.5/site-packages/numpy/core/_methods.py in _amin(a, axis, out, keepdims)
     27 
     28 def _amin(a, axis=None, out=None, keepdims=False):
---> 29     return umr_minimum(a, axis, None, out, keepdims)
     30 
     31 def _sum(a, axis=None, dtype=None, out=None, keepdims=False):

ValueError: zero-size array to reduction operation minimum which has no identity
@relleums relleums added the bug label Dec 21, 2017
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

1 participant