Project

General

Profile

Installation on the microscope computer » History » Version 66

Anchi Cheng, 06/14/2012 02:02 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 11 Anchi Cheng
Only processing-side of Leginon system is needed
6 1 Amber Herold
7 21 Anchi Cheng
h1. Package requirement
8 1 Amber Herold
9 21 Anchi Cheng
h2.  Python and Support Packages (Note that python 2.5 must be used):
10 1 Amber Herold
11 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:
12 11 Anchi Cheng
13 38 Anchi Cheng
|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 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|
17 38 Anchi Cheng
|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 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.
22
23 21 Anchi Cheng
h2. SVN client used for check out from our repository
24 12 Anchi Cheng
25
This required for following this instruction. We have used Tortois SVN client.  Alternatively, you may copy the required NRAMM source files from another computer.
26
27
|_.Name:|_.Download site:|
28 11 Anchi Cheng
|Tortoise SVN client| "http://tortoisesvn.tigris.org":http://tortoisesvn.tigris.org|
29
30 1 Amber Herold
31 21 Anchi Cheng
h2.  Required supporting programs for the CCD camera from camera makers
32 1 Amber Herold
33 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:
34 1 Amber Herold
35
|_.Camera Make:|_.File:|
36
| Gatan|TecnaiCCD.dll|
37
| Tietz|CAMC4.exe*|
38 63 Anchi Cheng
| DirectElectronDE12|DirectElectronAPI.exe|
39 1 Amber Herold
40 21 Anchi Cheng
h2.  Supporting programs for film exposure
41 11 Anchi Cheng
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 21 Anchi Cheng
h2. Packages required from NRAMM
48 11 Anchi Cheng
49 25 Jim Pulokas
h3. These are the sub-packages of myami that 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
58 47 Anchi Cheng
*For FEI Eagle Camera or Gatan Camera that uses TIA, comarray package needs to be install with python
59 46 Jim Pulokas
*[[Special Instructions for FEI Eagle Camera]]
60 1 Amber Herold
61 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.
62 11 Anchi Cheng
63 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.
64 1 Amber Herold
65 17 Anchi Cheng
|_.Downloadfile Name|_.Purpose:|
66
|numextension-2.0.0.win32-py2.5.exe|c extension for numerical processing|
67 45 Jim Pulokas
|comarray-2.0.0.win32-py2.5.exe|com module output conversion to array|
68 17 Anchi Cheng
|libCV-0.2.win32-py2.5.exe|small c library of algorithm from computer vision field|
69 11 Anchi Cheng
70 21 Anchi Cheng
h1. Installation
71 11 Anchi Cheng
72 66 Anchi Cheng
h2. Add the IP address and matching hostname of the microscope computer in your host file on the main Leginon computer, and vice versa.
73
74
Modify your host file to include the host (Create it if not exist).
75
76
*  On Linux, this file is
77
> /etc/hosts
78
79
80
*  On Window XP, this file is
81
> C:\\WINDOWS\system32\drivers\etc\hosts
82
83
84
*  On Window NT, this file is
85
> C:\\WINNT\system32\drivers\etc\hosts
86
87
h3. The Linux main Leginon computer also needs to identify itself by its hostname registered on Microscope Windows computer.
88
89
To confirm what python thinks the hosname is, run the following in python command line:
90
<pre>
91
import socket
92
socket.gethostname()
93
</pre>
94
95
96 60 Anchi Cheng
h2. Register TecnaiCCD.dll, CAMC4.exe (For Tietz camera), and adaexp.exe (For film exposure)
97 1 Amber Herold
98 59 Jim Pulokas
*  From the command prompt, run the following commands.  You may need to enter the full path of the exe or dll:
99 58 Jim Pulokas
<pre>adaexp.exe /regserver
100
CAMC4.exe /regserver
101 59 Jim Pulokas
REGSVR32 TecnaiCCD.dll</pre>
102 18 Anchi Cheng
103 26 Jim Pulokas
h2. Install Python and supporting packages with their installers
104 11 Anchi Cheng
105 26 Jim Pulokas
Excute the installer files and follow the instructions.
106 11 Anchi Cheng
107 12 Anchi Cheng
108 60 Anchi Cheng
h2. Install the Windows Installer Files from Leginon website http://emg.nysbc.org/projects/leginon/files
109 1 Amber Herold
110 49 Anchi Cheng
Execute the installer files and follow the instructions. *Do not execute comarray-2.0.0.win32-py2.5.3x3 if your camera uses TIA*.  See earlier section above.
111 1 Amber Herold
112 60 Anchi Cheng
h2. Check out SVN Source Files from the repository
113 1 Amber Herold
114 11 Anchi Cheng
Use your mouse to do the following
115 65 Anchi Cheng
* Create Leginon2.2 directory somewhere at your convenience
116 1 Amber Herold
117 65 Anchi Cheng
* Change directory into Leginon2.2
118 1 Amber Herold
119
* Right-click the mouse botton in this directory window and select Tortoise svn
120
Checkout in the menu:
121
 !http://emg.nysbc.org/software/leginon/images/images/svnmenu.png!
