Eagle camera installation and setup » History » Version 4
Anchi Cheng, 03/19/2015 12:17 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 | h3. Run updatecom.py |
||
| 11 | |||
| 12 | * From a command line window: |
||
| 13 | <pre>cd C:\python27\Lib\site-packages\pyscope |
||
| 14 | C:\python27\python.exe updatecom.py</pre> |
||
| 15 | |||
| 16 | 2 | Anchi Cheng | * The output sould contain one of these output |
| 17 | 1 | Anchi Cheng | <pre> |
| 18 | 3 | Anchi Cheng | Found ES Vision 3.0 Type Library done. |
| 19 | Found ES Vision 3.1 Type Library done. |
||
| 20 | 1 | Anchi Cheng | </pre> |
| 21 | |||
| 22 | h2. instruments.cfg |
||
| 23 | |||
| 24 | Eagle: |
||
| 25 | <pre> |
||
| 26 | [camera] |
||
| 27 | class: tia.TIA |
||
| 28 | zplane: 50 |
||
| 29 | height: 4096 |
||
| 30 | width: 4096 |
||
| 31 | </pre> |
||
| 32 | |||
| 33 | h2. Setup |
||
| 34 | |||
| 35 | * Set camera configuration to give the [[Leginon Image Orientation|standard Leginon orientation]]. |
||
| 36 | |||
| 37 | 4 | Anchi Cheng | h2. Programs to open before Leginon Client: TIA. |
| 38 | |||
| 39 | 1 | Anchi Cheng | h2. Testing with pyscope |
| 40 | |||
| 41 | In python command |
||
| 42 | <pre> |
||
| 43 | form pyscope import tia |
||
| 44 | g = tia.TIA() |
||
| 45 | g.setExposureTime(200) |
||
| 46 | g.getImage() |
||
| 47 | </pre> |
||
| 48 | |||
| 49 | You should get a bunch of numbers in a numpy array. |
||
| 50 | |||
| 51 | 4 | Anchi Cheng | h2. Trouble shooting |
| 52 | |||
| 53 | Some version of TIA may give an error of that at the end of it says |
||
| 54 | |||
| 55 | <pre> |
||
| 56 | _ctypes.COMError: (-2147352567, 'Exception occurred.', (u"Camera 'tia' does not exist.''.u'ESVision', None, 0L, 0)) |
||
| 57 | </pre> |
||
| 58 | This happens because TIA scripting (ESVision) knows the camera by a different name. |
||
| 59 | |||
| 60 | 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). |
||
| 61 | <pre> |
||
| 62 | from pyscope import tia |
||
| 63 | t = tia.get_tiaccd() |
||
| 64 | c = t.ccd.Camera |
||
| 65 | </pre> |
||
| 66 | You should get the camera name as the output. |
||
| 67 | |||
| 68 | With the name, edit pyscope/tia.py and change in the class TIA, |
||
| 69 | from |
||
| 70 | <pre> |
||
| 71 | camera_name='tia' |
||
| 72 | </pre> |
||
| 73 | to |
||
| 74 | <pre> |
||
| 75 | camera_name='THE NAME YOU FOUND' |
||
| 76 | </pre> |