Project

General

Profile

Installation on the microscope computer » History » Version 83

Anchi Cheng, 11/08/2013 01:07 PM

1 56 Anchi Cheng
h1. Installation on the microscope computer for 2.2
2 1 Amber Herold
3 65 Anchi Cheng
h2. If you are installing 2.1, see [[Installation on the microscope compute 2.1]]
4 54 Anchi Cheng
5 83 Anchi Cheng
h2. If you are installing pre-released 3.0 version (required for Gatan K2 Summit and FEI Falcon support), see [[Installation on the instrument computers]]
6 71 Anchi Cheng
7 11 Anchi Cheng
Only processing-side of Leginon system is needed
8 1 Amber Herold
9 21 Anchi Cheng
h1. Package requirement
10 1 Amber Herold
11 21 Anchi Cheng
h2.  Python and Support Packages (Note that python 2.5 must be used):
12 1 Amber Herold
13 24 Jim Pulokas
This list does not include the python XML module because it is included in the python package for Windows.  You should generally be able to use the most recent versions of these packages that are available from their respective web sites.  Just be sure to always get the version that is compatible with Python 2.5.  If you are having trouble with the most recent version, try to use the specific versions listed here:
14 11 Anchi Cheng
15 38 Anchi Cheng
|Python 2.5*| "http://www.python.org":http://www.python.org||
16
|Python for Windows extension (pywin32)| "http://sourceforge.net/projects/pywin32/":http://sourceforge.net/projects/pywin32/||
17
|wxPython 2.5.2.8 or newer| "http://www.wxpython.org":http://www.wxpython.org||
18 39 Anchi Cheng
|MySQL Python client 1.2 or newer| "http://sourceforge.net/projects/mysql-python":http://sourceforge.net/projects/mysql-python|1.2.3 doesn't have window installer, yet, use 1.2.2|
19 38 Anchi Cheng
|Python Imaging Library (PIL) 1.1.4 or newer| "http://www.pythonware.com/products/pil/":http://www.pythonware.com/products/pil/||
20
|NumPy 1.0b5 (tested, others may work)| "http://www.scipy.org":http://www.scipy.org||
21
|SciPy 0.5.1 or newer| "http://www.scipy.org":http://www.scipy.org||
22 1 Amber Herold
23 12 Anchi Cheng
*Python 2.5 is the only python version that we have compiled numExtension. libCV and comarray in. Therefore no other python version works for now.
24
25 21 Anchi Cheng
h2. SVN client used for check out from our repository
26 12 Anchi Cheng
27
This required for following this instruction. We have used Tortois SVN client.  Alternatively, you may copy the required NRAMM source files from another computer.
28
29
|_.Name:|_.Download site:|
30 11 Anchi Cheng
|Tortoise SVN client| "http://tortoisesvn.tigris.org":http://tortoisesvn.tigris.org|
31
32 1 Amber Herold
33 21 Anchi Cheng
h2.  Required supporting programs for the CCD camera from camera makers
34 1 Amber Herold
35 25 Jim Pulokas
Install and register the following programs for CCD cameras from the two makes.  Most likely, you already have these installed when the camera and TEM software was installed:
36 1 Amber Herold
37
|_.Camera Make:|_.File:|
38
| Gatan|TecnaiCCD.dll|
39
| Tietz|CAMC4.exe*|
40 63 Anchi Cheng
| DirectElectronDE12|DirectElectronAPI.exe|
41 1 Amber Herold
42 21 Anchi Cheng
h2.  Supporting programs for film exposure
43 11 Anchi Cheng
44 12 Anchi Cheng
Install the following if you need film exposure on FEI Tecnai TEM through Leginon, available through FEI. Please contact Max Otten: mto@feico.com and request for adaexp.exe that works with your version of Tecnai user interface program.
45 11 Anchi Cheng
46
|_.Name:|_.File:|
47 1 Amber Herold
| exposure adaptor|adaexp.exe|
48
49 21 Anchi Cheng
h2. Packages required from NRAMM
50 11 Anchi Cheng
51 25 Jim Pulokas
h3. These are the sub-packages of myami that you will install with the python installer.
52 11 Anchi Cheng
53 1 Amber Herold
|_.Name:|_.Purpose:|
54 11 Anchi Cheng
| leginon|modular TEM image acquisition|
55
| pyami|general functions|
56
| sinedon|Leginon/database interaction|
57
| pyscope|microscope control and monitoring|
58
| imageviewer|image viewing for tomography|
59
60 74 Jim Pulokas
* For FEI Eagle Camera or Gatan Camera that uses TIA, comarray package needs to be install with python
61
* [[Special Instructions for FEI Eagle Camera]]
62
* In Testing:  Comarray will soon be retired.  We will be using the third party package "comtypes" instead.  See instructions here: [[Installing comtypes]].
63 1 Amber Herold
64 25 Jim Pulokas
Because numextension, comarray and libcv would require extra compilers if you build them yourself, we have created Windows installers for them for python 2.5 and made them available at http://emg.nysbc.org/projects/leginon/files.
65 11 Anchi Cheng
66 65 Anchi Cheng
h3. These are the Leginon v2.0 python 2.5 compiled packages installed through python installer on Windows. Leginon v2.2 uses the same files.
67 1 Amber Herold
68 17 Anchi Cheng
|_.Downloadfile Name|_.Purpose:|
69
|numextension-2.0.0.win32-py2.5.exe|c extension for numerical processing|
70 45 Jim Pulokas
|comarray-2.0.0.win32-py2.5.exe|com module output conversion to array|
71 70 Anchi Cheng
|libCV-2.0.0.win32-py2.5.exe|small c library of algorithm from computer vision field|
72 11 Anchi Cheng
73 21 Anchi Cheng
h1. Installation
74 11 Anchi Cheng
75 68 Anchi Cheng
{{include(add host)}}
76 66 Anchi Cheng
77 60 Anchi Cheng
h2. Register TecnaiCCD.dll, CAMC4.exe (For Tietz camera), and adaexp.exe (For film exposure)
78 1 Amber Herold
79 59 Jim Pulokas
*  From the command prompt, run the following commands.  You may need to enter the full path of the exe or dll:
80 58 Jim Pulokas
<pre>adaexp.exe /regserver
81
CAMC4.exe /regserver
82 59 Jim Pulokas
REGSVR32 TecnaiCCD.dll</pre>
83 18 Anchi Cheng
84 26 Jim Pulokas
h2. Install Python and supporting packages with their installers
85 11 Anchi Cheng
86 26 Jim Pulokas
Excute the installer files and follow the instructions.
87 11 Anchi Cheng
88 12 Anchi Cheng
89 60 Anchi Cheng
h2. Install the Windows Installer Files from Leginon website http://emg.nysbc.org/projects/leginon/files
90 1 Amber Herold
91 79 Anchi Cheng
Execute the installer files and follow the instructions. *Do not execute comarray-2.0.0.win32-py2.5.exe if your camera is only controlled by TIA, such as an FEI Eagle camera*.  See [[Special_Instructions_for_FEI_Eagle_Camera]].
92 1 Amber Herold
93 60 Anchi Cheng
h2. Check out SVN Source Files from the repository
94 1 Amber Herold
95 11 Anchi Cheng
Use your mouse to do the following
96 65 Anchi Cheng
* Create Leginon2.2 directory somewhere at your convenience
97 1 Amber Herold
98 65 Anchi Cheng
* Change directory into Leginon2.2
99 1 Amber Herold
100
* Right-click the mouse botton in this directory window and select Tortoise svn
101
Checkout in the menu:
102
 !http://emg.nysbc.org/software/leginon/images/images/svnmenu.png!
