Project

General

Profile

Actions

JEOL setup » History » Revision 5

« Previous | Revision 5/10 (diff) | Next »
Neil Voss, 03/02/2012 11:52 AM


JEOL setup

instruments.cfg

[TEM]
class: jeol1230.jeol1230

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:

import pyscope.registry
s = pyscope.registry.getClass('Tecnai')()
s.getMagnifications()

Potential problems

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

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

Updated by Neil Voss almost 13 years ago · 5 revisions