Project

General

Profile

Installation on the microscope computer » History » Version 12

Anchi Cheng, 05/20/2010 10:29 PM

1 11 Anchi Cheng
h1. Installation on the microscope computer
2 1 Amber Herold
3 11 Anchi Cheng
Only processing-side of Leginon system is needed
4 1 Amber Herold
5 11 Anchi Cheng
h2. Package requirement
6 1 Amber Herold
7 12 Anchi Cheng
h3.  Python and Support Packages (Note that python 2.5 must be used):
8 1 Amber Herold
9 11 Anchi Cheng
This list does not include pyton XML module because it is included in the python
10
package for window.
11
12
|Python 2.5*| "http://www.python.org":http://www.python.org|
13
|Python for Windows extension (pywin32)| "http://sourceforge.net/projects/pywin32/":http://sourceforge.net/projects/pywin32/|
14
|wxPython 2.5.2.8 or newer| "http://www.wxpython.org":http://www.wxpython.org|
15
|MySQL Python client 1.2 or newer| "http://sourceforge.net/projects/mysql-python":http://sourceforge.net/projects/mysql-python|
16
|Python Imaging Library (PIL) 1.1.4 or newer| "http://www.pythonware.com/products/pil/":http://www.pythonware.com/products/pil/|
17
|NumPy 1.0b5 (tested, others may work)| "http://www.scipy.org":http://www.scipy.org|
18 1 Amber Herold
|SciPy 0.5.1 or newer| "http://www.scipy.org":http://www.scipy.org|
19
20 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.
21
22
h3. SVN client used for check out from our repository
23
24
This required for following this instruction. We have used Tortois SVN client.  Alternatively, you may copy the required NRAMM source files from another computer.
25
26
|_.Name:|_.Download site:|
27 11 Anchi Cheng
|Tortoise SVN client| "http://tortoisesvn.tigris.org":http://tortoisesvn.tigris.org|
28
29 1 Amber Herold
30 11 Anchi Cheng
h3.  Required supporting programs for the CCD camera from camera makers
31 1 Amber Herold
32
Install and register the following programs for CCD cameras from the two makes:
33
34
|_.Camera Make:|_.File:|
35
| Gatan|TecnaiCCD.dll|
36 11 Anchi Cheng
| Tietz|CAMC4.exe*|
37 1 Amber Herold
38 11 Anchi Cheng
*Note:* We have experienced slowness of the CAMC4.exe comes with later version Tecnai TUI/TIA. Replacing it with an earlier version of CAMC4.exe resolved the problem
39 1 Amber Herold
40 11 Anchi Cheng
h3.  Supporting programs for film exposure
41
42 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.
43 11 Anchi Cheng
44
|_.Name:|_.File:|
45 1 Amber Herold
| exposure adaptor|adaexp.exe|
46
47
h3. Packages required from NRAMM
48 11 Anchi Cheng
49 1 Amber Herold
h4. These are the sub-packages you will install with the python installer.
50 11 Anchi Cheng
51 1 Amber Herold
|_.Name:|_.Purpose:|
52 11 Anchi Cheng
| leginon|modular TEM image acquisition|
53
| pyami|general functions|
54
| sinedon|Leginon/database interaction|
55
| pyscope|microscope control and monitoring|
56
| imageviewer|image viewing for tomography|
57 1 Amber Herold
|comarray|com module output conversion to array|
58
59 11 Anchi Cheng
*For Gatan Camera or FEI Eagle Camera that uses TIA, comarray package need to be install
60
with python
61 1 Amber Herold
62
63 12 Anchi Cheng
Because numextension and libcv requires extra compilers, we have created window installer for them for python 2.5 and made them available through  "http://www.leginon.org/":http://www.leginon.org/.
64 11 Anchi Cheng
65 1 Amber Herold
h4. These are the Leginon v2.0 python 2.5 compiled packages installed through python installer on Windows.
66 11 Anchi Cheng
67 1 Amber Herold
|_.Downloadfile Name|_.Installed Python Package File|_.Purpose:|
68 11 Anchi Cheng
|NumExtension-1.2.0.win32-py2.5.exe|numextension.pyd|c extension for numerical processing|
69
|libCV-0.2.win32-py2.5.exe|libCV.pyd|small c library of algorithm from computer vision field|
70
71 1 Amber Herold
h2. Installation
72 11 Anchi Cheng
73 1 Amber Herold
h3. Install Python and supporting packages with their installer
74 11 Anchi Cheng
75 1 Amber Herold
Excute the installer files and follow the instruction.
76 11 Anchi Cheng
77 12 Anchi Cheng
78 11 Anchi Cheng
h3. Install the two Window Installer Files from Leginon website "http://www.leginon.org/":http://www.leginon.org/
79 1 Amber Herold
80 11 Anchi Cheng
Excute the installer files and follow the instruction.
81 1 Amber Herold
82 11 Anchi Cheng
h3. Check out SVN Source Files from the depository
83 1 Amber Herold
84 11 Anchi Cheng
Use your mouse to do the following
85
* Create Leginon2.0 directory somewhere at your convenience
86 1 Amber Herold
87
* Change directory into Leginon2.0
88
89
* Right-click the mouse botton in this directory window and select Tortoise svn
90
Checkout in the menu:
91
 !http://emg.nysbc.org/software/leginon/images/images/svnmenu.png!
