Project

General

Profile

Leginon installation JEOL JEM 3200FSC / Gatan K2 camera

Added by Oliver Hofnagel about 10 years ago

Dear all,
we have two questions during our JEOL JEM 3200FSC /K2 leginon installation:

We need the entry for the instruments.cfg !
Cs is known, but what class must be used to reach the jeolcom.py script ?

And second:
When we try to aquire an image with the K2 the message "Error aquiring image: No proxy selected for this data class" is coming (in combination with all camera pixel configurations).
Orientation is set to 270 degree with flip around vertical axis, default storage position is used (D:\\).

Thanks for your help,

Oliver


Replies (31)

RE: Leginon installation JEOL JEM 3200FSC / Gatan K2 camera - Added by Oliver Hofnagel about 10 years ago

Dear Anchi,
I was able to make K2 correction images and preset + pixel size calibration. But the image shift calibration is not working. During calibration (after aquiring the first image) no image shift is set on the deflectors of the EM, I can see this 1. in the deflector coil monitor of the EM directly and 2. in the leginon launcher parameters for image shift (see attached file). I tried this with different magnifications. Also I played around with the BEAMSHIFT_FACTOR_XY_MAG1 values in jeolcom.py (10 fold and 100fold higher values), but the image shift deflectors dont show any value change.......Any idea ?
Greetings,
Oliver

RE: Leginon installation JEOL JEM 3200FSC / Gatan K2 camera - Added by Anchi Cheng about 10 years ago

First, you probably should change IMAGESHIFT_FACTOR.

Second, The following procedure may help you with determinging the factor:

Leginon thinks the movements are in meters, while JEOL in general gives a current value applied to the lens/deflector/stigmator. The factors in jeolcom.py are meant to convert between the two.
Using python command line with the testing script, we can get to the point where the two values are output, and will then help you in assigning the values:

from pyscope import jeolcom
J = jeolcom.Jeol()
# The following is similar to the code in joelcom.py getImageShift function so we can get the value from JEOL
mode, name, result = j.eos3.GetFunctionMode()
shift_x, shift_y, result = self.def3.GetIS1()
# shift_x - jeolcom.ZERO gives the relative image shift from JEOL scope's zero image shift according to the ZERO constant assigned at the beginning of joelcom.py
shift_x - jeolcom.ZERO
# getImageShift gives the value Leginon gets in meters
j.getImageShift()

To calculate the scale value you should put in IMAGESHIFT_FACTOR_X_MAG1, you should set the scope in MAG1 range, and then run the above sequence of command from python command window. If you get non-zero value for "shift_x - jeolcom.ZERO", when you expect it to be no image shift, then you need to adjust ZERO constant. If you get zero there, you can then apply an image shift of known physical distance such as 2 um on a quantifoil 2/2 hole diameter, and then use the ratio of shift_x - jeolcom.ZERO obtained at that state to the physical distance to get IMAGESHIFT_X_MAG1 for your scope. You do something like this for any other constant defined in that file.

If you have trouble following this due to limited python knowledge, I can write a better script for it, but it will take time, and, as I can't test here, it may be buggy at first.

RE: Leginon installation JEOL JEM 3200FSC / Gatan K2 camera - Added by Oliver Hofnagel about 10 years ago

Dear Anchi,
thanks for your hints. To 1.) Sorry, this was a typing error, of course I changed the IMAGE_SHIFT_FACTORs........
to 2.) I think now that the problem is not the IMAGE_SHIFT_FACTOR in jeolcom.py, because this values seem to be roughly ok. After application of 2 micrometer image shift on EM and

from pyscope import jeolcom
j = jeolcom.Jeol()
shift_x, shift_y, result = j.def3.GetIS1()
j.getImageShift()

I get values around 2e-06, so the IMAGE_SHIFT_FACTOR values should be (roughly) ok !

I think now that the setImageShift part in jeolcom.py is not working. Can you tell me how to test this ?
Thanks a lot,
Oliver

RE: Leginon installation JEOL JEM 3200FSC / Gatan K2 camera - Added by Anchi Cheng about 10 years ago

Once you start the instance of jeolcom.Jeol as I've shown before, the python command you need has the syntex like this:

result = j.def3.SetIS1(shift_x,shift_y)

To test this, I recommend that you first use j.def3.GetIS1() to get the current value, shift it manually at the scope, confirm that new value with the same GetIS1() command, and then try to set the original value back.

These information came from jeolcom.py if you need other functions tested.

It is strange that get function works but not set.

RE: Leginon installation JEOL JEM 3200FSC / Gatan K2 camera - Added by Oliver Hofnagel about 10 years ago

Dear Anchi,
I start with neutralized IS (j.getImageshift shows y=0.0. x=0.0).
Then I apply 100nm image shift manually on the EM. j.getImageshift shows now y=0.0. x=1.1e-07.

(With
shift_x, shift_y, result = self.def3.GetIS1()
shift_x - jeolcom.ZERO
I get 400.)

To bring back neutralized image shift I need to use:
result = j.def3.SetIS1(32768,32768)

The ZERO is defined in jeolcom.py with 32768, MAX=65530, MIN=0, SCALE FACTOR= 32768

Any hint ?
Greetings,
Oliver

RE: Leginon installation JEOL JEM 3200FSC / Gatan K2 camera - Added by Anchi Cheng about 10 years ago

It seems that SetISI works at least in the case for returning to j.ZERO

If you do

j.def3.SetIS1(32368,32768)

Does it move by 100 nm, then ?

If all these tests passed, I don't see why the image does not move during the calibration, unless your pixel size calibration is unreasonably small. Matrix calibrator uses the pixel size at the magnification to determine how much movement it needs to ask the scope to do as the settings are defined as percentage of the camera length. Check those values.

You can also make python prints out the values jeolcom.py received at the K2 computer in setImageShift function like this segment:
Find

  def setImageShift(self, vector, relative = "absolute"):

Add this line after that with the same indentation as the lines follow it.
    print vector

SCALE_FACTOR you found is for gun and lens stigmator operation. I don't see in the code that it is used for image shift. We only need to adjust IMAGE_SHIFT_FACTOR

(26-31/31)