Project

General

Profile

new CM support in pyScope

Added by Jim Pulokas over 16 years ago

There has been no official release, but the latest revision in the pyScope SVN repository has the modules required for communicating with a CM instrument. (see the "Introduction" topic for SVN help). The initial code was developed at Purdue by Min Su. The latest revisions were done during my visit to Scott Stagg's lab at Florida State. At this point it seems to be working for most of the basic functions that Leginon needs.

The CMremote32 package from FEI is needed for the CM pyScope module to work. Let me know if you need a fresh copy of this, and I can send you an e-mail with an attachment. To install it, you unpack the zip file, then run setup.exe. This should install both the cmremote32.dll and secs2_32.exe. When we still had a CM scope to test on here, the first problem I ran into was that the cmremote dll was an old 16 bit version and did not work.

Also, secs2 may need to be configured to use the correct serial port and speed. At FSU, we determined that we could increase the baud speed of the com port by configuring secs2 and also had to change the speed on the CM console. We increased it to 19200 instead of 9600. According to the cmremote documentation, you can only increase the baud for CM software version 12 and higher.


Replies (2)

RE: new CM support - Added by Anonymous over 16 years ago

Achieved communication with CM microscope. First tested with python command line and then started Leginon GUI on local PC. A thousand wxPython "stdout' windows came up. Nevertheless, I was able to download magnifications, refresh the CM settings, which produced correct values for several salient parameters (spot size, defocus). With screen down, I can read and change magnifications in the "Manual" node. But the mag values reported by Leginon are incorrect. We have used FEI "downloadable lens series" to program the CM200 with a slightly different set from the factory. The mag download is finished very quickly, which makes me suspicious.

With the screen up, I get an error message:

from setMagnification

from _emcGetMagPostion

from getMagnification

Traceback (most recent call last):

File "C:\Python25\Lib\site-packages\Leginon\gui\wx\Instrument.py", line 991, in onSetP

arameters

self.tempanel.setParameters(evt.parameters)

File "C:\Python25\Lib\site-packages\Leginon\gui\wx\Instrument.py", line 889, in setPar

ameters

ParameterMixin.setParameters(self, parameters, parametermap)

File "C:\Python25\Lib\site-packages\Leginon\gui\wx\Instrument.py", line 715, in setPar

ameters

setControl(parametermap[key], value)

File "C:\Python25\Lib\site-packages\Leginon\gui\wx\Instrument.py", line 88, in setCont

rol

raise ValueError(vestr % (value, controlname))

ValueError: Invalid value 66000 for instance of Choice

- Added by Jim Pulokas over 16 years ago

Automatically creating the mag table on CM is not currently implemented. The list of magnifications is currently hard coded into CMCal.py. Min Su created a list for his CM200. While I was at FSU, we had to modify it for the mags on the CM300. These are in the file cm300mags.py. You can edit CMCal.py and revert to the CM200 mags, or create your own mag list if you think they are different.

To Do:

- Implement the findMagnifications function (like in tecnai.py) so the mag table can be generated automatically by pressing the little calculator button.

OR

- figure out how to keep the mag tables of each CM version organized so all you have to do is flip a switch somewhere to use the table for your scope.

    (1-2/2)