92 11 Anchi Cheng
93 1 Amber Herold
94
* Set up svn checkout window like this to check out from http://emg.nysbc.org/svn/myami/trunk to Leginon2.0
95 11 Anchi Cheng
 !http://emg.nysbc.org/software/leginon/images/images/svnco.png!
96
97
98 1 Amber Herold
h3. Install the packages you downloaded from NRAMM svn depository
99
100 11 Anchi Cheng
* Start a command line Window from Start Menu
101 1 Amber Herold
102 11 Anchi Cheng
* Install the package in each folder with commands such as
103 1 Amber Herold
<pre>cd Your_Download_Place\Leginon2.0\leginon
104 11 Anchi Cheng
c:\\python25\python.exe setup.py install</pre>
105
106 12 Anchi Cheng
h4.  Register TecnaiCCD.dll, CAMC4.exe, and adaexep.exe
107
108
*  For example, from the command prompt:
109
<pre>adaexp.exe /regserver</pre>
110
111 11 Anchi Cheng
h2.  Configure leginon.cfg:
112
113 12 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 above.
114 1 Amber Herold
115
* Configurations for all users
116 11 Anchi Cheng
117 1 Amber Herold
 <pre> <Python directory>\Lib\site-packages\Leginon\config\leginon.cfg</pre>
118 11 Anchi Cheng
119 1 Amber Herold
 Example:
120 11 Anchi Cheng
 <pre> C:\Python25\Lib\site-packages\Leginon\config\leginon.cfg</pre>
121
122 1 Amber Herold
123 11 Anchi Cheng
* Configurations for individual users
124 1 Amber Herold
125 11 Anchi Cheng
 <pre> <Home directory>\leginon.cfg</pre>
126
127 1 Amber Herold
 Example:
128
 <pre> C:\Documents and Settings\Leginon User\leginon.cfg </pre>
129 10 Anchi Cheng
130 11 Anchi Cheng
131 1 Amber Herold
* A skeleton (default) configuration file is available:
132 11 Anchi Cheng
133 1 Amber Herold
 <pre> C:\Python25\Lib\site-packages\Leginon\config\default.cfg</pre>
134
135 11 Anchi Cheng
136
h2.  Configure sinedon.cfg:
137 1 Amber Herold
138 12 Anchi Cheng
Follow instruction in [[Configure sinedon.cfg]] in the section for Linux installation but note the location of the configuration files follows.
139 11 Anchi Cheng
140
141 1 Amber Herold
 * For all users, put sinedon.cfg with the installed package as
142
 <pre>C:\Python25\Lib\site-packages\sinedon\sinedon.cfg</pre>
143 11 Anchi Cheng
144
145 1 Amber Herold
 * Your home directory on Windows:
146
 <pre>C:\Documents and Settings\your_name></pre>
147 11 Anchi Cheng
148
149 1 Amber Herold
 * the skeleton sinedon configuration file is
150
 <pre>C:\Python25\Lib\site-packages\sinedon\examples\sinedon.cfg</pre>
