Installation on the microscope computer 30 » History » Revision 25
Revision 24 (Anchi Cheng, 10/31/2013 11:14 AM) → Revision 25/70 (Anchi Cheng, 10/31/2013 12:12 PM)
h1. Installation on the microscope computer (svn trunk) h2. If you are installing 2.2, see [[Installation on the microscope computer]] Only processing-side of Leginon system is needed h1. Package requirement h2. Python and Support Packages (Note that python 2.7 must be used to match window installers of myami modules): 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.7 except numpy. If you are having trouble with the most recent version, try to use the specific versions we include in http:/emg.nysbc.org/redmine/projects/leginon/files |Program|package web site|local copy of win32 installer|local copy of ami64 installer| |Python 2.7*| "http://www.python.org":http://www.python.org|"python-2.7.3.msi":http://emg.nysbc.org/attachments/download/2063/python-2.7.3.msi|"python-2.7.3.amd64.msi":http://emg.nysbc.org/attachments/download/2057/python-2.7.3.amd64.msi| |Python for Windows extension (pywin32)| "http://sourceforge.net/projects/pywin32/":http://sourceforge.net/projects/pywin32/|"pywin32-218.win32-py2.7.exe":http://emg.nysbc.org/attachments/download/2068/pywin32-218.win32-py2.7.exe|"pywin32-218.win-amd64-py2.7.exe":http://emg.nysbc.org/attachments/download/2059/pywin32-218.win-amd64-py2.7.exe| |wxPython 2.5.2.8 or newer| "http://www.wxpython.org":http://www.wxpython.org|"wxPython2.8-win32-unicode-2.8.12.1-py27.exe":http://emg.nysbc.org/attachments/download/2068/wxPython2.8-win32-unicode-2.8.12.1-py27.exe|"wxPython2.8-win64-unicode-2.8.12.1-py27.exe":http://emg.nysbc.org/attachments/download/2058/wxPython2.8-win64-unicode-2.8.12.1-py27.exe| |MySQL Python client 1.2 or newer| "http://sourceforge.net/projects/mysql-python":http://sourceforge.net/projects/mysql-python|"MySQL-python-1.2.4b4.win32-py2.7.exe":http://emg.nysbc.org/attachments/download/2064/MySQL-python-1.2.4b4.win32-py2.7.exe|"MySQL-python-1.2.3.win-amd64-py2.7.exe":http://emg.nysbc.org/attachments/download/1815/MySQL-python-1.2.3.win-amd64-py2.7.exe| |Python Imaging Library (PIL) 1.1.4 or newer| "http://www.pythonware.com/products/pil/":http://www.pythonware.com/products/pil/|"PIL-1.1.7.win32-py2.7.exe":http://emg.nysbc.org/attachments/download/2067/PIL-1.1.7.win32-py2.7.exe|"PIL-fork-1.1.7.win-amd64-py2.7.exe":http://emg.nysbc.org/attachments/download/1814/PIL-fork-1.1.7.win-amd64-py2.7.exe| |NumPy |(use only from our file to match compiled numextension|"numpy-1.7.0.win32-py2.7.exe":http://emg.nysbc.org/attachments/download/2066/numpy-1.7.0.win32-superpack-superpack-py2.7.exe|"numpy-MKL-1.6.2.win-amd64-py2.7.exe":http://emg.nysbc.org/attachments/download/1812/numpy-MKL-1.6.2.win-amd64-py2.7.exe| |SciPy 0.5.1 or newer| "http://www.scipy.org":http://www.scipy.org|"scipy-0.11.0.win32-superpack-py2.7.exe":http://emg.nysbc.org/attachments/download/2069/scipy-0.11.0.win32-superpack-py2.7.exe|"scipy-0.11.0.win-amd64-py2.7.exe":http://emg.nysbc.org/attachments/download/1813/scipy-0.11.0.win-amd64-py2.7.exe| |comtypes 0.6.2|"http://sourceforge.net/projects/comtypes":http://sourceforge.net/projects/comtypes/files/comtypes/0.6.2/comtypes-0.6.2.win32.exe"|"comtypes-0.6.2.win32.exe":http://emg.nysbc.org/attachments/download/2265/comtypes-0.6.2.win32.exe|n/a| *comtypes has replaced comarray which can be compiled with python 2.7 with setup.py. It is required only by camera controled through TIA such as FEI Eagle and Falcon. h2. SVN client used for check out from our repository This required for following this instruction. We have used Tortois SVN client. Alternatively, you may copy the required NRAMM source files from another computer. |_.Name:|_.Download site:| |Tortoise SVN client| "http://tortoisesvn.tigris.org":http://tortoisesvn.tigris.org| h2. Packages from NRAMM Most of the subpackages from NRAMM are obtained through our svn repository. The instruction comes later. Because numextension and libcv would require extra compilers if you build them yourself, we have created Windows installers for them for python 2.7 and made them available at http://emg.nysbc.org/projects/leginon/files. h3. These are the current Leginon python 2.7 compiled packages you should install through python installer on Windows. 32-bit |_.Downloadfile Name|_.Purpose:| |http://emg.nysbc.org/attachments/download/2065/numextension-svn.win32-py2.7.exe|c extension for numerical processing| |http://emg.nysbc.org/attachments/download/349/libcv-2.0.0.win32.exe|small computer vision library| 64-bit |_.Downloadfile Name|_.Purpose:| |http://emg.nysbc.org/attachments/download/1811/numextension-svn.win-amd64-py2.7.exe|c extension for numerical processing| |http://emg.nysbc.org/attachments/download/2514/libcv-0.2.win-amd64-py2.7.exe|small computer vision library| h2. Required supporting programs for the CCD camera from camera makers 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: |_.Camera Make:|_.File:| | Gatan|TecnaiCCD.dll| Gatan/TIA|TecnaiCCD.dll| | FEI|Tia.dll| | Tietz|CAMC4.exe*| | DirectElectronDE12|DirectElectronAPI.exe| h2. Supporting programs for film exposure 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. |_.Name:|_.File:| | exposure adaptor|adaexp.exe| h1. Installation {{include(add host)}} h2. Register TecnaiCCD.dll, CAMC4.exe (For Tietz camera), and adaexp.exe (For film exposure) * From the command prompt, run the following commands. You may need to enter the full path of the exe or dll: <pre>adaexp.exe /regserver CAMC4.exe /regserver REGSVR32 TecnaiCCD.dll</pre> h2. Install Python and supporting packages with their installers Excute the installer files and follow the instructions. h2. Install the Windows Installer Files from Leginon website http://emg.nysbc.org/projects/leginon/files Execute the installer files and follow the instructions. h2. Check out SVN Source Files from the repository Use your mouse to do the following * Create LeginonTrunk directory somewhere at your convenience * Change directory into LeginonTrunk * Right-click the mouse botton in this directory window and select Tortoise svn Checkout in the menu: !http://emg.nysbc.org/software/leginon/images/images/svnmenu.png! * Set up svn checkout window like this to check out from http://emg.nysbc.org/svn/myami/trunk to LeginonTrunk !svn_checkout.png! h2. Install the packages you downloaded from NRAMM svn repository The svn checkout is a folder containing several subpackages. You will install the python packages using python installer h3. These are the sub-packages |_.Name:|_.Purpose:| | leginon|modular TEM image acquisition| | pyami|general functions| | sinedon|Leginon/database interaction| | pyscope|microscope control and monitoring| | imageviewer|image viewing for tomography| * Start a command line Window from Start Menu * Install the package in each folder with commands such as <pre>cd Your_Download_Place\LeginonTrunk\leginon c:\\python27\python.exe setup.py install</pre> 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. h2. Modify comtypes if TIA controlling camera is used or Gatan camera is controlled by older, 32-bit computer. used. IMPORTANT: After installing comtypes, you must make one modification to it. The module "safearray.py" that comes with comtypes must be replaced with a modified version that we provide. You can find the custom version of safearray.py in the pyscope package. Please copy this module from pyscope into the installed comtypes folder: C:\Python2*\Lib\site-packages\comtypes\. It should replace the safearray.py that is included in comtypes. h2. TIA controlling camera only: (Reported by a user as a necessary step on his system. May not be necessary) Copy TecnaiCCD.dll and stdscript.dll into pyscope folder h2. Run updatecom.py From a command line window: <pre>cd C:\python27\Lib\Site-Packages\pyScope C:\python27\python.exe updatecom.py</pre> The python window appears should say show the required type libraries it found: <pre> Generating .py files from type libraries... initializing TEM Scripting Error, cannot find typelib for "TEM Scripting" initializing Tecnai Scripting done. initializing TOM Moniker done. initializing Tecnai Low Dose Kit done. initializing Tecnai Exposure Adaptor done. initializing Tietz CCD Camera done. </pre> 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". You will only find Tecnai Exposure Adaptor (Scripting for film exposure) if you ask FEI for it. The script should generate a few files in C:\\python27\Lib\win32com\gen_py with seemly scrambled names such as BC0A2B03-19FF-11D3-AE00-00A024CBA50Cx0x1x9.py {{include(locate global config directory on Windows)}} h2. Configure leginon.cfg: 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. * 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) <pre> <Global configuration directory>\leginon.cfg</pre> Example: <pre> C:\Programs\myami\leginon.cfg</pre> * The skeleton (default) configuration file is available at: <pre> C:\Python27\Lib\site-packages\leginon\leginon.cfg.template</pre> h2. Configure sinedon.cfg: Follow instruction in [[Configure sinedon.cfg]] in the section for Linux installation but note the location of the configuration files follows. * (Recommanded on microscope computer) For all users, put sinedon.cfg in the *global configuration directory* such as <pre>C:\Programs\myami\sinedon.cfg</pre> * the skeleton sinedon configuration file is <pre>C:\Python27\Lib\site-packages\sinedon\examples\sinedon.cfg</pre> h2. Configure instruments.cfg: * A template for instruments.cfg is in the installed pyscope directory as "instruments.cfg.template". Copy it to <pre>C:\Programs\myami\instruments.cfg</pre> * Remove the Sim Tem and Sim Cam modules in the configuration. * Add the modules for your microscope and camera. ** If you have Direct Electron camera DE12, your camera module.class is de.DE12 ** If your microscope uses Tecnai Scripting Interface, youe scope module.class is tecnai.Tecnai ** If you have a Gatan camera running on the microscope computer that you interface through DigitalMicrograph, your camera module.class is gatan.Gatan ** If you have a Gatan K2 Summit running on its only 64-bit computer, your camera module is dmsem and three cameras are added. See [[Gatan K2 Installation Notes]] ** 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. {{include(instruments.cfg for 2.2)}} The file contains other examples of microscope and camera drivers that we distribute from NRAMM. h2. Additional setup on Tietz cameras Register the Tietz ping callback function. From a command line window: <pre>cd C:\python27\Lib\Site-Packages\pyscope C:\python27\python.exe tietzping.py</pre> Troubleshooting Tietz cameras: 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. 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. 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. h2. For strange dimension cameras Unless it is Gatan K2 where it uses flooring when dealing determining camera dimension when binning, you will do better specify a value that can be divided by power of 2 in width and height in instruments.cfg. Examples of this type of configuration can be found in some Tietz camera. Use Tietz's image acquisition software to find out what they use as a guide. h2. Create Leginon Admin and Leginon Client shortcut in Start menu menu under Leginon This instruction applies to Windows XP. * Go to C:\Documents and Settings\All Users\Start Menu\Programs\ and create a new folder named Leginon. * In another window, go to <pre>C:\Python27\Lib\site-packages\leginon</pre> * Create a shortcut from start-leginon.py as "Leginon Admin" and a shortcut from launcher.py as "Leginon Client". * Move the two shortcuts into <pre>C:\Documents and Settings\All Users\Start Menu\Programs\Leginon</pre> h2. Mapping Drives (Optional): 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/. * Start, My Computer * Tools menu, Map network drive * Use an unmapped drive such as Z: Enter shared path in Windows format as <pre>\\your_smbserver\your_share_point</pre> * Add the drive and the Linux path to leginon.cfg on the Windows machine as <pre>[Drive Mapping] Z:/your_data_path</pre> * Add image path to leginon.cfg on the Windows machine in Linux format as <pre>[Images] path:/your_data_path/leginon</pre> h2. Additional Software (Optional): TightVNC (http://www.tightvnc.com) if you get tired of going into the microscope room just to open the column valves. h2. Gatan K2 Experimental support: * [[Gatan K2 Installation Notes]] h2. Falcon/Orius Combination Suport: * [[Falcon-Orius Combination Installation Notes]] ______ [[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 >]] ______