Project

General

Profile

Eagle camera installation and setup » History » Revision 6

Revision 5 (Anchi Cheng, 11/03/2015 10:17 PM) → Revision 6/11 (Anchi Cheng, 11/04/2015 04:29 PM)

h1. TIA-controlled camera (FEI Eagle) 

 h2. Extra Package and Installation 

 |_.program/package|_.notes| 
 |Tia.dll |(Should come with the microscope)| 

 {{include(comtypes installer)}} 

 h3. Run checkcom.py 

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

 * The output sould contain this output 
 <pre> 
 Found ESVision.Application done. 
 </pre> 

 h2. instruments.cfg 

 Eagle: 
 <pre> 
 [camera] 
 class: tia.TIA 
 zplane: 50 
 height: 4096 
 width: 4096 
 </pre> 

 h2. Setup 

 * Set camera configuration to give the [[Leginon Image Orientation|standard Leginon orientation]]. 

 h2. Programs to open before Leginon Client: TIA. 

 h2. Testing with pyscope 

 In python command 
 <pre> 
 form pyscope import tia 
 g = tia.TIA() 
 g.setExposureTime(200) 
 g.getImage() 
 </pre> 

 You should get a bunch of numbers in a numpy array. 

 h2. Trouble shooting 

 Some version of TIA may give an error of that at the end of it says 

 <pre> 
 _ctypes.COMError: (-2147352567, 'Exception occurred.', (u"Camera 'tia' does not exist.''.u'ESVision', None, 0L, 0)) 
 </pre> 
 This happens because TIA scripting (ESVision) knows the camera by a different name. 

 The correct name may be in TUI/CCDCamera panel.    Or you can find out from these python commands when the camera in question is active (You can make it active by acquire an image in TIA). 
 <pre> 
 from pyscope import tia 
 t = tia.get_tiaccd() 
 c = t.ccd.Camera 
 </pre> 
 You should get the camera name as the output. 

 With the name, edit pyscope/tia.py and change in the class TIA, 
 from 
 <pre> 
     camera_name='tia' 
 </pre> 
 to 
 <pre> 
     camera_name='THE NAME YOU FOUND' 
 </pre>