JEOL setup » History » Revision 9
Revision 8 (Neil Voss, 03/02/2012 12:05 PM) → Revision 9/10 (Neil Voss, 03/02/2012 12:17 PM)
h1. JEOL setup h2. more info http://cryoem.nysbc.org/CemRobotics.html 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')() s.getMagnifications() </pre> h2. Potential problems h3. import serial <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 h3. defocus.cfg <pre> C:\Python25>c:\Python25\python.exe Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import pyscope.registry >>> s = pyscope.registry.getClass('jeol1230')() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\Python25\Lib\site-packages\pyscope\jeol1230.py", line 27, in __init__ self.jeol1230lib = jeol1230lib.jeol1230lib() File "c:\Python25\Lib\site-packages\pyscope\jeol1230lib.py", line 25, in __init__ self.zeroDefocus = self.readZeroDefocus() File "c:\Python25\Lib\site-packages\pyscope\jeol1230lib.py", line 35, in readZeroDefocus infile = open(self.defocusFile,"r") IOError: [Errno 2] No such file or directory: 'C:\\Python25\\Lib\\site-packages\\pyScope\\defocus.cfg' >>> </pre> create an empty file called defocus.cfg h3. serial port permissions <pre> >>> import pyscope.registry >>> s = pyscope.registry.getClass('jeol1230')() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\python25\Lib\site-packages\pyscope\jeol1230.py", line 27, in __init__ self.jeol1230lib = jeol1230lib.jeol1230lib() File "c:\python25\Lib\site-packages\pyscope\jeol1230lib.py", line 25, in __init__ self.zeroDefocus = self.readZeroDefocus() File "c:\python25\Lib\site-packages\pyscope\jeol1230lib.py", line 37, in readZeroDefocus line = lines[0] IndexError: list index out of range >>> </pre>