122 11 Anchi Cheng
123 1 Amber Herold
124 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
125 11 Anchi Cheng
 !http://emg.nysbc.org/software/leginon/images/images/svnco.png!
126
127
128 60 Anchi Cheng
h2. Install the packages you downloaded from NRAMM svn repository
129 1 Amber Herold
130 11 Anchi Cheng
* Start a command line Window from Start Menu
131 1 Amber Herold
132 12 Anchi Cheng
* Install the package in each folder with commands such as
133 65 Anchi Cheng
<pre>cd Your_Download_Place\Leginon2.2\leginon
134 12 Anchi Cheng
c:\\python25\python.exe setup.py install</pre>
135 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.
136 12 Anchi Cheng
137 60 Anchi Cheng
h2. Run updatecom.py
138 1 Amber Herold
139 33 Jim Pulokas
From a command line window:
140
141
<pre>cd C:\python25\Lib\Site-Packages\pyScope
142
C:\python25\python.exe updatecom.py</pre>
143
144
The python window appears should say show the required type libraries it found:
145
<pre>
146
Generating .py files from type libraries...
147
initializing TEM Scripting Error, cannot find typelib for "TEM Scripting"
148
initializing Tecnai Scripting done.
149
initializing TOM Moniker done.
150
initializing Tecnai Low Dose Kit done.
151
initializing Tecnai Exposure Adaptor done.
152
153
initializing Tietz CCD Camera done.
154
</pre>
155
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".
156
157 1 Amber Herold
You will only find Tecnai Exposure Adaptor (Scripting for film exposure) if you ask FEI for it.
158
159
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
160
161 64 Anchi Cheng
{{include(locate global config directory on Windows)}}
162 60 Anchi Cheng
163
h2. Configure leginon.cfg:
164
165 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.
166
167 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)
168 55 Anchi Cheng
169 61 Anchi Cheng
 <pre> <Global configuration directory>\leginon.cfg</pre>
170 11 Anchi Cheng
171 55 Anchi Cheng
 Example:
172 61 Anchi Cheng
 <pre> C:\Programs\myami\leginon.cfg</pre>
173 11 Anchi Cheng
174 1 Amber Herold
175 40 Anchi Cheng
* The skeleton (default) configuration file is available at:
176 55 Anchi Cheng
177 1 Amber Herold
 <pre> C:\Python25\Lib\site-packages\leginon\leginon.cfg.template</pre>
178
179 33 Jim Pulokas
180 60 Anchi Cheng
h2. Configure sinedon.cfg:
181 11 Anchi Cheng
182 1 Amber Herold
Follow instruction in [[Configure sinedon.cfg]] in the section for Linux installation but note the location of the configuration files follows.
183
184 10 Anchi Cheng
185 61 Anchi Cheng
 * (Recommanded on microscope computer) For all users, put sinedon.cfg in the *global configuration directory* such as
186
 <pre>C:\Programs\myami\sinedon.cfg</pre>
187 1 Amber Herold
188
 * the skeleton sinedon configuration file is