103 11 Anchi Cheng
104 1 Amber Herold
105 65 Anchi Cheng
* Set up svn checkout window like this to check out from http://emg.nysbc.org/svn/myami/branches/myami-2.2 to Leginon2.2
106 11 Anchi Cheng
 !http://emg.nysbc.org/software/leginon/images/images/svnco.png!
107
108 80 Anchi Cheng
h2. Remove tifffile.py from pyami suppackage
109
110
This file, needed by DE camera frame processing with Appion can not be compiled with python 2.5.  Therefore, you should remove it from your download before installation.
111
<pre>
112
cd Your_Download_Place\Leginon2.2\pyami
113
del tifffile.py
114
</pre>
115 11 Anchi Cheng
116 60 Anchi Cheng
h2. Install the packages you downloaded from NRAMM svn repository
117 1 Amber Herold
118 11 Anchi Cheng
* Start a command line Window from Start Menu
119 1 Amber Herold
120 12 Anchi Cheng
* Install the package in each folder with commands such as
121 65 Anchi Cheng
<pre>cd Your_Download_Place\Leginon2.2\leginon
122 12 Anchi Cheng
c:\\python25\python.exe setup.py install</pre>
123 50 Neil Voss
Then continue with the other packages, replacing leginon with the package name. See "These are the sub-packages of myami that you will install with the python installer." section above for complete list.
124 12 Anchi Cheng
125 60 Anchi Cheng
h2. Run updatecom.py
126 1 Amber Herold
127 33 Jim Pulokas
From a command line window:
128
129
<pre>cd C:\python25\Lib\Site-Packages\pyScope
130
C:\python25\python.exe updatecom.py</pre>
131
132
The python window appears should say show the required type libraries it found:
133
<pre>
134
Generating .py files from type libraries...
135
initializing TEM Scripting Error, cannot find typelib for "TEM Scripting"
136
initializing Tecnai Scripting done.
137
initializing TOM Moniker done.
138
initializing Tecnai Low Dose Kit done.
139
initializing Tecnai Exposure Adaptor done.
140
141
initializing Tietz CCD Camera done.
142
</pre>
143
The output is of course depending on what is available on your microscope computer.  You should have either "Tecnai Scripting" or the pairing of  "TEM Scripting" and "TOM Moniker".
144
145 1 Amber Herold
You will only find Tecnai Exposure Adaptor (Scripting for film exposure) if you ask FEI for it.
146
147
The script should generate a few files in C:\\python25\Lib\win32com\gen_py with seemly scrambled names such as BC0A2B03-19FF-11D3-AE00-00A024CBA50Cx0x1x9.py
148
149 64 Anchi Cheng
{{include(locate global config directory on Windows)}}
150 60 Anchi Cheng
151
h2. Configure leginon.cfg:
152
153 40 Anchi Cheng
Follow the instructions in [[Configure leginon.cfg|Configure leginon.cfg]] located in the section for Linux installation but note the location of the configuration files follows. In addition, if the storage disk is mapped onto the Windows PC as drive Z, this mapping should be included in leginon.cfg. See below.
154
155 60 Anchi Cheng
* Configurations for all users and all local copy and installation of leginon (Recommended on the microscope computer since users are not expected to start the main processing here)
156 55 Anchi Cheng
157 61 Anchi Cheng
 <pre> <Global configuration directory>\leginon.cfg</pre>
