Project

General

Profile

Installation on the microscope computer » History » Version 18

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