189 10 Anchi Cheng
 <pre>C:\Python25\Lib\site-packages\sinedon\examples\sinedon.cfg</pre>
190 1 Amber Herold
191
h2. Configure instruments.cfg:
192
193 61 Anchi Cheng
* A template for instruments.cfg is in the installed pyscope directory as "instruments.cfg.template".  Copy it to
194
 <pre>C:\Programs\myami\instruments.cfg</pre>
195 60 Anchi Cheng
196 1 Amber Herold
* Remove the Sim Tem and Sim Cam modules in the configuration.
197
198 61 Anchi Cheng
* Add the modules for your microscope and camera. 
199
** If you have Direct Electron camera DE12, your camera module.class is de.DE12
200
** If your microscope uses Tecnai Scripting Interface, youe scope module.class is tecnai.Tecnai
201
** If you have a Gatan camera that you interface through DigitalMicrograph, your camera module.class is gatan.Gatan
202 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.
203
204 55 Anchi Cheng
{{include(instruments.cfg for 2.2)}}
205 1 Amber Herold
206
The file contains other examples of microscope and camera drivers that we distribute from NRAMM.
207
208 60 Anchi Cheng
h2. Additional setup on Tietz cameras
209 1 Amber Herold
210 42 Anchi Cheng
Register the Tietz ping callback function.  From a command line window:
211 29 Jim Pulokas
212 1 Amber Herold
<pre>cd C:\python25\Lib\Site-Packages\pyscope
213
C:\python25\python.exe tietzping.py</pre>
214 57 Jim Pulokas
215 1 Amber Herold
Troubleshooting Tietz cameras:
216 57 Jim Pulokas
217
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.
218
219
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.
220
221
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.
222
223 60 Anchi Cheng
h2. For strange dimension cameras
224 1 Amber Herold
225 36 Anchi Cheng
{{include(strange dimension cameras)}}
226 1 Amber Herold
227 60 Anchi Cheng
h2. Create Leginon Admin and Leginon Client shortcut in Start menu menu under Leginon
228 1 Amber Herold
229
230 11 Anchi Cheng
This instruction applies to Windows XP.
231 1 Amber Herold
232
233
 * Go to C:\Documents and Settings\All Users\Start Menu\Programs\ and create a new
234 11 Anchi Cheng
folder named Leginon.
235
236 1 Amber Herold
237
 * In another window, go to
238
 <pre>C:\Python25\Lib\site-packages\leginon</pre>
239 11 Anchi Cheng
240
241 51 Neil Voss
 * Create a shortcut from start-leginon.py as "Leginon Admin" and a shortcut from launcher.py as "Leginon Client".
242 11 Anchi Cheng
243 1 Amber Herold
244 11 Anchi Cheng
 * Move the two shortcuts into
245
 <pre>C:\Documents and Settings\All Users\Start Menu\Programs\Leginon</pre>
246
247
248
249 60 Anchi Cheng
h2. Mapping Drives (Optional):
250 11 Anchi Cheng
251 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/.
252 11 Anchi Cheng
253
*  Start, My Computer
254
255
256
*  Tools menu, Map network drive
257
258
259
*  Use an unmapped drive such as Z:
260
261 12 Anchi Cheng
 Enter shared path in Windows format as
262 11 Anchi Cheng
 <pre>\\your_smbserver\your_share_point</pre>
263
264
265 12 Anchi Cheng
*  Add the drive and the Linux path to leginon.cfg on the Windows machine as
266 11 Anchi Cheng
 <pre>[Drive Mapping]
267
Z:/your_data_path</pre>
268
269
270 12 Anchi Cheng
*  Add image path to leginon.cfg on the Windows machine in Linux format as
271 11 Anchi Cheng
 <pre>[Images]
272
path:/your_data_path/leginon</pre>
273
274
275
h2.  Additional Software (Optional):
276 3 Amber Herold
277 12 Anchi Cheng
TightVNC (http://www.tightvnc.com) if you get tired of going into the microscope room just to open the column valves.
278 1 Amber Herold
279 3 Amber Herold
280 1 Amber Herold
______
281
282 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 >]]
283 1 Amber Herold
284
285
______