-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsimple_example.py
More file actions
executable file
·50 lines (41 loc) · 1.04 KB
/
Copy pathsimple_example.py
File metadata and controls
executable file
·50 lines (41 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from andor import *
import time
import sys
import signal
#####################
# Initial settings #
#####################
Tset = -70
EMCCDGain = 250
PreAmpGain = 0
def signal_handler(signal, frame):
print 'Shutting down the camera...'
cam.ShutDown()
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
# Initialising the Camera
cam = Andor()
cam.SetSingleScan()
cam.SetTriggerMode(7)
cam.SetShutter(1,1,0,0)
cam.SetPreAmpGain(PreAmpGain)
cam.SetEMCCDGain(EMCCDGain)
cam.SetExposureTime(0.1)
cam.SetCoolerMode(1)
cam.SetTemperature(Tset)
cam.CoolerON()
while cam.GetTemperature() is not 'DRV_TEMP_STABILIZED':
print "Temperature is: %g [Set T: %g]" % (cam.temperature, Tset)
time.sleep(10)
i = 0
while True:
i += 1
print cam.GetTemperature()
print cam.temperature
print "Ready for Acquisition"
cam.StartAcquisition()
data = []
cam.GetAcquiredData(data)
cam.SaveAsBmpNormalised("%03g.bmp" %i)
#cam.SaveAsBmp("%03g.bmp" %i)
cam.SaveAsTxt("%03g.txt" %i)