158 11 Anchi Cheng
159 55 Anchi Cheng
 Example:
160 61 Anchi Cheng
 <pre> C:\Programs\myami\leginon.cfg</pre>
161 11 Anchi Cheng
162 1 Amber Herold
163 40 Anchi Cheng
* The skeleton (default) configuration file is available at:
164 55 Anchi Cheng
165 1 Amber Herold
 <pre> C:\Python25\Lib\site-packages\leginon\leginon.cfg.template</pre>
166
167 33 Jim Pulokas
168 60 Anchi Cheng
h2. Configure sinedon.cfg:
169 11 Anchi Cheng
170 1 Amber Herold
Follow instruction in [[Configure sinedon.cfg]] in the section for Linux installation but note the location of the configuration files follows.
171
172 10 Anchi Cheng
173 61 Anchi Cheng
 * (Recommanded on microscope computer) For all users, put sinedon.cfg in the *global configuration directory* such as
174
 <pre>C:\Programs\myami\sinedon.cfg</pre>
175 1 Amber Herold
176
 * the skeleton sinedon configuration file is
177 10 Anchi Cheng
 <pre>C:\Python25\Lib\site-packages\sinedon\examples\sinedon.cfg</pre>
178 1 Amber Herold
179
h2. Configure instruments.cfg:
180
181 61 Anchi Cheng
* A template for instruments.cfg is in the installed pyscope directory as "instruments.cfg.template".  Copy it to
182
 <pre>C:\Programs\myami\instruments.cfg</pre>
