Project

General

Profile

Eagle camera installation and setup » History » Version 7

Anchi Cheng, 01/08/2016 10:23 AM

1 2 Anchi Cheng
h1. TIA-controlled camera (FEI Eagle)
2 1 Anchi Cheng
3
h2. Extra Package and Installation
4
5
|_.program/package|_.notes|
6
|Tia.dll |(Should come with the microscope)|
7
8
{{include(comtypes installer)}}
9
10 5 Anchi Cheng
h3. Run checkcom.py
11 1 Anchi Cheng
12
* From a command line window:
13
<pre>cd C:\python27\Lib\site-packages\pyscope
14 6 Anchi Cheng
C:\python27\python.exe checkcom.py</pre>
15 1 Anchi Cheng
16 5 Anchi Cheng
* The output sould contain this output
17 3 Anchi Cheng
<pre>
18 5 Anchi Cheng
Found ESVision.Application done.
19 1 Anchi Cheng
</pre>
20
21
h2. instruments.cfg
22
23
Eagle:
24
<pre>
25
[camera]
26 7 Anchi Cheng
class: tia.TIA_Eagle
27 1 Anchi Cheng
zplane: 50
28
height: 4096
29
width: 4096
30
</pre>
31
32
h2. Setup
33
34
* Set camera configuration to give the [[Leginon Image Orientation|standard Leginon orientation]].
35
36 4 Anchi Cheng
h2. Programs to open before Leginon Client: TIA.
37
38 1 Anchi Cheng
h2. Testing with pyscope
39
40
In python command
41
<pre>
42
form pyscope import tia
43 7 Anchi Cheng
g = tia.TIA_Eagle()
44 1 Anchi Cheng
g.setExposureTime(200)
45
g.getImage()
46
</pre>
47
48
You should get a bunch of numbers in a numpy array.
49
50 4 Anchi Cheng
h2. Trouble shooting
51
52
Some version of TIA may give an error of that at the end of it says
53
54
<pre>
55
_ctypes.COMError: (-2147352567, 'Exception occurred.', (u"Camera 'tia' does not exist.''.u'ESVision', None, 0L, 0))
56
</pre>
57
This happens because TIA scripting (ESVision) knows the camera by a different name.
58
59
The correct name may be in TUI/CCDCamera panel.  Or you can find out from these python commands when the camera in question is active (You can make it active by acquire an image in TIA).
60
<pre>
61
from pyscope import tia
62
t = tia.get_tiaccd()
63
c = t.ccd.Camera
64
</pre>
65
You should get the camera name as the output.
66
67 7 Anchi Cheng
With the name, edit pyscope/tia.py and change in the class TIA_Eagle,
68 4 Anchi Cheng
from
69
<pre>
70 7 Anchi Cheng
    camera_name='BM-Eagle'
71 4 Anchi Cheng
</pre>
72
to
73
<pre>
74
    camera_name='THE NAME YOU FOUND'
75
</pre>