Project

General

Profile

JEOL setup » History » Revision 6

Revision 5 (Neil Voss, 03/02/2012 11:52 AM) → Revision 6/10 (Neil Voss, 03/02/2012 12:02 PM)

h1. JEOL setup 

 h2. instruments.cfg 

 <pre> 
 [TEM] 
 class: jeol1230.jeol1230 
 </pre> 

 h2. Testing pyscope instrument script functions 

 On the instrument host of the instrument, a TEM host that uses Tecnai class, for example, you can launch python command line window and try to create an instance of the instrument and then call a function such as getMagnifications in that like this: 

 <pre> 
 import pyscope.registry 
 s = pyscope.registry.getClass('jeol1230')() pyscope.registry.getClass('Tecnai')() 
 s.getMagnifications() 
 </pre> 

 h2. Potential problems 

 <pre> 
 >>> import pyscope.registry 
 Traceback (most recent call last): 
   File "<stdin>", line 1, in <module> 
   File "c:\Python25\Lib\site-packages\pyscope\registry.py", line 9, in <module> 
     import config 
   File "c:\Python25\Lib\site-packages\pyscope\config.py", line 39, in <module> 
     mod = imp.load_module(fullmodname, *args) 
   File "c:\Python25\Lib\site-packages\pyscope\jeol1230.py", line 8, in <module> 
     from pyscope import jeol1230lib 
   File "c:\Python25\Lib\site-packages\pyscope\jeol1230lib.py", line 8, in <module> 
     import serial 
 ImportError: No module named serial 
 >>> 
 </pre> 

 you need to install "Python Serial Port Extensions" http://pypi.python.org/pypi/pyserial