Project

General

Profile

Actions

Gatan on Windows with semccddll » History » Revision 4

« Previous | Revision 4/11 (diff) | Next »
Anchi Cheng, 02/02/2016 02:12 PM


Gatan on Windows-32 with SEMCCD.dll

dmsem module uses SEMCCD.dll written for SerialEM to communicate with Gatan software rather than tecnaiccd.dll

If using this on a computer different from the scope computer, please read this first.

Extra Package and Installation

  • Use all win32 version of Windows installer
  • SerialEM DigitalMicrograph Plug-in

Thanks to David Mastronarde for providing his DM plug-in using socket connection

Note: If you have SerialEM installed on the same computer, you don't have to install this. The same Plugin can be used by both programs and share the same port

For your convenience, these are taken from SerialEM download site: http://bio3d.colorado.edu/ftp/SerialEM/ Please match it with your Digital Micrograph version. If you have SerialEM installed, this is included.

DM version local copy of SerialEM SEMCCD description
2.2.x SEMCCD-GMS2-64.dll DM for 64-bit GMS 2.0 - 2.2
2.3.0 SEMCCD-GMS2.30-64.dll DM for 64-bit GMS 2.30
2.3.1, 2.3.2, 3.0 SEMCCD-GMS2.31-64.dll DM for 64-bit GMS 2.31 and above
3.31 and above SEMCCD-GMS3.31-64.dll DM for 64-bit GMS 3.31 and above

Note: DM = Digital Micrograph; GMS = Gatan Microscopy Suite
32bit versions also exit, but not for GMS 2.31 and above

Copy it to C:\ProgramData\Gatan\Plugins\

If you had SEMCCDxxxx.dll in C:\Program File\Gatan\Plugins, you should remove it

Add a new environment variable SERIALEMCCD_PORT if not exist already from SerialEM installation. Set the value to an unused port between 50000 and 60000 to avoid conflict with other programs. Avoid ports used by Leginon, especially not 55555.

Port 50000 or 50001 usually works.

instruments.cfg

Currently UltraScan and Orius camera are supported.

For UltraScan camera (US4000), set instruments.cfg to use GatanUltraScan class. For example:

[us4000]
class: dmsem.GatanUltraScan
zplane: 50
height: 4096
width: 4096

Setup

  • Set camera configuration to give the standard Leginon orientation. For example, we need flip around the vertical axis on FEI T12. Note that the rotation required is different if it is installed post-GIF and/or on Krios.
  • Set the shutter configuration in DM to protect the specimen when camera is not taking images.

(Version 3.2) Define local configuration in dmsem.cfg

  1. Copy from your myami checkout pyscope/dmsem.cfg.template to C:\Program Files\myami\dmsem.cfg
  2. Make changes to the configured value in dmsem.cfg

Most parameters are explained above.

  • The config parser takes "'" and "\" literally. Therefore, do not include "'" in DM_VERION. In addition, the path separator should be "\"
  • CAMERA_ID is usually 0 if it is the only Gatan camera.
  • *Ultrascan camera should be configured under utrascan module, and Orius camera should be configured under orius module.

For example, only UltraScan camera exists on this computer that has Digital Micrograph version 2.32.788.0, and DM camera configuration
has vertical flip but no rotation, then set the dmsem.cfg ultrascan module like this:

[dm]
DM_VERSION = 2.32.788.0

[ultrascan]
CAMERA_ID = 0
FLIP = True
ROTATE = 0

Testing with pyscope

Gatan UltraScan dmsem Installation Pyscope Test

1. Start DigitalMicrograph

2. From python command line

from pyscope import dmsem
d = dmsem.GatanUltraScan()
d.getImage()

You should expect these to run without error. The getImage() command should give a 2D numpy array like

array([[1000, 3400, 2300, ..., 1000,1200,3000],
         [1000, 3400, 2300, ..., 1000,1200,3000],
         [1000, 3400, 2300, ..., 1000,1200,3000],
         ...,
         [1000, 3400, 2300, ..., 1000,1200,3000],
         [1000, 3400, 2300, ..., 1000,1200,3000],
         [1000, 3400, 2300, ..., 1000,1200,3000],dtype=int16)

The number and dtype depends on the camera.

a.shape command should give a tuple of the camera dimension matching your camera.
For example, (4096,4096)

If you use python shell to do this test, some of the error will cause the shell window to close immediately. Use Python IDLE instead in that case

Trouble shooting

Refused socket connection

If an error of "No connection could be made because the target machine actively refused it" comes up in the above test.
If not blocked by firewall, the SERIALEM_CCD_PORT specified in environment variable may be locked by a remaining previous attempt.

You can check active tcp port with Windows command

netstat

  • In some case, you will find SERIALEMCCD or similar listed in Windows Task Manager Processing list. If so, and that process remains after Digital Micrograph is closed, you can terminate it from Task Manager.
  • CurrPorts is a program that can be used to check and close socket tcp connection with gui.

SerialEM-CCD plugin can output the command it issues and results to DM's result panel if you set the environment variable SERIALEMCCD_DEBUG to larger than 0. Set to 1 to show general log. Set to 2 to also include socket communication log. Please activate this debug log and include the portion that shows problem when reporting problems to Leginon team.

Programs to open before Leginon Client: Digital Micrograph

Updated by Anchi Cheng over 8 years ago · 4 revisions