151
152
h2. Modify instruments.cfg:
153
154 12 Anchi Cheng
* Modify the file instruments.cfg in the installed pyScope directory to that for your microscope and camera. For example, if your microscope uses Tecnai Scripting Interface and you have a Gatan camera that you interface through DigitalMicrograph:
155 1 Amber Herold
156
<pre>[tem]
157 10 Anchi Cheng
class: tecnai.Tecnai
158
[camera]
159
class: gatan.Gatan</pre>
160 1 Amber Herold
161 10 Anchi Cheng
The file contains other examples of microscope and camera drivers that we distribute from NRAMM.
162
163
h2. Run updatecom.py
164
165
From a command line window:
166 1 Amber Herold
167 10 Anchi Cheng
<pre>cd C:\python25\Lib\Site-Packages\pyScope
168
C:\python25\python.exe updatecom.py</pre>
169
170
The python window appears should say show the required type libraries it found:
171 1 Amber Herold
<pre>
172
Generating .py files from type libraries...
173
initializing TEM Scripting Error, cannot find typelib for "TEM Scripting"
174
initializing Tecnai Scripting done.
175
initializing TOM Moniker done.
176
initializing Tecnai Low Dose Kit done.
177
initializing Tecnai Exposure Adaptor done.
178
179
initializing Tietz CCD Camera done.
180
</pre>
181
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".
182
183
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
184
185
186
h2. Additional setup on Tietz PXL camera (optional)
187
188
189 12 Anchi Cheng
The actual Tietz PXL camera dimension is slightly larger than 2048 x 2048. If you'd like to take the images using the maximum of 2048 x 2048 pixels, you may modify the function that get camera dimension in tietz.py of pyScope package.
190 1 Amber Herold
191
192
*  Go to C:\Python25\Lib\site-packages\pyScope\
193
194
195
*  Edit tietz.py with a plain text editor
196
197
198
*  Find the lines:
199
200
<pre> def getCameraSize(self):
201
# {'type': dict, 'values': {'x': {'type': int}, 'y': {'type': int}}}}
202
x = self._getParameterValue('cpTotalDimensionX')
203
y = self._getParameterValue('cpTotalDimensionY')
204
return {'x': x, 'y': y}
205
</pre>
206
207
*  Change the last line to:
208
209 11 Anchi Cheng
<pre>    return {'x': 2048, 'y': 2048}</pre>
210 1 Amber Herold
211 11 Anchi Cheng
h2.  Create Leginon and Leginon Client shortcut in Start menu menu under Leginon
212 1 Amber Herold
213
214
This instruction applies to Windows XP.
215 11 Anchi Cheng
216 1 Amber Herold
217
 * Go to C:\Documents and Settings\All Users\Start Menu\Programs\ and create a new
218
folder named Leginon.
219 11 Anchi Cheng
220
221 1 Amber Herold
 * In another window, go to
222
 <pre>C:\Python25\Lib\site-packages\leginon</pre>
223 11 Anchi Cheng
224
225
 * Create a shortcut from start-leginon.py as Leginon and a shortcut from launcher.py as Leginon Client.
226
227 1 Amber Herold
228 11 Anchi Cheng
 * Move the two shortcuts into
229
 <pre>C:\Documents and Settings\All Users\Start Menu\Programs\Leginon</pre>
230
231
232
233
h2.  Mapping Drives:
234
235
If you plan to run Leginon directly on the Windows machine, and your data files are served through a Samba server on a Linux machine, 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/.
236
237
*  Start, My Computer
238
239
240
*  Tools menu, Map network drive
241
242
243
*  Use an unmapped drive such as Z:
244
245 12 Anchi Cheng
 Enter shared path in Windows format as
246 11 Anchi Cheng
 <pre>\\your_smbserver\your_share_point</pre>
247
248
249 12 Anchi Cheng
*  Add the drive and the Linux path to leginon.cfg on the Windows machine as
250 11 Anchi Cheng
 <pre>[Drive Mapping]
251
Z:/your_data_path</pre>
252
253
254 12 Anchi Cheng
*  Add image path to leginon.cfg on the Windows machine in Linux format as
255 11 Anchi Cheng
 <pre>[Images]
256
path:/your_data_path/leginon</pre>
257
258
259
h2.  Additional Software (Optional):
260 3 Amber Herold
261 12 Anchi Cheng
TightVNC (http://www.tightvnc.com) if you get tired of going into the microscope room just to open the column valves.
262 3 Amber Herold
263 1 Amber Herold
264
______
265
266 11 Anchi Cheng
[[Linux Installation|< Linux Installation]] | [[Next Steps|Next Steps >]]
267 1 Amber Herold
268
269
______