Project

General

Profile

JEOL setup » History » Version 6

Neil Voss, 03/02/2012 12:02 PM

1 1 Neil Voss
h1. JEOL setup
2
3 2 Neil Voss
h2. instruments.cfg
4 1 Neil Voss
5
<pre>
6
[TEM]
7
class: jeol1230.jeol1230
8 2 Neil Voss
</pre>
9
10
h2. Testing pyscope instrument script functions
11
12
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:
13
14
<pre>
15
import pyscope.registry
16 6 Neil Voss
s = pyscope.registry.getClass('jeol1230')()
17 2 Neil Voss
s.getMagnifications()
18 1 Neil Voss
</pre>
19 3 Neil Voss
20 4 Neil Voss
h2. Potential problems
21
22 3 Neil Voss
<pre>
23
>>> import pyscope.registry
24
Traceback (most recent call last):
25
  File "<stdin>", line 1, in <module>
26
  File "c:\Python25\Lib\site-packages\pyscope\registry.py", line 9, in <module>
27
    import config
28
  File "c:\Python25\Lib\site-packages\pyscope\config.py", line 39, in <module>
29
    mod = imp.load_module(fullmodname, *args)
30
  File "c:\Python25\Lib\site-packages\pyscope\jeol1230.py", line 8, in <module>
31
    from pyscope import jeol1230lib
32
  File "c:\Python25\Lib\site-packages\pyscope\jeol1230lib.py", line 8, in <module>
33
    import serial
34
ImportError: No module named serial
35
>>>
36
</pre>
37 4 Neil Voss
38 5 Neil Voss
you need to install "Python Serial Port Extensions" http://pypi.python.org/pypi/pyserial