Skip to content

Commit 37f0f78

Browse files
authored
Merge pull request #54 from spice-herald/laser_driver
Laser driver
2 parents b60f50a + daac92d commit 37f0f78

File tree

13 files changed

+1809
-102
lines changed

13 files changed

+1809
-102
lines changed

bin/run_daq.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
import time
1010
from pprint import pprint
1111
import copy
12+
import warnings
13+
warnings.filterwarnings(
14+
'ignore',
15+
message=("Unexpected MsgID format. "
16+
"Consider updating the device's firmware."))
17+
18+
1219

1320
if __name__ == "__main__":
1421

@@ -55,6 +62,12 @@
5562
dest="acquire_exttrig", action="store_true",
5663
help='Acquire external trigger data')
5764

65+
parser.add_argument('--acquire-calib','--acquire-calibration','--acquire_calibration',
66+
dest="acquire_calibration", action="store_true",
67+
help='Acquire calibration data')
68+
69+
70+
5871
#parser.add_argument('--acquire-thresh','--acquire_thresh',
5972
# '--acquire-threshold',
6073
# dest="acquire_thresh", action="store_true",
@@ -140,14 +153,15 @@
140153
acquisition_types = ['continuous',
141154
'didv', 'iv',
142155
'exttrig', 'randoms',
143-
'threshold']
156+
'threshold', 'calibration']
144157

145158
acquisition_args = [args.acquire_cont,
146159
args.acquire_didv,
147160
args.acquire_iv,
148161
args.acquire_exttrig,
149162
args.acquire_rand,
150-
args.acquire_thresh]
163+
args.acquire_thresh,
164+
args.acquire_calibration]
151165

152166
inds = list(np.where(acquisition_args)[0])
153167
if len(inds) > 1:

