Project

General

Profile

JEOL setup » History » Version 3

Neil Voss, 03/02/2012 11:51 AM

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
s = pyscope.registry.getClass('Tecnai')()
17
s.getMagnifications()
18 1 Neil Voss
</pre>
19 3 Neil Voss
20
<pre>
21
>>> import pyscope.registry
22
Traceback (most recent call last):
23
  File "<stdin>", line 1, in <module>
24
  File "c:\Python25\Lib\site-packages\pyscope\registry.py", line 9, in <module>
25
    import config
26
  File "c:\Python25\Lib\site-packages\pyscope\config.py", line 39, in <module>
27
    mod = imp.load_module(fullmodname, *args)
28
  File "c:\Python25\Lib\site-packages\pyscope\jeol1230.py", line 8, in <module>
29
    from pyscope import jeol1230lib
30
  File "c:\Python25\Lib\site-packages\pyscope\jeol1230lib.py", line 8, in <module>
31
    import serial
32
ImportError: No module named serial
33
>>>
34
</pre>