Project

General

Profile

defocus not read from CM120

Added by Scott Stagg about 16 years ago

Parts of Leginon are now working on the CM120, but I am now hung up on getting pyScope to read defocus from the CM. It always returns zero. For instance, if I:

from pyScope import CM
mytem=CM.CM()
d=CM.getDefocus()
This returns 0 regardless of what the value is on the CM. Other things work. For instance, I can get and set magnification, beam shift, and beam intensity. I tried tracing through CM.py, and cmlib.py to try and find where it is asking for defocus, but that code is pretty convoluted. Any suggestions on things I should try?

Thanks,

Scott


Replies (4)

- Added by Jim Pulokas about 16 years ago

Try at a lower level (cmlib) to see if it is also zero:

from pyScope import cmlib
c = cmlib.CMLIB()
c.GetCMVar().defocus

- Added by Scott Stagg about 16 years ago

OK, I have gone about as low as I know how in the code. On the command line, I have recapitulated line 159 of cmlib.py

 err = self.cmremote32.GetCMvar(0,byref(CacheInfo['cmvar']),byref(leng))

on the command line, I did the following:
from ctypes import *
from pyScope import CMData
from pyScope import cmlib

c=cmlib.CMLIB()
leng=c_int(0)
cmvar=CMData.TCMVar(0)

c.cmremote32.GetCMvar(0,byref(cmvar),byref(leng))

cmvar.Magn returns the proper mag, but cmvar.defocus still returns 0. Is this a problem with cmremote32? Is this something I could possible hope to solve?

Thanks,

Scott

- Added by Jim Pulokas about 16 years ago

Is there any other software that communicates with your CM120 that could test if you can get defocus. I was also wondering if when you install cmremote, does it give you a test program of any kind.

Another option is to try out the old emscope library that we used to used a long time ago before python and cmremote. It has a tcl scripting interface, but probably could be adapted to python also. If interested, you can get it here: http://www.scripps.edu/~pulokas/cm/emscope-1.0b6.tgz

It may even have some clues why cmremote is not working.

- Added by Scott Stagg almost 16 years ago

I have some more information on this bug. I talked with a Tietz service engineer who was here to do some training, and he said that they have the same problem with EMMENU. It apparently has to do with the version of the CM operating system. We have 11 point something on the 120 and 13 point something on the 300. Apparently FEI changed something between versions 11 and 13.

    (1-4/4)