Tietz camera installation and setup using EM-MENU » History » Version 4
Anchi Cheng, 11/10/2022 10:38 AM
1 | 1 | Anchi Cheng | h1. Tietz camera installation and setup using EM-MENU |
---|---|---|---|
2 | |||
3 | h2. Many Tietz cameras are 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 | h2. Extra Package and Installation |
||
8 | |||
9 | |_.package |pip installation version| |
||
10 | |CAMC4.exe |(Should come with the camera)| |
||
11 | |comtypes for 64-bit machine|1.1.7| |
||
12 | |||
13 | install comtypes 1.1.7 from cmd terminal (internet connection needed) |
||
14 | or you can go through steps to save the download on another computer (google search pip download) and then copy it to the scope computer to install. |
||
15 | |||
16 | <pre> |
||
17 | pip install comtypes==1.1.7 |
||
18 | </pre> |
||
19 | |||
20 | h2. Run updatecom.py |
||
21 | |||
22 | * From a command line window: |
||
23 | <pre>cd C:\python27\Lib\site-packages\pyscope |
||
24 | C:\python27\python.exe checkcom.py</pre> |
||
25 | |||
26 | * The output sould contain this output |
||
27 | <pre> |
||
28 | checking TVIPS EmMenu |
||
29 | Found COM typelib named: EMMENU4.EMMENYApplication.1 |
||
30 | </pre> |
||
31 | |||
32 | You can ignore error messages regarding other com modules. |
||
33 | |||
34 | h2. Create Leginon Viewport |
||
35 | |||
36 | 4 | Anchi Cheng | {{include(Create_Leginon_view_port)}} |
37 | 1 | Anchi Cheng | |
38 | h2. instruments.cfg |
||
39 | |||
40 | Current available classes are |
||
41 | <pre> |
||
42 | ## - tietz2.EmMenuF416 |
||
43 | ## - tietz2.EmMenuF416_GPU (gpu functions not implemented |
||
44 | ## - tietz2.EmMenuF216 |
||
45 | </pre> |
||
46 | |||
47 | For example, instruments.cfg for F416 looks like this: |
||
48 | <pre> |
||
49 | [Tietz Camera] |
||
50 | class: tietz2.EmMenuF416 |
||
51 | zplane: 5 |
||
52 | height: 4096 |
||
53 | width: 4096 |
||
54 | </pre> |
||
55 | * I use zplane of 5 because this is a bottom-mount camera that does not retract. Therefore it is always the lowest. |
||
56 | |||
57 | h2. Setup tvips.cfg |
||
58 | |||
59 | * A template for tvips.cfg is in the installed pyscope directory as "tvips.cfg.template". Copy it to |
||
60 | <pre>C:\Programs\myami\instruments.cfg</pre> |
||
61 | |||
62 | * Unless you plan to use the unreleased recorder functions, just leave that part as default. |
||
63 | |||
64 | h2. Testing with pyscope |
||
65 | |||
66 | *F416 camera is used in this case* |
||
67 | |||
68 | 1. Open TVIPS TCL/EMMENU |
||
69 | 2. From python command shell or IDLE: |
||
70 | <pre> |
||
71 | from pyscope import tietz2 |
||
72 | t = tietz2.EmMenuF416() |
||
73 | 2 | Anchi Cheng | a=t.getImage() |
74 | a.shape |
||
75 | 1 | Anchi Cheng | </pre> |
76 | 2 | Anchi Cheng | |
77 | You should get (4096,4096) matching the camera dimension. |
||
78 | |||
79 | 3 | Anchi Cheng | If you do |
80 | |||
81 | <pre> |
||
82 | print a |
||
83 | </pre> |
||
84 | |||
85 | you get |
||
86 | 1 | Anchi Cheng | |
87 | {{include(pyscope_test_result_array)}} |
||
88 | |||
89 | h2. Trouble shooting |
||
90 | |||
91 | |||
92 | h2. Programs to open before Leginon Client: None. EMMENU must be opened |