pytesdaq/analyzer/analyzer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,21 +486,21 @@ def fit_didv(self, data_array=None, sample_rate=None, unit='Amps',
486486
poles = None
487487
if do_fit_1pole:
488488
print('Info: Starting dIdV 1-pole Fit')
489-
didv_inst.dofit(1)
489+
didv_inst.dofit(1, fcutoff=100e3)
490490
result = didv_inst.fitresult(1)
491491
poles = 1
492492
print('Info: dIdV 1-pole Fit Done')
493493

494494
if do_fit_2pole:
495495
print('Info: Starting dIdV 2-pole Fit')
496-
didv_inst.dofit(2)
496+
didv_inst.dofit(2, fcutoff=100e3)
497497
result = didv_inst.fitresult(2)
498498
poles = 2
499499
print('Info: dIdV 2-pole Fit Done')
500500

501501
if do_fit_3pole:
502502
print('Info: Starting dIdV 3-pole Fit')
503-
didv_inst.dofit(3)
503+
didv_inst.dofit(3, fcutoff=100e3)
504504
result = didv_inst.fitresult(3)
505505
poles = 3
506506
print('Info: dIdV 3-pole Fit Done')

pytesdaq/config/daq.ini_example

Lines changed: 66 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# if run "duration" longer than series max time
2020
# then run is splitted in multiple series
2121
# number of series within group = total duration / series max time
22-
series_max_time = 15m
22+
series_max_time = 30m
2323

2424
# split open/restricted series (for blinding purpose)
2525
split_series = False
@@ -35,24 +35,31 @@ sample_rate = 1250000
3535
voltage_min = -5
3636
voltage_max = 5
3737

38+
# Beginning/end of series calib (configuration in "calibration" field)
39+
add_series_start_calib = True
40+
add_series_end_calib = False
41+
calib_run_time = 5m
42+
3843

3944
# Beginning/end of series didv (configuration in "didv" field)
4045
add_series_start_didv = True
4146
add_series_end_didv = False
42-
didv_run_time = 60s
43-
didv_detector_channels = TES50x200Ar,TES200x800Ar,TES200x800Xe
47+
didv_run_time = 40s
48+
#didv_detector_channels = Mv41pcRadLeft, Mv41pcRadRight,Mv41pcNormLeft, Mv41pcNormRight
49+
#didv_detector_channels = TES800x200ArB,TES800x200XeA,TES800x200XeB
50+
4451

4552
# Beginning/end of series iv (configuration in "iv" field)
4653
add_series_start_iv = True
4754
add_series_end_iv = False
4855
iv_run_time = 10s
49-
iv_detector_channels = TES50x200Ar,TES200x800Ar,TES200x800Xe
56+
#iv_detector_channels = Mv3025pcBigFinsLeft,Mv3025pcRegularLeft,Mv3025pcRegularRight
5057

5158

5259
[randoms]
5360

5461
# maximum series time
55-
#series_max_time = 90s
62+
series_max_time = 20m
5663

5764
# trace length in millisec (ms) or seconds (s)
5865
# Alternatively use "nb_samples"
@@ -71,7 +78,7 @@ voltage_max = 5
7178
[exttrig]
7279

7380
# single series max time in seconds(s) or minutes (m)
74-
series_max_time = 10m
81+
series_max_time = 1m
7582

7683

7784
# trace length in millisec (ms) or seconds (s)
@@ -100,7 +107,7 @@ voltage_max = 5
100107
sample_rate = 1250000
101108

102109
# number of cycles test signal -> trace length
103-
nb_cycles = 3
110+
nb_cycles = 2.1
104111

105112
# voltage range (volts)
106113
voltage_min = -5
@@ -124,25 +131,73 @@ voltage_max = 5
124131
# IMPORT NOTE: frequency/voltage need to have same format!
125132

126133
signal_gen_voltage_mV = 10
127-
signal_gen_frequency_Hz = 40
134+
signal_gen_frequency_Hz = 50
128135

129136

130137

131138

132139
[iv]
133140

134141
# tes bias
135-
tes_bias_list = 140,120,100,current
142+
tes_bias_list = 140,135,130,current
136143

137144

138145
# relock (either once or all steps)
139146
relock_first_step = False
140-
relock_all_steps = True
147+
relock_all_steps = False
141148

142149

143150
# trace length in millisec (ms) or seconds (s)
144151
# Alternatively use "nb_samples"
145-
trace_length = 5ms
152+
trace_length = 20ms
153+
154+
# sample rate
155+
sample_rate = 1250000
156+
157+
# voltage min/max
158+
voltage_min = -5
159+
voltage_max = 5
160+
161+
162+
[calibration]
163+
164+
# add noise on top of calib
165+
add_calib_noise = False
166+
calib_noise_run_time = 0.5m
167+
168+
169+
# -----------
170+
# laser setup
171+
# -----------
172+
# - offset/voltage [V], voltage = [pp, high, or low]
173+
# - pulse width [s]
174+
# - frequency [Hz]
175+
# - phase = 0 hard coded
176+
control_channel = 1
177+
control_offset = 0
178+
control_voltage_high = 3.8
179+
control_voltage_low = 1
180+
control_pulse_width = 20e-6 # 1.85e-6
181+
control_frequency = 40
182+
183+
# TTL (set ttl_channel = None is no TTL)
184+
# frequency same as control
185+
ttl_channel = 2
186+
ttl_offset = 0
187+
ttl_voltage_high = 1
188+
ttl_voltage_low = 0
189+
ttl_pulse_width = 100e-6
190+
191+
# Add TTL channel to raw data
192+
# leave commented if not saved in data
193+
ttl_adc_channel = 4
194+
ttl_adc_id = adc1
195+
196+
# ---------
197+
# DAQ setup
198+
# ---------
199+
# FIXME: only continuous data for now (hard coded)
200+
trace_length = 10s
146201

147202
# sample rate
148203
sample_rate = 1250000

pytesdaq/config/settings.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,21 @@ def get_signal_generator(self):
240240

241241
return controller
242242

243+
def get_laser_signal_generator(self):
244+
"""
245+
get signal generator device name
246+
247+
Returns:
248+
str o NoneType
249+
"""
250+
controller = None
251+
try:
252+
controller = self._get_setting('setup','laser_signal_generator')
253+
except:
254+
pass
255+
256+
return controller
257+
243258

244259
def enable_redis(self):
245260
"""

pytesdaq/config/setup.ini.example_feb

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ facility = 2
2525

2626
# Fridge run number and date/time fridge was at base temperature
2727
# (syntax: mm/dd/yyyy HH:MM)
28-
fridge_run = 43
29-
fridge_run_start = 04/29/2024 09:00
28+
fridge_run = 65
29+
fridge_run_start = 08/04/2025 08:00
3030

3131
# data path
3232
data_path = /sdata/runs
@@ -36,6 +36,7 @@ squid_controller = feb
3636
tes_controller = feb
3737
signal_generator = agilent33500B
3838
temperature_controllers = macrt
39+
laser_signal_generator = rigolDG832
3940

4041
# VISA Library (leave commented if standard path)
4142
#visa_library = /usr/lib/x86_64-linux-gnu/libvisa.so.20.0.0
@@ -72,13 +73,11 @@ voltage_max = 10
7273
# Controller -> "controller:[controller_name]_[channel]"
7374
# TES wiring -> "tes:[channel] (optional if same channel name as controller channel)
7475
# Detector -> "detector:[name]" (detector channel name)
75-
connection0 = detector:TES50x200Ar, tes:A, controller:feb1_A
76-
connection1 = detector:TES200x800Ar, tes:B, controller:feb1_B
77-
connection2 = detector:TES100x400Xe, tes:C, controller:feb1_C
78-
connection3 = detector:TES200x800Xe, tes:D, controller:feb1_D
79-
80-
#connection4 = detector:AcceleromterZ, controller:accelerometer
81-
#connection4 = detector:keysightTTL, controller:keysight_ttl
76+
connection0 = detector:Mv4025pcBFRadLeft, tes:A, controller:feb1_A
77+
connection1 = detector:Mv4025pcBFRadRight, tes:B, controller:feb1_B
78+
connection2 = detector:Mv4025pcBFNormLeft, tes:C, controller:feb1_C
79+
connection3 = detector:Mv4025pcBFNormRight, tes:D, controller:feb1_D
80+
connection4 = detector:rigolTTL, controller:ttl_ttl
8281

8382

8483
# Electronics and detector readout constants
@@ -94,10 +93,16 @@ connection3 = detector:TES200x800Xe, tes:D, controller:feb1_D
9493
# preamp_gain (for open loop calculation)
9594
# signal_gen_resistance: [Ohms] -> resistance in the TES line
9695
#
97-
detector_config0 = signal_gen_resistance:30000, shunt_resistance: 0.005, squid_turn_ratio:10, feedback_resistance:1250, parasitic_resistance:0.0035
98-
detector_config1 = signal_gen_resistance:30000, shunt_resistance: 0.005, squid_turn_ratio:10, feedback_resistance:1250, parasitic_resistance:0.0022
99-
detector_config2 = signal_gen_resistance:30000, shunt_resistance: 0.005, squid_turn_ratio:10, feedback_resistance:1250, parasitic_resistance:0.00265
100-
detector_config3 = signal_gen_resistance:30000, shunt_resistance: 0.005, squid_turn_ratio:10, feedback_resistance:1250, parasitic_resistance:0.0022
96+
detector_config0 = signal_gen_resistance:30000, shunt_resistance: 0.005, squid_turn_ratio:10, feedback_resistance:1250, parasitic_resistance:0.003
97+
detector_config1 = signal_gen_resistance:30000, shunt_resistance: 0.005, squid_turn_ratio:10, feedback_resistance:1250, parasitic_resistance:0.0019
98+
detector_config2 = signal_gen_resistance:30000, shunt_resistance: 0.005, squid_turn_ratio:10, feedback_resistance:1250, parasitic_resistance:0.0018
99+
detector_config3 = signal_gen_resistance:30000, shunt_resistance: 0.005, squid_turn_ratio:10, feedback_resistance:1250, parasitic_resistance:0.00183
100+
detector_config4 = signal_gen_resistance:30000, shunt_resistance: 1, squid_turn_ratio:1, feedback_resistance:1, parasitic_resistance:0
101+
detector_config5 = signal_gen_resistance:30000, shunt_resistance: 1, squid_turn_ratio:1, feedback_resistance:1, parasitic_resistance:0
102+
detector_config6 = signal_gen_resistance:30000, shunt_resistance: 1, squid_turn_ratio:1, feedback_resistance:1, parasitic_resistance:0
103+
detector_config7 = signal_gen_resistance:30000, shunt_resistance: 1, squid_turn_ratio:1, feedback_resistance:1, parasitic_resistance:0
104+
105+
101106

102107

103108

@@ -162,6 +167,12 @@ output_fix_gain = 1
162167
#visa_address = TCPIP::192.168.2:12::5025::SOCKET
163168
visa_address = GPIB::10::INSTR
164169
attenuation = 5.01
170+
#attenuation = 1
171+
172+
[rigolDG832]
173+
visa_address = USB0::0x1AB1::1603::DG8A204201623::INSTR
174+
175+
165176

166177

167178
[temperature_controllers]
@@ -189,8 +200,9 @@ lakeshore_heater0 = name:heaterMCls, global_number:30
189200
# Format:
190201
# macrt_modules = module1:[module name], module2:...
191202
# (no specific format for module name, need to be unique)
192-
macrt_modules = module1:mmr3-174, module2:mmr3-184, module3:mgc3-66
193-
203+
#macrt_modules = module1:mmr3-174, module3:mgc3-66
204+
#macrt_modules = module1:mmr3-174, module2:mmr3-184
205+
macrt_modules = module1:mmr3-174, module3:mgc3-66
194206

195207
# Individual module setup
196208
# Format:
@@ -203,12 +215,12 @@ macrt_modules = module1:mmr3-174, module2:mmr3-184, module3:mgc3-66
203215

204216
# Resistance module MMR3-174 - channels are labeled 1, 2, or 3
205217
macrt_mmr3-174_setup = type:mmr3, ip:192.168.0.31
218+
macrt_mmr3-174_chan1 = name:MC, global_number:16, type:FR, serial:105D
206219
macrt_mmr3-174_chan2 = name:CP, global_number:17, type:RX, serial:R654
207220
macrt_mmr3-174_chan3 = name:Still, global_number:18, type:CX, serial:121325
208221

209222
# Resistance MMR3-184 - channels are labeled 1, 2, or 3
210223
macrt_mmr3-184_setup = type:mmr3, ip:192.168.0.32
211-
macrt_mmr3-184_chan1 = name:MC, global_number:19, type:FR, serial:105D
212224
macrt_mmr3-184_chan2 = name:2nde, global_number:20, type:CX, serial:121324
213225
macrt_mmr3-184_chan3 = name:1st, global_number:21, type:CX, serial:121322
214226

0 commit comments

Comments
 (0)