Project

General

Profile

Tietz camera installation and setup using EM-MENU » History » Revision 2

Revision 1 (Anchi Cheng, 07/29/2021 03:13 PM) → Revision 2/4 (Anchi Cheng, 07/29/2021 03:18 PM)

h1. Tietz camera installation and setup using EM-MENU 

 h2. Many Tietz cameras are controlled by a computer separated from the microscope 

 Please read [[Using_Leginon_on_a_system_where_the_microscope_and_camera_are_controlled_by_different_computers]] first. 

 h2. Extra Package and Installation 

 |_.package |pip installation version| 
 |CAMC4.exe |(Should come with the camera)| 
 |comtypes for 64-bit machine|1.1.7| 

 install comtypes 1.1.7 from cmd terminal (internet connection needed) 
 or you can go through steps to save the download on another computer (google search pip download) and then copy it to the scope computer to install. 

 <pre> 
 pip install comtypes==1.1.7 
 </pre> 

 h2. Run updatecom.py 

 * From a command line window: 
 <pre>cd C:\python27\Lib\site-packages\pyscope 
 C:\python27\python.exe checkcom.py</pre> 

 * The output sould contain this output 
 <pre> 
 checking TVIPS EmMenu 
 Found COM typelib named: EMMENU4.EMMENYApplication.1 
 </pre> 

 You can ignore error messages regarding other com modules. 

 h2. Create Leginon Viewport 

 include{{Create_Leginon_view_port}} 

 h2. instruments.cfg 

 Current available classes are 
 <pre> 
 ##     - tietz2.EmMenuF416 
 ##     - tietz2.EmMenuF416_GPU (gpu functions not implemented 
 ##     - tietz2.EmMenuF216 
 </pre> 

 For example, instruments.cfg for F416 looks like this: 
 <pre> 
 [Tietz Camera] 
 class: tietz2.EmMenuF416 
 zplane: 5 
 height: 4096 
 width: 4096 
 </pre> 
 * I use zplane of 5 because this is a bottom-mount camera that does not retract.    Therefore it is always the lowest. 

 h2. Setup tvips.cfg 

 * A template for tvips.cfg is in the installed pyscope directory as "tvips.cfg.template".    Copy it to 
  <pre>C:\Programs\myami\instruments.cfg</pre> 

 *    Unless you plan to use the unreleased recorder functions, just leave that part as default. 

 h2. Testing with pyscope 

 *F416 camera is used in this case* 

 1. Open TVIPS TCL/EMMENU 
 2. From python command shell or IDLE: 
 <pre> 
 from pyscope import tietz2 
 t = tietz2.EmMenuF416() 
 a=t.getImage() t.getImage() 
 a.shape 
 </pre> 

 You should get (4096,4096) matching the camera dimension. 

 If you print a, you get 

 {{include(pyscope_test_result_array)}} 

 h2. Trouble shooting 


 h2. Programs to open before Leginon Client: None.    EMMENU must be opened