Project

General

Profile

Actions

Gatan K2 Installation Notes » History » Revision 10

« Previous | Revision 10/18 (diff) | Next »
Anchi Cheng, 12/09/2012 10:42 PM


Gatan K2 Installation Notes

This is a preliminary document. Use at your own risk.

Install the latest SerialEM DigitalMicrograph plugin: SEMCCD-GMS2-64.dll

This is the latest one that includes a socket interface. Not sure if it is available from SerialEM download site yet, so you can download it from our redmine Files: http://emg.nysbc.org/projects/leginon/files
Copy it to C:\Program Files\Gatan\Plugins\ (maybe ProgramData is okay too instead of ProgramFiles)

Set the environment variable SERIALEMCCD_PORT to whatever port you want, preferably something between 50000 and 60000 to avoid conflict with other programs.

Install 64 bit versions of the usual Python stuff

The 64 bit Python installer failes to update the windows registry properly if installed for "all users". When installing other python packages, it will complain that it can't find python. To solve this, install Python only for the current user. Or search google for how to install for all users and then update the registry manually.

We have tested with:

Some of the other packages have no officially supported 64 bit versions, but they are easy to find with google. To save the trouble, I dumped some of them in our Files: http://emg.nysbc.org/projects/leginon/files including:

Tested:

  • MySQL-python-1.2.3.win-amd64-py2.7.exe
  • numextension-svn.win-amd64-py2.7.exe
  • numpy-MKL-1.6.2.win-amd64-py2.7.exe
  • PIL-fork-1.1.7.win-amd64-py2.7.exe
  • scipy-0.11.0.win-amd64-py2.7.exe
    (many of those originally came from http://www.lfd.uci.edu/~gohlke/pythonlibs/)

You do not need to install comarray or libcv.

Install myami from svn trunk

Our usual routine lately is:
  • install Tortoise SVN client
  • check out myami trunk sandbox to wherever you want
  • Set PYTHONPATH to you myami sandbox, rather than installing each package to site-packages.

Configure myami

  • create a folder: C:\Program Files\myami\
  • copy the templates for config files into the new folder and rename them without the ".template"
    • sinedon.cfg - edit with your DB settings
    • leginon.cfg - edit with your leginon settings
    • instruments.cfg - The camera modes are configured as separate cameras as follows. Note that Super Resolution should be double the size of Linear and Counting. Also note that zplane will be relative to any other cameras in your system. Anything below K2 should have a lower zplane.
      In addition, to make the images acquired from the camera to have the standard Leginon orientation, the camera configuration in Digital Micrograph will need a rotation and flip (270 degree rotation and a horizontal flip on our camera). Therefore, the height becomes longer than width.
      [Gatan K2 Linear]
      class: gatank2.GatanK2Linear
      zplane: 50
      width: 3712
      height: 3840
      
      [Gatan K2 Counting]
      class: gatank2.GatanK2Counting
      zplane: 50
      width: 3712
      height: 3840
      
      [Gatan K2 Super]
      class: gatank2.GatanK2Super
      zplane: 50
      width: 7424
      height: 7680

Try it out

Need to start DigitalMicrograph first

Test pyscopy without leginon from python command line:

import pyscope.gatank2
k = pyscope.gatank2.GatanK2Counting()
k.setExposureTime(200)
k.getImage()

Then try Leginon.

Use it in Leginon

If you want to use DM's dose fractionation, activate the "save frames" check box in the particular preset camera configuration. You can also use DM's frame alignment algorithm by activating "align frames" check box.

We have also a script for transferring the frame images from the Gatan computer to Leginon's session image path using rsync. See DDD_raw_frame_file_transfer. This will remove also the transferred files on Gatan computer so that more images can be acquired automatically. If you choose to only "align frames" but not "save frames", this script delete the frames generated by DM without transferring them.

Here are some notes on odd things that we have to do:

  1. We use DM's hardware Dark/Gain correction in counted and super-resolution mode. DM will only give usable dark reference when the camera is unflipped and unrotated.
    Therefore, it is necessary to switch between flip/rotate and unflip/unrotate to maintain Leginon image orientation convention and preparing dark/gain reference in DM, respectively. Many new users forget to switch at first and need reminder several times.
  2. You will still need to do gain/dark correction in Leginon to correct in DM so called software correction. WIthout it, the image of long exposure shows artifact even in counted and supre-resolution mode.
  3. K2's dose fractionation only works with full camera dimension without binning.
  4. K2 interface in DM restricts the exposure time to multiple of some set number, depending on the mode. When you enter in DM an invalid number, it automatically change it to the valid one when you click the acquire button. Leginon at moment can not get from DM the changed value. Therefore, it is the user's responsibility to put in the valid exposure time.

Updated by Anchi Cheng almost 12 years ago · 10 revisions