Project

General

Profile

Installation on the microscope computer » History » Revision 14

Revision 13 (Anchi Cheng, 05/20/2010 10:36 PM) → Revision 14/86 (Anchi Cheng, 05/22/2010 10:31 PM)

h1. Installation on the microscope computer 

 Only processing-side of Leginon system is needed 

 h2. Package requirement 

 h3.    Python and Support Packages (Note that python 2.5 must be used): 

 This list does not include pyton XML module because it is included in the python package for window. 

 |Python 2.5*| "http://www.python.org":http://www.python.org| 
 |Python for Windows extension (pywin32)| "http://sourceforge.net/projects/pywin32/":http://sourceforge.net/projects/pywin32/| 
 |wxPython 2.5.2.8 or newer| "http://www.wxpython.org":http://www.wxpython.org| 
 |MySQL Python client 1.2 or newer| "http://sourceforge.net/projects/mysql-python":http://sourceforge.net/projects/mysql-python| 
 |Python Imaging Library (PIL) 1.1.4 or newer| "http://www.pythonware.com/products/pil/":http://www.pythonware.com/products/pil/| 
 |NumPy 1.0b5 (tested, others may work)| "http://www.scipy.org":http://www.scipy.org| 
 |SciPy 0.5.1 or newer| "http://www.scipy.org":http://www.scipy.org| 

 *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. 

 h3. 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| 


 h3.    Required supporting programs for the CCD camera from camera makers 

 Install and register the following programs for CCD cameras from the two makes: 

 |_.Camera Make:|_.File:| 
 | Gatan|TecnaiCCD.dll| 
 | Tietz|CAMC4.exe*| 

 *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 

 h3.    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| 

 h3. Packages required from NRAMM 

 h4. These are the sub-packages you will install with the python installer. 

 |_.Name:|_.Purpose:| 
 | leginon|modular TEM image acquisition| 
 | pyami|general functions| 
 | sinedon|Leginon/database interaction| 
 | pyscope|microscope control and monitoring| 
 | imageviewer|image viewing for tomography| 
 |comarray|com module output conversion to array| 

 *For Gatan Camera or FEI Eagle Camera that uses TIA, comarray package need to be install with python 


 Because numextension and libcv requires extra compilers, we have created window installer for them for python 2.5 and made them available through    "http://www.leginon.org/":http://www.leginon.org/. 

 h4. These are the Leginon v2.0 python 2.5 compiled packages installed through python installer on Windows. 

 |_.Downloadfile Name|_.Installed Python Package File|_.Purpose:| 
 |NumExtension-1.2.0.win32-py2.5.exe|numextension.pyd|c extension for numerical processing| 
 |libCV-0.2.win32-py2.5.exe|libCV.pyd|small c library of algorithm from computer vision field| 

 h2. Installation 

 h3. Install Python and supporting packages with their installer 

 Excute the installer files and follow the instruction. 


 h3. Install the two Window Installer Files from Leginon website "http://www.leginon.org/":http://www.leginon.org/ 

 Excute the installer files and follow the instruction. 

 h3. Check out SVN Source Files from the depository 

 Use your mouse to do the following 
 * Create Leginon2.0 directory somewhere at your convenience 

 * Change directory into Leginon2.0 

 * 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 Leginon2.0 
  !http://emg.nysbc.org/software/leginon/images/images/svnco.png! 


 h3. Install the packages you downloaded from NRAMM svn depository 

 * Start a command line Window from Start Menu 

 * Install the package in each folder with commands such as 
 <pre>cd Your_Download_Place\Leginon2.0\leginon 
 c:\\python25\python.exe setup.py install</pre> 

 h4.    Register TecnaiCCD.dll, CAMC4.exe, and adaexep.exe 

 *    For example, from the command prompt: 
 <pre>adaexp.exe /regserver</pre> 

 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 above. 

 * Configurations for all users 

  <pre> <Python directory>\Lib\site-packages\Leginon\config\leginon.cfg</pre> 

  Example: 
  <pre> C:\Python25\Lib\site-packages\Leginon\config\leginon.cfg</pre> 


 * Configurations for individual users 

  <pre> <Home directory>\leginon.cfg</pre> 

  Example: 
  <pre> C:\Documents and Settings\Leginon User\leginon.cfg </pre> 


 * A skeleton (default) configuration file is available: 

  <pre> C:\Python25\Lib\site-packages\Leginon\config\default.cfg</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. 


  * For all users, put sinedon.cfg with the installed package as 
  <pre>C:\Python25\Lib\site-packages\sinedon\sinedon.cfg</pre> 


  * Your home directory on Windows: 
  <pre>C:\Documents and Settings\your_name></pre> 


  * the skeleton sinedon configuration file is 
  <pre>C:\Python25\Lib\site-packages\sinedon\examples\sinedon.cfg</pre> 

 h2. Modify instruments.cfg: 

 * Modify the file instruments.cfg in the installed pyScope directory to that 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: 

 <pre>[tem] 
 class: tecnai.Tecnai 
 [camera] 
 class: gatan.Gatan</pre> 

 The file contains other examples of microscope and camera drivers that we distribute from NRAMM. 

 h2. Run updatecom.py 

 From a command line window: 

 <pre>cd C:\python25\Lib\Site-Packages\pyScope 
 C:\python25\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". 

 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 


 h2. Additional setup on Tietz PXL camera (optional) 


 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. 


 *    Go to C:\Python25\Lib\site-packages\pyScope\ 


 *    Edit tietz.py with a plain text editor 


 *    Find the lines: 

 <pre> def getCameraSize(self): 
 # {'type': dict, 'values': {'x': {'type': int}, 'y': {'type': int}}}} 
 x = self._getParameterValue('cpTotalDimensionX') 
 y = self._getParameterValue('cpTotalDimensionY') 
 return {'x': x, 'y': y} 
 </pre> 

 *    Change the last line to: 

 <pre>      return {'x': 2048, 'y': 2048}</pre> 

 h2.    Create Leginon 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:\Python25\Lib\site-packages\leginon</pre> 


  * Create a shortcut from start-leginon.py as Leginon 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: 

 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/. 

 *    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. 


 ______ 

 [[Web Server Installation|< Web Server Installation]] | [Steps involved in the installation| [[Next Steps|Next Steps needed for Installation Using Database Administration Tools >]] 


 ______