Project

General

Profile

Magnifications

Added by Steven Hunter over 11 years ago

We have a Krios instrument setup in a mixed Linux/Windows environment running Leginon 2.2. We create a new "EM" node on the Krios system, and click the button to retrieve magnifications from the instrument. The system appears to poll the instrument and successfully store the data in the database. However the Leginon window that is running the EM node (Leginon "client" on Windows) does not update correctly; all the controls are grayed-out and if I change the drop-down selection to one of the cameras rather than the TEM and then go back to the TEM, the python console window outputs errors. Below this is the console output:

(importing fake libcv)
{'tcpport': 55555}
Traceback (most recent call last):
  File "c:\Python25\Lib\site-packages\leginon\gui\wx\Instrument.py", line 1072,
in onChoice
    self.szmain.AddGrowableRow(1)
  File "C:\Python25\Lib\site-packages\wx-2.9.1-msw\wx\_core.py", line 14925, in
AddGrowableRow
    return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "!IsRowGrowable( idx )" failed at ..\..
\src\common\sizer.cpp(1929) in wxFlexGridSizer::AddGrowableRow(): AddGrowableRow
() called for growable row

I found this post - http://emg.nysbc.org/boards/6/topics/1363?r=1364 - which seemed to describe our issue. Per that thread, I did this:

C:\Python25>python.exe
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 
Type "help", "copyright", "credits" or "license" for more information.
>>> from leginon import leginondata
>>> results = leginondata.MagnificationsData().query(results=1)
>>> mags = results[0]
>>> print mags['instrument']
{name: Tecnai, hostname: titan52331990, cs: 0.0027, pixelmax: None}
>>> print mags['instrument']['hostname'],mags['instrument']['name']
titan52331990 Tecnai
>>> print results
[{instrument: DataReference[class: InstrumentData, dmid: (('titan52331990', 4915
2), 7), dbid: 6, referent: weak], magnifications: [29, 52, 82, 135, 175, 220, 27
5, 360, 470, 580, 740, 940, 1200, 1550, 1950, 2500, 2250, 3600, 4800, 6500, 8700
, 11500, 15000, 19500, 26000, 32000, 41000, 53000, 64000, 81000, 105000, 130000,
 165000, 215000, 270000, 350000, 440000, 560000, 710000, 910000, 1150000]}]
>>>

So I'm pretty sure our instruments.cfg file is OK.

Anyway, my question is this: Is this a problem I need to fix or just a bug? That is to say, if the magnifications are in the database, does it matter that the GUI gets pooched? Additional information available upon request; just remember that I'm the computer guy and don't know much at all about electron microscopy. :) Thanks in advance.


Replies (5)

RE: Magnifications - Added by Anchi Cheng over 11 years ago

It is an issue with wxPython 2.9, probably even specific to Windows. You don't need to fix this unless it does the same to something that you need gui for on Windows. I will fix the gui bug for the next release now that 2.9 has gone through some debug.

If this gui bug prevents you from doing the "first image test from Windows PC", skip that and move on to Test Network Connection Between Remote and Microscope Computers. Hopefully your Linux system won't have this problem.

RE: Magnifications - Added by Anchi Cheng over 11 years ago

None of our instrument is on wxPython 2.9, yet, except my mac, and I have no problem there.

I did find a minor bug at line 1060 of myami/leginon/gui/wx/Instrument.py where you can change to see if there is effect:
Change

current_rows = self.szmain.GetCols()

to
current_rows = self.szmain.GetRows()

If you want the error to go away for now (before we can move up python version from 2.5), you can go back to wxpython 2.8.4.0 on Windows which we do know works fine.

RE: Magnifications - Added by Steven Hunter over 11 years ago

Anchi Cheng wrote:

If you want the error to go away for now (before we can move up python version from 2.5), you can go back to wxpython 2.8.4.0 on Windows which we do know works fine.

We back-leveled to 2.8.4 and the GUI now doesn't generate the error so yay for that.

However the fields remain unpopulated (see attachment.) Does this matter?

empty.jpg (60.1 KB) empty.jpg

RE: Magnifications - Added by Anchi Cheng over 11 years ago

click the refresh button, the one looks like recycle icon in green.

RE: Magnifications - Added by Steven Hunter over 11 years ago

Anchi Cheng wrote:

click the refresh button, the one looks like recycle icon in green.

OK, that did it. I am told that the values displayed are the correct ones too, which is nice. ;) Thank you for your assistance!

    (1-5/5)