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