Exposure targetting: ValueError: cannot convert float NaN to integer
Added by Amedee des Georges over 10 years ago
Hello,
I got this error message as leginon tried to run exposure targetting over a gridbar. It then got stuck there, unable to proceed to the next hole.
Amedee
File "/usr/local/lib/python2.7/site-packages/leginon/gui/wx/ImagePanel.py", line 767, in OnSize
self.UpdateDrawing()
File "/usr/local/lib/python2.7/site-packages/leginon/gui/wx/ImagePanel.py", line 756, in UpdateDrawing
self.Draw(dc)
File "/usr/local/lib/python2.7/site-packages/leginon/gui/wx/TargetPanel.py", line 266, in Draw
self.drawTargets(dc)
File "/usr/local/lib/python2.7/site-packages/leginon/gui/wx/TargetPanel.py", line 184, in drawTargets
self._drawTargets(dc, type.bitmaps['default'], targets, scale)
File "/usr/local/lib/python2.7/site-packages/leginon/gui/wx/TargetPanel.py", line 156, in _drawTargets
x, y = self.image2view((target.x, target.y))
File "/usr/local/lib/python2.7/site-packages/leginon/gui/wx/ImagePanel.py", line 510, in image2view
return (int(round(((xy[0]) * scale[0]) - viewoffset[0] + xoffset)),
ValueError: cannot convert float NaN to integer
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/leginon/gui/wx/ImagePanel.py", line 777, in OnPaint
self.Draw(dc)
File "/usr/local/lib/python2.7/site-packages/leginon/gui/wx/TargetPanel.py", line 266, in Draw
self.drawTargets(dc)
File "/usr/local/lib/python2.7/site-packages/leginon/gui/wx/TargetPanel.py", line 184, in drawTargets
self._drawTargets(dc, type.bitmaps['default'], targets, scale)
File "/usr/local/lib/python2.7/site-packages/leginon/gui/wx/TargetPanel.py", line 156, in _drawTargets
x, y = self.image2view((target.x, target.y))
File "/usr/local/lib/python2.7/site-packages/leginon/gui/wx/ImagePanel.py", line 510, in image2view
return (int(round(((xy[0]) * scale[0]) - viewoffset[0] + xoffset)),
ValueError: cannot convert float NaN to integer
Replies (1)
RE: Exposure targetting: ValueError: cannot convert float NaN to integer - Added by Anchi Cheng over 10 years ago
Looks like the scaling failed to catch the fact that K2 counting gives back min = max = 0. I will look for a fix.