Project

General

Profile

Actions

Windows Installation All » History » Revision 13

« Previous | Revision 13/65 (diff) | Next »
Anchi Cheng, 11/08/2013 01:26 PM


Windows Installation

  • You need to repeat installation of the general packages for each of the computer involved in Leginon operation with addition for the camera and scope.

Add the IP address and matching hostname of the microscope and digital camera computer in your host file on the main Leginon computer, and vice versa.

Find out what python thinks the hostname is with python command line. REPEAT this both on Linux and Windows PC

Run the following in python command line:

import socket
socket.gethostname()

Find out the ip address associated with the hostname

Run the following in python command line:

import socket
socket.gethostbyname('your_host_name')

Modify your "hosts" file on the linux Leginon computer to include the instrument hosts if the latter is not already mapped by your domain name server

  • On Linux, this "hosts" file is at

/etc/hosts

Example of a "hosts" file:

192.000.1.222   instrument_host_name.domain_name instrument_short_host_name

Use shorter linux hostname if desired

If you'd like to shorten your linux hostname recognized by socket without the domain name, you may do so as root

hostname your_shorter_hostname

and also add that to the /etc/hosts as an alternative name

192.000.1.333   long_host_name.domain_name your_shorter_hostname

You will need to restart networking to make it persistent.

/etc/init.d/network restart

Test the change by finding the ip address with the hostname as in the above section.

The Linux main Leginon computer also needs to identify itself by its hostname registered on the instrument Windows computer.

  • On Window XP and WIndows 7 this host file is

C:\\WINDOWS\system32\drivers\etc\hosts

  • On Window NT, this host file is

C:\\WINNT\system32\drivers\etc\hosts

Register TecnaiCCD.dll (Gatan 32-bit DM on FEI microscope), 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:
    adaexp.exe /regserver
    CAMC4.exe /regserver
    REGSVR32 TecnaiCCD.dll

Install Python and supporting packages with their installers

Program package web site local copy of win32 installer local copy of amd64 installer
Python > 2.7.10 http://www.python.org python-2.7.16.msi python-2.7.18.amd64.msi
wxPython 2.8 or newer http://www.wxpython.org wxPython2.8-win32-unicode-2.8.12.1-py27.exe wxPython2.8-win64-unicode-2.8.12.1-py27.exe
MySQL Python client 1.2 or newer http://sourceforge.net/projects/mysql-python MySQL-python-1.2.4b4.win32-py2.7.exe 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/ PIL-1.1.7.win32-py2.7.exe 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-python2.7.exe numpy-MKL-1.6.2.win-amd64-py2.7.exe
SciPy 0.5.1 or newer http://www.scipy.org scipy-0.11.0-win32-superpack-python2.7.exe scipy-0.11.0.win-amd64-py2.7.exe
Use pyMySQL for leginon 3.6 and above instead of MySQL Python client for both win32 and 64.
pyMySQL 0.10.1 (not higher) https://pypi.org/project/PyMySQL/ pyMySQL-0.10.1-py2.py3-none-any.whl

Excute the installer files and follow the instructions.

Install SEMCCD as Digital Micrograph plugin (Gatan K2 only)

Thanks to David Mastronarde for providing his DM plug-in using socket connection

Note: If you have SerialEM installed on the same computer, you don't have to go through this. The same Plugin can be used by both programs and share the same port

Remove your older SEMCCDxxxx.dll in C:\Program File\Gatan\Plugins if you had it from prevous leginon-only installtion

Download and extract the files

1. From your browser, go to [[ https://bio3d.colorado.edu/ftp/SerialEM/FrameAlignment/]]
2. Choose Shrmemframe*..exe for your version of DM to download to your Gatan PC.
3. Run the downloaded file and follow its instructions.

Add a new environment variable SERIALEMCCD_PORT if not exist already from SerialEM installation. Set the value to an unused port between 50000 and 60000 to avoid conflict with other programs. Avoid ports used by Leginon, especially not 55555.

Port 50000 or 50001 usually works.

Install the Windows Installer Files from created from source by NRAMM

Package win32 amd64
numextension numextension-svn.win32-py2.7-numpy1.7.0.exe numextension-svn.win-amd64-py2.7-numpy1.6.2.exe

Execute the installer files and follow the instructions.

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

These are the sub-packages

Name: Purpose:
leginon modular TEM image acquisition
pyami general functions
sinedon database interaction
pyscope microscope control and monitoring
imageviewer image viewing for tomography

If you recall Linux processing server installation instruction, this is a bit different. Numextension and LibCV are not included. Numextension is already installed with windows installer. libcv is not required by Leginon client that this part installation is aimed for.

  • Start a command line Window from Start Menu
  • Install the package in each folder with commands such as
    cd path_to\myami-VERSION\myami\leginon
    c:\\python27\python.exe setup.py install

    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.

Modify comtypes if TIA controlling camera is used or Gatan camera is controlled by older, 32-bit computer.

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.

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

Run updatecom.py

From a command line window:

cd C:\python27\Lib\site-packages\pyScope
C:\python27\python.exe updatecom.py

The python window appears should say show the required type libraries it found:

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.

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

Register the Tietz ping callback function (Tietz camera only)

  • From a command line window:
cd C:\python27\Lib\site-packages\pyscope
C:\python27\python.exe tietzping.py

camc.ini setup (Tietz camera only)

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.


< Package Requirement | Configurations related to Leginon >


Updated by Anchi Cheng almost 11 years ago · 13 revisions