-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmirror_tests.py
115 lines (98 loc) · 4.24 KB
/
mirror_tests.py
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import lib.data_coolection as cool
# Supress warnings from EPICS
cool.hush()
def n_triggers(n, c):
for trig in range(n):
c.sw_trigger()
c.wait_for_data()
def on_fiber():
c = cool.Coolector(sample='MWWHL4',
sample_uid='NA',
location='Prototype lab',
operator='Haavard',
description='Testing protected mirrors with white LED',
sub_experiment='Directly on fiber bundle',
directory='/var/data/lab/2017-12-12-mirrortest/fiber')
c.attrs['LED Power'] = '2mA'
c.attrs['Wheel position'] = 1
# Add devices
c.add_device(cool.Thorlabs_spectrometer('CCS1',
exposure=0.010,
sw_trig=True))
n_triggers(100, c)
def on_silver():
c = cool.Coolector(sample='MWWHL4',
sample_uid='NA',
location='Prototype lab',
operator='Haavard',
description='Testing protected mirrors with white LED',
sub_experiment='Silver mirror, PF10-03-P01',
directory='/var/data/lab/2017-12-12-mirrortest/silver')
c.attrs['LED Power'] = '2mA'
c.attrs['Wheel position'] = 1
# Add devices
c.add_device(cool.Thorlabs_spectrometer('CCS1',
exposure=0.010,
sw_trig=True))
n_triggers(100, c)
def on_gold():
c = cool.Coolector(sample='MWWHL4',
sample_uid='NA',
location='Prototype lab',
operator='Haavard',
description='Testing protected mirrors with white LED',
sub_experiment='Gold mirror, PF10-01-M01',
directory='/var/data/lab/2017-12-12-mirrortest/gold')
c.attrs['LED Power'] = '2mA'
c.attrs['Wheel position'] = 1
# Add devices
c.add_device(cool.Thorlabs_spectrometer('CCS1',
exposure=0.010,
sw_trig=True))
n_triggers(100, c)
def on_aluminium():
c = cool.Coolector(sample='MWWHL4',
sample_uid='NA',
location='Prototype lab',
operator='Haavard',
description='Testing protected mirrors with white LED',
sub_experiment='Aluminium mirror, PF10-01-G01',
directory='/var/data/lab/2017-12-12-mirrortest/alu')
c.attrs['LED Power'] = '2mA'
c.attrs['Wheel position'] = 1
# Add devices
c.add_device(cool.Thorlabs_spectrometer('CCS1',
exposure=0.010,
sw_trig=True))
n_triggers(100, c)
def on_dielectric():
c = cool.Coolector(sample='MWWHL4',
sample_uid='NA',
location='Prototype lab',
operator='Haavard',
description='Testing protected mirrors with white LED',
sub_experiment='Dielectric mirror, BB1-E02',
directory='/var/data/lab/2017-12-12-mirrortest/dielectric')
c.attrs['LED Power'] = '2mA'
c.attrs['Wheel position'] = 1
# Add devices
c.add_device(cool.Thorlabs_spectrometer('CCS1',
exposure=0.010,
sw_trig=True))
n_triggers(100, c)
def dark():
c = cool.Coolector(sample='MWWHL4',
sample_uid='NA',
location='Prototype lab',
operator='Haavard',
description='Testing protected mirrors with white LED',
sub_experiment='Dark spectra',
directory='/var/data/lab/2017-12-12-mirrortest/dark')
c.attrs['LED Power'] = '0mA'
c.attrs['Wheel position'] = 1
# Add devices
c.add_device(cool.Thorlabs_spectrometer('CCS1',
exposure=0.010,
sw_trig=True))
n_triggers(100, c)
dark()