Project

General

Profile

Gatan K2 installation and setup » History » Version 27

Anchi Cheng, 11/10/2015 06:01 PM

1 1 Anchi Cheng
h1. Gatan K2 unique installation and setup
2
3 6 Anchi Cheng
h2. Gatan K2 is controlled by a computer separated from the microscope
4
5
Please read [[Using_Leginon_on_a_system_where_the_microscope_and_camera_are_controlled_by_different_computers]] first.
6
7 4 Anchi Cheng
h2. Extra Package and Installation
8 1 Anchi Cheng
9
* Use all amd64 version of Windows installer
10
11 12 Anchi Cheng
* SerialEM DigitalMicrograph Plug-in
12 13 Anchi Cheng
13 1 Anchi Cheng
{{include(Install_SerialEM_DigitalMicrograph_plugin)}}
14
15
h2. instruments.cfg
16
17
{{include(Gatan_K2_Instruments_cfg)}}
18
19 2 Anchi Cheng
h2. Setup
20 21 Anchi Cheng
!camera_configuration.png!
21 14 Anchi Cheng
* Set camera configuration to give the [[Leginon Image Orientation|standard Leginon orientation]].  For example, we need 270 degree rotation and flip around the vertical axis on FEI F20.  Note that the rotation required is different if it is installed post-GIF and/or on Krios.
22 8 Anchi Cheng
* Set the [[Low_dose_shutter_configuration_for_Gatan_camera_in_Digital_Micrograph_program|shutter configuration in DM]] to protect the specimen when camera is not taking images.
23 15 Anchi Cheng
* 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.  pyscope/dmsem.py has hard-coded values for these precision. Compare them to the precision of the DM version you have since it may change with DM version.
24
* K2 frame exposure time is adjustable in Leginon gui.  However, you need to check if the number is acceptable by DM using the above method.
25
* Create the folder to store the dose fractionation raw frames.  Frames are saved as unsigned 16-bit mrc image stack in K2 computer under D:\frames by default as set in the code inside pyscope/dmsem.py in the function calculateFileSavingParams.  You must create the frames directory first.  Leginon will not do that for you.  You may change where the frames are saved here but will need to make corresponding changes when setting up [[DDD_raw_frame_file_transfer|raw frame file transfer]]
26 1 Anchi Cheng
* Setup [[DDD_raw_frame_file_transfer|raw frame file transfer]] from a network data server.
27 15 Anchi Cheng
* Unless you want to develop your own frame alignment program.  We recommend that you [[appion:Direct_Detector_Frame_Processing|use Appion to do frame gain correction and alignment]].  These are parallelized by images so it cam almost keep up with the acquisition.
28 2 Anchi Cheng
29 16 Anchi Cheng
h2. (Version 3.0) Change Flag in pyscope/dmsem.py if you have DM 2.30 version and requires flip/rotation to give the Leginon orientation.
30 10 Anchi Cheng
31 16 Anchi Cheng
In standard python site-package installation, this file is at C:\Python27\Lib\site-packages\pyscope\dmsem.py
32 10 Anchi Cheng
33
Find this line near the top:
34
<pre>
35
isDM230 = False
36
</pre>
37
Change it to
38
<pre>
39 1 Anchi Cheng
isDM230 = True
40
</pre>
41 16 Anchi Cheng
42 19 Anchi Cheng
h2. (Version 3.1) Define local configuration
43 20 Anchi Cheng
44
h2. In C:\Python27\Lib\site-packages\pyscope/dmsem.py
45 16 Anchi Cheng
46
<pre>
47
# DM Version
48
DM_VERSION = '2.30.542.0'
49
# the value in DM camera config
50
K2_CONFIG_FLIP = True
51
# multiple of 90 degrees (i.e. put 1 if 90 degrees, 3 if 270 degrees)
52
K2_CONFIG_ROTATE = 3
53
# raw frame base directory. Use '\\' as path separator
54
RAW_FRAME_DIR = 'D:\\frames\\'
55
</pre>
56
57 17 Anchi Cheng
1. Find DM_Version in DM gui under its menu bar : /Help/About DigitalMicrograph
58 18 Anchi Cheng
2. Fill in K2_CONFIG_FLIP and K2_CONFIG_ROTATE according to DM gui under its menu bar: /Camera/Configure Camera.  The comment line above the value setting explains the meaning of the value.
59 16 Anchi Cheng
3. Enter the drive the directory where raw frames will be saved.
60
61 23 Anchi Cheng
h2. (Version 3.2) Define local configuration in dmsem.cfg
62
63 27 Anchi Cheng
Copy from your myami checkout pyscope/dmsem.cfg.template to C:\Program Files\myami\dmsem.cfg
64 23 Anchi Cheng
Make change to the configured value in dmsem.cfg
65
66
Most parameters are explained above.
67
68 25 Anchi Cheng
* *The config parser takes "'" and "\" literally*.  Therefore, do not include "'" in DM_VERION and RAW_FRAME_DIR.  In addition, the path separator should be "\"
69 23 Anchi Cheng
* *EARLY_RETURN_FRAME_COUNT* specifies the number of frames you want to integrate and return to you before all frames are saved.  This reduces idle time for the scope, but it may cause memory leak in super-resolution mode See Issue #3750 for update on this feature.
70
71 10 Anchi Cheng
72 1 Anchi Cheng
h2. Testing with pyscope
73
74 5 Anchi Cheng
{{include(Gatan_K2_Installation_Pyscope_Test)}}
75 1 Anchi Cheng
76 6 Anchi Cheng
h2. Programs to open before Leginon Client: Digital Micrograph
77
78
h2. See more about K2 implementation in [[Using_Gatan_K2_Summit_in_Leginon]]