aestrivex / ielu

grids and strips electrode localization utility
GNU General Public License v3.0
10 stars 7 forks source link

Error when manually bringing up electrodes #2

Closed choldgraf closed 8 years ago

choldgraf commented 8 years ago

I keep getting an error when I bring up the "Examine electrodes" window. Oftentimes when it comes up, clicking on any of the rows (where each row is an electrode) results in this error:

  File "/home/knight/holdgraf/anaconda/lib/python2.7/site-packages/traits/trait_notifiers.py", line 520, in _dispatch_change_event
    self.dispatch( handler, *args )
  File "/home/knight/holdgraf/anaconda/lib/python2.7/site-packages/traits/trait_notifiers.py", line 483, in dispatch
    handler( *args )
  File "gselu.py", line 1429, in update_single_glyph
    raise ValueError('Error in figuring out what point was clicked')
ValueError: Error in figuring out what point was clicked

Moreover, if I click on an electrode and then do "operations -> Manually modify electrode position", nothing pops up and I get this error:

  File "/home/knight/holdgraf/anaconda/lib/python2.7/site-packages/pyface/ui/qt4/action/action_item.py", line 160, in _qt4_on_triggered
    self.controller.perform(action)
  File "/home/knight/holdgraf/anaconda/lib/python2.7/site-packages/traitsui/qt4/ui_base.py", line 138, in perform
    self.ui.do_undoable( self._perform, action )
  File "/home/knight/holdgraf/anaconda/lib/python2.7/site-packages/traitsui/ui.py", line 715, in do_undoable
    action( *args, **kw )
  File "/home/knight/holdgraf/anaconda/lib/python2.7/site-packages/traitsui/qt4/ui_base.py", line 143, in _perform
    method( self.ui.info )
  File "/home/knight/holdgraf/src/python/gselu/electrode.py", line 566, in do_manual_reposition
    ras_coords=True)
  File "/home/knight/holdgraf/src/python/gselu/panel2d.py", line 546, in drop_pin
    _,_,affine = self.images[image_name]
KeyError: 't1'

Note that this is after running the pipeline.

This doesn't always happen. Any idea what might be going on?

aestrivex commented 8 years ago

I am able to reproduce the first error. What it is trying to do is color the point in yellow to point out to the user what point they clicked on. I rely on this feature a lot and it almost certainly has to do with something I did very recently having to do with isotropization correction. I am working on it now.

The second error I did not reproduce after looking at several electrodes. It is supposed to put a pin (a large dot) on the location where the electrode is in the CT and MR image and let the user scroll around and reposition it. I have used this functionality much less often so I wouldnt be surprised if it is buggy but it appeared to be working.

On Mon, Nov 30, 2015 at 3:56 PM, Chris Holdgraf notifications@github.com wrote:

I keep getting an error when I bring up the "Examine electrodes" window. Oftentimes when it comes up, clicking on any of the rows (where each row is an electrode) results in this error:

File "/home/knight/holdgraf/anaconda/lib/python2.7/site-packages/traits/trait_notifiers.py", line 520, in _dispatch_change_event self.dispatch( handler, args ) File "/home/knight/holdgraf/anaconda/lib/python2.7/site-packages/traits/trait_notifiers.py", line 483, in dispatch handler( args ) File "gselu.py", line 1429, in update_single_glyph raise ValueError('Error in figuring out what point was clicked')ValueError: Error in figuring out what point was clicked

Moreover, if I click on an electrode and then do "operations -> Manually modify electrode position", nothing pops up and I get this error:

File "/home/knight/holdgraf/anaconda/lib/python2.7/site-packages/pyface/ui/qt4/action/action_item.py", line 160, in _qt4_on_triggered self.controller.perform(action) File "/home/knight/holdgraf/anaconda/lib/python2.7/site-packages/traitsui/qt4/ui_base.py", line 138, in perform self.ui.do_undoable( self._perform, action ) File "/home/knight/holdgraf/anaconda/lib/python2.7/site-packages/traitsui/ui.py", line 715, in do_undoable action( _args, *_kw ) File "/home/knight/holdgraf/anaconda/lib/python2.7/site-packages/traitsui/qt4/ui_base.py", line 143, in _perform method( self.ui.info ) File "/home/knight/holdgraf/src/python/gselu/electrode.py", line 566, in do_manual_reposition ras_coords=True) File "/home/knight/holdgraf/src/python/gselu/panel2d.py", line 546, in droppin ,_,affine = self.images[image_name]KeyError: 't1'

Note that this is after running the pipeline.

This doesn't always happen. Any idea what might be going on?

— Reply to this email directly or view it on GitHub https://github.com/aestrivex/gselu/issues/2.

choldgraf commented 8 years ago

The second error I got rid of by saving everything to a pickle file, then reloading it. Seems strange, but maybe it is something that happens only after running the pipeline?

aestrivex commented 8 years ago

I was able to reproduce it by not doing that.

aestrivex commented 8 years ago

These should be fixed now

choldgraf commented 8 years ago

This works for me as well, thanks

On Mon, Nov 30, 2015 at 5:06 PM, Roan LaPlante notifications@github.com wrote:

These should be fixed now

— Reply to this email directly or view it on GitHub https://github.com/aestrivex/gselu/issues/2#issuecomment-160790687.