Eagle camera installation and setup » History » Version 5
Anchi Cheng, 11/03/2015 10:17 PM
| 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 | C:\python27\python.exe updatecom.py</pre> |
||
| 15 | |||
| 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 | class: tia.TIA |
||
| 27 | 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 | g = tia.TIA() |
||
| 44 | 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 | With the name, edit pyscope/tia.py and change in the class TIA, |
||
| 68 | from |
||
| 69 | <pre> |
||
| 70 | camera_name='tia' |
||
| 71 | </pre> |
||
| 72 | to |
||
| 73 | <pre> |
||
| 74 | camera_name='THE NAME YOU FOUND' |
||
| 75 | </pre> |