Project

General

Profile

JEOL setup » History » Version 8

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

1 1 Neil Voss
h1. JEOL setup
2
3 8 Neil Voss
h2. more info
4
5
http://cryoem.nysbc.org/CemRobotics.html
6
7 2 Neil Voss
h2. instruments.cfg
8 1 Neil Voss
9
<pre>
10
[TEM]
11
class: jeol1230.jeol1230
12 2 Neil Voss
</pre>
13
14
h2. Testing pyscope instrument script functions
15
16
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:
17
18
<pre>
19
import pyscope.registry
20 6 Neil Voss
s = pyscope.registry.getClass('jeol1230')()
21 2 Neil Voss
s.getMagnifications()
22 1 Neil Voss
</pre>
23 3 Neil Voss
24 4 Neil Voss
h2. Potential problems
25
26 7 Neil Voss
h3. import serial
27
28 3 Neil Voss
<pre>
29
>>> import pyscope.registry
30
Traceback (most recent call last):
31
  File "<stdin>", line 1, in <module>
32
  File "c:\Python25\Lib\site-packages\pyscope\registry.py", line 9, in <module>
33
    import config
34
  File "c:\Python25\Lib\site-packages\pyscope\config.py", line 39, in <module>
35
    mod = imp.load_module(fullmodname, *args)
36
  File "c:\Python25\Lib\site-packages\pyscope\jeol1230.py", line 8, in <module>
37
    from pyscope import jeol1230lib
38
  File "c:\Python25\Lib\site-packages\pyscope\jeol1230lib.py", line 8, in <module>
39
    import serial
40
ImportError: No module named serial
41
>>>
42
</pre>
43 4 Neil Voss
44 5 Neil Voss
you need to install "Python Serial Port Extensions" http://pypi.python.org/pypi/pyserial
45 7 Neil Voss
46
h3. defocus.cfg
47
48
<pre>
49
C:\Python25>c:\Python25\python.exe
50
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32
51
Type "help", "copyright", "credits" or "license" for more information.
52
>>> import pyscope.registry
53
>>> s = pyscope.registry.getClass('jeol1230')()
54
Traceback (most recent call last):
55
  File "<stdin>", line 1, in <module>
56
  File "c:\Python25\Lib\site-packages\pyscope\jeol1230.py", line 27, in __init__
57
    self.jeol1230lib = jeol1230lib.jeol1230lib()
58
  File "c:\Python25\Lib\site-packages\pyscope\jeol1230lib.py", line 25, in __init__
59
    self.zeroDefocus = self.readZeroDefocus()
60
  File "c:\Python25\Lib\site-packages\pyscope\jeol1230lib.py", line 35, in readZeroDefocus
61
    infile = open(self.defocusFile,"r")
62
IOError: [Errno 2] No such file or directory: 'C:\\Python25\\Lib\\site-packages\\pyScope\\defocus.cfg'
63
>>>
64
</pre>