183 60 Anchi Cheng
184 1 Amber Herold
* Remove the Sim Tem and Sim Cam modules in the configuration.
185
186 61 Anchi Cheng
* Add the modules for your microscope and camera. 
187
** If you have Direct Electron camera DE12, your camera module.class is de.DE12
188
** If your microscope uses Tecnai Scripting Interface, youe scope module.class is tecnai.Tecnai
189
** If you have a Gatan camera that you interface through DigitalMicrograph, your camera module.class is gatan.Gatan
190 62 Anchi Cheng
** If you have a Tietz camera, there are several choices for the "class" field.  Run the tietztest.py script that comes in pyscope to tell you your available options.
191
192 55 Anchi Cheng
{{include(instruments.cfg for 2.2)}}
193 1 Amber Herold
194
The file contains other examples of microscope and camera drivers that we distribute from NRAMM.
195
196 60 Anchi Cheng
h2. Additional setup on Tietz cameras
197 1 Amber Herold
198 42 Anchi Cheng
Register the Tietz ping callback function.  From a command line window:
199 29 Jim Pulokas
200 1 Amber Herold
<pre>cd C:\python25\Lib\Site-Packages\pyscope
201
C:\python25\python.exe tietzping.py</pre>
202 57 Jim Pulokas
203 1 Amber Herold
Troubleshooting Tietz cameras:
204 57 Jim Pulokas
205
When Leginon initializes the camera, a program called CAMC4 should start automatically in the backgound.  This is confirmed by the little camera icon showing up in the system tray in the lower right of the screen.  Also, task manager can be started to confirm CAMC4 is running.  Sometimes problems occur if more than one CAMC4 is running at the same time, so task manager will help identify this.
206
207
CAMC4 has its own configuration file "CAMC.ini" that will normally be set up already, but you can search for it on your computer and confirm that everything looks right.  It will have configuration parameters for several cameras and only one of them will be activated.  The only parameter that may need some adjustment is the readout geometry, which affects the rotation and mirror of the image.
208
209
If Leginon is not initializing the camera or not getting proper images, you should first test image acquisition using TVIPS software to make sure it is not a hardware issue.  Use TCL or there is a test program called TestMFCCamera that can acquire an image and test the CAMC4 operation.
210
211 60 Anchi Cheng
h2. For strange dimension cameras
212 1 Amber Herold
213 36 Anchi Cheng
{{include(strange dimension cameras)}}
214 1 Amber Herold
215 60 Anchi Cheng
h2. Create Leginon Admin and Leginon Client shortcut in Start menu menu under Leginon
216 1 Amber Herold
217
218 11 Anchi Cheng
This instruction applies to Windows XP.
219 1 Amber Herold
220
221
 * Go to C:\Documents and Settings\All Users\Start Menu\Programs\ and create a new
222 11 Anchi Cheng
folder named Leginon.
223
224 1 Amber Herold
225
 * In another window, go to
226
 <pre>C:\Python25\Lib\site-packages\leginon</pre>
227 11 Anchi Cheng
228
229 51 Neil Voss
 * Create a shortcut from start-leginon.py as "Leginon Admin" and a shortcut from launcher.py as "Leginon Client".
230 11 Anchi Cheng
231 1 Amber Herold
232 11 Anchi Cheng
 * Move the two shortcuts into
233
 <pre>C:\Documents and Settings\All Users\Start Menu\Programs\Leginon</pre>
234
235
236
237 60 Anchi Cheng
h2. Mapping Drives (Optional):
238 11 Anchi Cheng
239 40 Anchi Cheng
Although we don't recommend it, it is possible to run minimal Leginon directly on the Windows machine,  Since the database and web servers are not there, you probably will be saving the images through a Samba server on a network drive also available to the Linux machine.  If you do so, you will need to map the network drive. For example, if your Samba server has a hostname your_smbserver, and you have set up a share called [your_share_point] which points to /your_data_path/ and leginon data will be saved under a folder in /your_data_path/leginon/.
240 11 Anchi Cheng
241
*  Start, My Computer
242
243
244
*  Tools menu, Map network drive
245
246
247
*  Use an unmapped drive such as Z:
248
249 12 Anchi Cheng
 Enter shared path in Windows format as
250 11 Anchi Cheng
 <pre>\\your_smbserver\your_share_point</pre>
251
252
253 12 Anchi Cheng
*  Add the drive and the Linux path to leginon.cfg on the Windows machine as
254 11 Anchi Cheng
 <pre>[Drive Mapping]
255
Z:/your_data_path</pre>
256
257
258 12 Anchi Cheng
*  Add image path to leginon.cfg on the Windows machine in Linux format as
259 11 Anchi Cheng
 <pre>[Images]
260
path:/your_data_path/leginon</pre>
261
262
263
h2.  Additional Software (Optional):
264 3 Amber Herold
265 12 Anchi Cheng
TightVNC (http://www.tightvnc.com) if you get tired of going into the microscope room just to open the column valves.
266 1 Amber Herold
267 69 Jim Pulokas
h2. Gatan K2 Experimental support:
268
269
* [[Gatan K2 Installation Notes]]
270 3 Amber Herold
271 72 Anchi Cheng
* [[Gatan K2 Support Update of trunk from before r17514 to higher than r17561]] 
272
273 1 Amber Herold
______
274
275 41 Anchi Cheng
[[Additional Database Server Setup after Web Server Installation|< Additional Database Server Setup]] | [[Steps involved in the installation| Steps needed for Installation Using Database Administration Tools >]]
276 1 Amber Herold
277 78 Anchi Cheng
If you used *autoinstaller*:  [[Autoinstaller for CentOS| < Autoinstaller for CentOS]] | [[Start_Leginon|Perform Microscope Setup and Test run >]]
278 1 Amber Herold
______