How to Update from v16 (Microscope Windows Computer) » History » Version 11
Anchi Cheng, 06/06/2010 07:33 PM
1 | 5 | Anchi Cheng | h1. How to Update from v1.6 (Microscope Windows Computer) |
---|---|---|---|
2 | 1 | Anchi Cheng | |
3 | 3 | Anchi Cheng | The changes from v1.6 requires update of all in-house components of Leginon, dbemtools and database but not the php-mrctools. |
4 | 2 | Anchi Cheng | Don't forget that you need to also update the packages on the microscope-controlling computer |
5 | since the pyScope update need to be synchronized. |
||
6 | 1 | Anchi Cheng | |
7 | 2 | Anchi Cheng | See [[Installation Troubleshooting]] and "Leginon Bulletin Board":http://emg.nysbc.org/bb/viewforum.php?f=2 searching |
8 | 1 | Anchi Cheng | for "install" if you run into problems. |
9 | |||
10 | h2. Packages required from NRAMM |
||
11 | |||
12 | 2 | Anchi Cheng | All Leginon (and Appion) packages distributed from NRAMM are now under one svn control. |
13 | |||
14 | A few updates are needed for preparation of python 3.0 compatibility where the method for importing module is changed. They will still run under python 2.4 and up. |
||
15 | 1 | Anchi Cheng | Here are the packages you need to install with python installer |
16 | |||
17 | 2 | Anchi Cheng | |_.SVN subPackage Name|_.Reason for update:| |
18 | |leginon|new features| |
||
19 | |pyami|new features| |
||
20 | |sinedon|required for updating database| |
||
21 | |pyscope|new method for creating pythoncom modules| |
||
22 | |imageviewer|debug| |
||
23 | 1 | Anchi Cheng | |
24 | Because numextension and libcv requires extra compiler, we have created |
||
25 | 8 | Anchi Cheng | window installer for them for python 2.5 and made them available at http://emg.nysbc.org/projects/leginon/files. |
26 | 1 | Anchi Cheng | |
27 | 8 | Anchi Cheng | |_.Downloadfile Name|_.Purpose:| |
28 | |numextension-2.0.0.win32-py2.5.exe|c extension for numerical processing| |
||
29 | |comarray-2.0.0.win32-py2.5.exe|com module output conversion to array| |
||
30 | |libCV-0.2.win32-py2.5.exe|small c library of algorithm from computer vision field| |
||
31 | |||
32 | 9 | Anchi Cheng | h2. Check out SVN Source Files from the repository |
33 | 1 | Anchi Cheng | |
34 | 2 | Anchi Cheng | Assuming that you have installed some kind of svn client such as TortoiseSVN "http://tortoisesvn.tigris.org/", you can use your mouse to do the following |
35 | *Create Leginon2.0 directory somewhere at your convenience |
||
36 | *Change directory into Leginon2.0 |
||
37 | *Right-click the mouse botton in this directory window and select Tortoise svn |
||
38 | Checkout in the menu:!http://emg.nysbc.org/software/leginon/images/images/svnmenu.png! |
||
39 | 9 | Anchi Cheng | *Set up svn checkout window like this, but check out from http://emg.nysbc.org/svn/myami/branches/myami-2.0 and save it to Leginon2.0 folder !http://emg.nysbc.org/software/leginon/images/images/svnco.png! |
40 | 2 | Anchi Cheng | |
41 | |||
42 | h2. Perform system check if you can't remember where you have installed your Leginon before. |
||
43 | |||
44 | *Go to ~/Leginon2.0/leginon |
||
45 | *Double click on syscheck.py |
||
46 | |||
47 | You should have all the supporting packages installed for v1.6. If you see any lines like "*** Failed...", then you have something missing. Otherwise, everything should result in "OK". |
||
48 | |||
49 | 10 | Anchi Cheng | h2. Uninstall your existing NRAMM packages: |
50 | 1 | Anchi Cheng | |
51 | 10 | Anchi Cheng | Although new installation overwrite the old in most cases, problem has been observed in the past. Therefore, it is best to remove the old files before new installation. |
52 | 1 | Anchi Cheng | |
53 | Use "Add or Remove Programs" application in "Control Panel" to do this. Leginon related |
||
54 | packages are shown with prefix "Python 2.5" |
||
55 | |||
56 | 10 | Anchi Cheng | Remove only packages from NRAMM but not the suppporting packages. The NRAMM packages that you may find in "Add or Remove Programs" are |
57 | |pyScope| |
||
58 | |numextension| |
||
59 | |comarray| |
||
60 | |libCV| |
||
61 | |||
62 | 1 | Anchi Cheng | If you didn't use Installer to install previously, the packages may not show up in the |
63 | 10 | Anchi Cheng | Programs list. Simply remove or rename the folder containing the old packages in this case as described next. |
64 | 1 | Anchi Cheng | |
65 | h2. Move your existing packages to a backup directory: |
||
66 | |||
67 | At the beginning of the syscheck.py output, the location of the exisiting Leginon folder is shown. Although new installation overwrite the old in most cases, problem has been observed in the past. Therefore, it is best to remove the old files from the path before new installation. Better yet, copy into a backup folder because we need some configuration files from them. |
||
68 | 10 | Anchi Cheng | You may find these folders here: |
69 | |Leginon| |
||
70 | |pyScope| |
||
71 | |sinedon| |
||
72 | |pyami| |
||
73 | |ImageViewer| |
||
74 | 1 | Anchi Cheng | |
75 | For example, your Leginon folder is at C:\\python25\Lib\site-packages\Leginon |
||
76 | 2 | Anchi Cheng | |
77 | <pre>Go to C\\python25\site-packages |
||
78 | 1 | Anchi Cheng | Create Leginon1_6_backup folder |
79 | 10 | Anchi Cheng | Move Leginon folder into Leginon1_6_backup folder</pre> |
80 | 1 | Anchi Cheng | |
81 | Be aware that in some cases the installed package name is different (capitalized) from your svn package name and that numextension amd libCV are not in its own subdirectory in the python library but just the compiled .so files |
||
82 | 8 | Anchi Cheng | |
83 | h2. Install the Windows Installer Files from Leginon website http://emg.nysbc.org/projects/leginon/files |
||
84 | |||
85 | Execute the installer files and follow the instructions. |
||
86 | 1 | Anchi Cheng | |
87 | 10 | Anchi Cheng | h2. Install other subpackages you downloaded from NRAMM svn repository. You don't need to repeat ones you've already installed using the installer files. |
88 | 2 | Anchi Cheng | |
89 | 1 | Anchi Cheng | * Start a command line Window from Start Menu |
90 | |||
91 | * Reinstall the package in each folder with commands such as |
||
92 | 2 | Anchi Cheng | <pre>cd Your_Download_Place\Leginon 2.0\leginon |
93 | 1 | Anchi Cheng | c:\\python25\python.exe setup.py install</pre> |
94 | 2 | Anchi Cheng | * run syscheck.py again to make sure you have everything. |
95 | 1 | Anchi Cheng | |
96 | 2 | Anchi Cheng | h2. Copy your Leginon1.6 sinedon.cfg to the new installation |
97 | 1 | Anchi Cheng | |
98 | 2 | Anchi Cheng | * Find your sinedon.cfg. Depending on your previous setting, look in the directories listed here in order: |
99 | *your home directory as described in syscheck.py |
||
100 | *The sinedon directory where it is called from. If unsure, start python command line and type these to find out: |
||
101 | <pre>python> import sinedon |
||
102 | python> sinedon</pre> |
||
103 | 1 | Anchi Cheng | |
104 | 2 | Anchi Cheng | * If sinedon.cfg reside in the installed sinedon subpackage, you should copy it from your Leginon1.6 backup to the new installation. |
105 | <pre>go to C:\\python25\Lib\site-packages\ |
||
106 | copy Leginon_1_6_backup\sinedon\sinedon.cfg into the new sinedon folder |
||
107 | </pre> |
||
108 | 6 | Anchi Cheng | |
109 | 7 | Anchi Cheng | h2. Copy your Leginon1.6 Instruments.cfg to the new installation: |
110 | |||
111 | * instruments.cfg is in the pyScope folder of your Leginon 1.6 backup to the new pyscope folder under site-packages directory. |
||
112 | |||
113 | h2. Run updatecom.py |
||
114 | |||
115 | From a command line window: |
||
116 | |||
117 | <pre>cd C:\python25\Lib\Site-Packages\pyScope |
||
118 | C:\python25\python.exe updatecom.py</pre> |
||
119 | |||
120 | The python window appears should say show the required type libraries it found: |
||
121 | <pre> |
||
122 | Generating .py files from type libraries... |
||
123 | initializing TEM Scripting Error, cannot find typelib for "TEM Scripting" |
||
124 | initializing Tecnai Scripting done. |
||
125 | initializing TOM Moniker done. |
||
126 | initializing Tecnai Low Dose Kit done. |
||
127 | initializing Tecnai Exposure Adaptor done. |
||
128 | |||
129 | initializing Tietz CCD Camera done. |
||
130 | </pre> |
||
131 | The output depending on what is available on your microscope computer. You should have either "Tecnai Scripting" or the pairing of "TEM Scripting" and "TOM Moniker". |
||
132 | |||
133 | 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 |
||
134 | |||
135 | h2. modify Tietz PXL camera imaging size if you did so before for Leginon 1.6 |
||
136 | |||
137 | *You should not copy the old one in this case since the file has been changed* |
||
138 | * Go to C:\Python25\Lib\site-packages\pyscope\ |
||
139 | |||
140 | * Edit tietz.py with a plain text editor |
||
141 | |||
142 | |||
143 | * Find the lines: |
||
144 | |||
145 | <pre> def getCameraSize(self): |
||
146 | # {'type': dict, 'values': {'x': {'type': int}, 'y': {'type': int}}}} |
||
147 | x = self._getParameterValue('cpTotalDimensionX') |
||
148 | y = self._getParameterValue('cpTotalDimensionY') |
||
149 | return {'x': x, 'y': y} |
||
150 | </pre> |
||
151 | |||
152 | * Change the last line to: |
||
153 | |||
154 | <pre> return {'x': 2048, 'y': 2048}</pre> |
||
155 | |||
156 | |||
157 | 6 | Anchi Cheng | ______ |
158 | |||
159 | 11 | Anchi Cheng | [[How_to_Update_from_v16_(Linux)|< How to Update from v1.6 (Linux)]] | [[Preparation before Using v2.0 Routinely|Preparation before Using v2.0 Routinely >]] |
160 | 6 | Anchi Cheng | |
161 | |||
162 | ______ |