Project

General

Profile

Actions

Installation Guide for DE-12 or DE-20

DE-12 is on a computer separated from the microscope

Please read Using_Leginon_on_a_system_where_the_microscope_and_camera_are_controlled_by_different_computers first.

Extra Package and Installation

program/package notes
DirectElectronAPI.exe (Should come with the camera)
Google protobuf

Protobuf installation instruction

Google Protobuf is an open source communication library DE use between client and server. For C++ programs, it is built into the program, so no external library installation is needed. However, for Python/Leginon only, the library will need to be added. A simple way to install this for python use on DE camera computer (Windows) follows:

  1. Download 2.3.0 source zip file as well as the win32.zip binary file
  2. Unzip both packages.
  3. Copy the binary file protoc-2.3.0-win32/proc.exe into protobuf-2.3.0\protobuf-2.3.0\src folder
  4. Go into protobuf\python and run "python setup.py install".

Note: If it attempts to install 0.6c9 version of setuptools and failed to obtain the file, download the ez_setup.py file from setuptools for Windows 7 at https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py You can then replace the one in your protobuf-2.3.0/python folder.

instruments.cfg

DE12 and DE Survey camera are retract/extend together, with the survey camera at off-axis. Therefore zplane should be set at the same value
For example,

[camera1]
class: de.DE12
zplane: 50

[camera2]
class: de.DESurvey
zplane: 50


height and width should be set according to the model.

orientation setup

Change the orientation in pyscope/de.py for frame orientation definition used in movie frame processing.

# frame flipping configuration.
# default here is for DE-12 orientation on FEI F20
FRAME_LR_FLIP = True
# frame rotate configuration. multiple of 90 degrees if needed
# after the flip.  Direction + is x to -y.
FRAME_ROTATE = 0

Known values:

DE-12 on Tecnai F20: FRAME_LR_FLIP = True, FRAME_ROTATE=0
DE-20 on Tecnai F20: FRAME_LR_FLIP = True, FRAME_ROTATE=-1

Setup

  • Create the folder to store the dose fractionation raw frames. Default location is D:\\frames.
  • Setup raw frame file transfer from a network data server.

Testing

Testing with pyscope

  1. start DE Server
  2. from python command line
    from pyscope import de
    c = de.DE12()
    c.setExposuretime(407)
    c.getImage()
    
    • 407 ms is the 10 frame exposure time at 25.4 Hz default in DE-12

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

Programs to open before Leginon Client: DE Server

See how to use DE camera usage in

Updated by Anchi Cheng over 7 years ago · 16 revisions