Skip to content

Commit bca4831

Browse files
committed
🐛 Prevent DExTer and PyDex File IDs getting out of sync with long camera exposures
1 parent 0a7f086 commit bca4831

13 files changed

+479
-208
lines changed

andorcamera/roi_1x1_larger_arrays.dat

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
0 setPointT = -60
2+
1 coolerMode = 1
3+
2 shutterMode = 1
4+
3 outamp = 0
5+
4 hsspeed = 2
6+
5 vsspeed = 4
7+
6 preampgain = 3
8+
7 EMgain = 10
9+
8 hbin = 1
10+
9 hstart = 112
11+
10 hend = 272
12+
11 vbin = 1
13+
12 vstart = 132
14+
13 vend = 292
15+
14 cropMode = 0
16+
15 readmode = 4
17+
16 acqumode = 5
18+
17 triggerMode = 7
19+
18 frameTransf = 0
20+
19 fastTrigger = 0
21+
20 expTime = 10e-3
22+
21 verbosity = 0
23+
22 numKinetics = 1

dds/dds/defaultDDS2.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"FTW": ["110.0", "80.5", "83.33", "110.0", "253.0"], "POW": ["0.0", "0.0", "0.0", "0.0", "0.0"], "AMW": ["1.0", "1.0", "1.0", "0.74", "0.906"], "fout": [["110.0", "100.105", "100.076", "100.059", "100.077", "100.0938", "100.1106", "99.995"], ["80.37", "80.0", "80.0", "110.0", "0.0", "110.0", "0.0", "0.0"], ["84.3", "80.0", "80.0", "84.28", "110.0", "110.0", "110.08", "110.0"], ["100.0", "82.0", "100.0", "79.46", "0.0", "0.0", "0.0", "99.948"], ["250.0", "252.0", "100.0166", "250.0", "100.01", "100.035", "100.06", "99.938"]], "tht": [["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"]], "amp": [["0.0", "0.305", "0.305", "0.075", "0.075", "0.075", "0.075", "0.305"], ["0.5", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["1.0", "0.0", "1.0", "1.0", "0.0", "0.0", "0.0", "0.85"], ["0.0", "1.0", "0.0", "1.0", "0.0", "0.0", "0.0", "0.9"], ["0.0", "0.906", "0.82", "0.33", "0.33", "0.33", "0.33", "0.33"]], "Start_Address": [["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["3.0", "0.0", "6.0", "509.0", "0.0", "0.0", "1010.0", "509.0"], ["3.0", "0.0", "6.0", "509.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "499.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "1011.0", "0.0", "1011.0", "0.0", "0.0", "0.0", "0.0"]], "End_Address": [["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["4.0", "1.0", "505.0", "1008.0", "1.0", "1.0", "1021.0", "1008.0"], ["4.0", "1.0", "505.0", "1008.0", "0.0", "0.0", "0.0", "0.0"], ["1.0", "500.0", "1000.0", "1000.0", "1000.0", "1000.0", "1000.0", "1000.0"], ["1.0", "1022.0", "1.0", "1022.0", "0.0", "0.0", "0.0", "0.0"]], "Rate": [["1.0", "1.0", "1.0", "1.0", "1.0", "1.0", "1.0", "1.0"], ["0.004", "0.004", "0.3", "0.3", "0.004", "0.004", "0.6", "0.3"], ["0.004", "0.004", "0.3", "0.3", "0.0", "0.0", "0.0", "0.0"], ["1.0", "0.281", "0.004", "0.188", "0.224", "0.251", "0.272", "0.4"], ["0.004", "0.1", "0.004", "0.1", "0.0", "0.0", "0.0", "0.0"]], "No_dwell": [["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"]], "Zero_crossing": [["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"]], "RAM_playback_mode": [[["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"]], [["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"]], [["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"]], [["0.0", "0.0", "0.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"]], [["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"]]], "RAM_data_filename": ["", "STIRAP_cos4.csv", "STIRAP_cos4.csv", "", "STIRAP_cos4.csv"]}
1+
{"FTW": ["110.0", "80.5", "83.33", "110.0", "253.0"], "POW": ["0.0", "0.0", "0.0", "0.0", "0.0"], "AMW": ["1.0", "1.0", "1.0", "0.74", "0.906"], "fout": [["110.0", "100.105", "100.076", "100.059", "100.077", "100.0938", "100.1106", "99.995"], ["80.37", "80.0", "80.0", "110.0", "0.0", "110.0", "0.0", "0.0"], ["84.3", "80.0", "80.0", "84.28", "110.0", "110.0", "110.08", "110.0"], ["100.0", "82.0", "100.0", "79.46", "0.0", "0.0", "0.0", "99.948"], ["250.0", "252.0", "100.0166", "250.0", "100.01", "100.035", "100.06", "99.938"]], "tht": [["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"]], "amp": [["0.0", "0.305", "0.305", "0.075", "0.075", "0.075", "0.075", "0.305"], ["0.5", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["1.0", "0.0", "1.0", "1.0", "0.0", "0.0", "0.0", "0.85"], ["0.0", "1.0", "0.0", "1.0", "0.0", "0.0", "0.0", "0.9"], ["0.0", "0.906", "0.82", "0.33", "0.33", "0.33", "0.33", "0.33"]], "Start_Address": [["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["3.0", "0.0", "6.0", "509.0", "0.0", "0.0", "1010.0", "509.0"], ["3.0", "0.0", "6.0", "509.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "499.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "1011.0", "0.0", "1011.0", "0.0", "0.0", "0.0", "0.0"]], "End_Address": [["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["4.0", "1.0", "505.0", "1008.0", "1.0", "1.0", "1021.0", "1008.0"], ["4.0", "1.0", "505.0", "1008.0", "0.0", "0.0", "0.0", "0.0"], ["1.0", "500.0", "1000.0", "1000.0", "1000.0", "1000.0", "1000.0", "1000.0"], ["1.0", "1022.0", "1.0", "1022.0", "0.0", "0.0", "0.0", "0.0"]], "Rate": [["1.0", "1.0", "1.0", "1.0", "1.0", "1.0", "1.0", "1.0"], ["0.004", "0.004", "0.3", "0.3", "0.004", "0.004", "0.6", "0.3"], ["0.004", "0.004", "0.3", "0.3", "0.0", "0.0", "0.0", "0.0"], ["1.0", "0.281", "0.004", "0.188", "0.224", "0.251", "0.272", "0.4"], ["0.004", "0.1", "0.004", "0.1", "0.0", "0.0", "0.0", "0.0"]], "No_dwell": [["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"]], "Zero_crossing": [["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0", "0.0"]], "RAM_playback_mode": [[["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"]], [["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"]], [["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"]], [["0.0", "0.0", "0.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"]], [["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "1.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"], ["0.0", "0.0", "0.0"]]], "RAM_data_filename": ["", "", "", "", ""]}

imageanalysis/atomChecker2.py

+1
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ def set_rois(self, ROIlist, atom='Cs'):
272272
"""Set the ROI list as the new ROIs"""
273273
self.rh[atom].create_rois(len(ROIlist), label=atom+' ')
274274
self.rh[atom].resize_rois(ROIlist)
275+
self.create_new_rois(atom=atom) # populates the table widget
275276
self.display_rois()
276277

277278
def make_roi_grid(self, toggle=True, method='', atom='Cs'):

imageanalysis/dataanalysis.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, directory=None):
2929

3030
def load_from_directory(self,directory):
3131
maia_files = [x for x in os.listdir(directory) if x.split('.')[0] == 'MAIA']
32-
# print(maia_files)
32+
print(maia_files)
3333

3434
self.analysers = {}
3535
for file in maia_files:
@@ -125,7 +125,8 @@ def convert_maia_data_to_df(self,maia_data):
125125

126126
# use threshold data to calculate occupancy
127127
counts_df_occupancy_columns = [x+' occupancy' for x in roi_names]
128-
for occupancy_col, counts_col, thresh_col in zip(counts_df_occupancy_columns,counts_df,threshold_df):
128+
for occupancy_col, counts_col, thresh_col in zip(counts_df_occupancy_columns,counts_df_columns,threshold_df_columns):
129+
# print(occupancy_col, counts_col, thresh_col)
129130
counts_df[occupancy_col] = np.where(counts_df[counts_col] > threshold_df[thresh_col][0],True,False)
130131

131132
self.num_images = num_images
@@ -135,7 +136,9 @@ def convert_maia_data_to_df(self,maia_data):
135136
self.aux_df = pd.concat([threshold_df,roi_coords_df],axis=1)
136137

137138
def load_dfs_from_file(self,filename):
138-
self.aux_df = pd.read_csv(filename,nrows=2)
139+
print(filename)
140+
self.aux_df = pd.read_csv(filename,nrows=1)
141+
print(self.aux_df)
139142
self.counts_df = pd.read_csv(filename,skiprows=2,index_col='File ID')
140143
roi_names = [x[:-7] for x in self.counts_df.columns if ' counts' in x]
141144

imageanalysis/imagerGUI.py

+1
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ def recieve_image(self,image,file_id=None,image_num=None):
438438
MAIA. The file ID and image number can be manually specified
439439
or can just be left as None to let the MAIA assign the file ID
440440
and image number."""
441+
print('iGUI recieved image: file_id, image_num =',file_id,image_num)
441442
self.signal_send_maia_image.emit(image,file_id,image_num)
442443

443444
def get_draw_image_num(self):

imageanalysis/multiAtomImageAnalyser.py

+13-7
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ def recieve_image(self,image,file_id=None,image_num=None):
194194
file_id = self.file_id
195195
if image_num is None:
196196
image_num = self.next_image
197-
image_num = self.next_image
198-
file_id = self.file_id
199197
self.queue.append([image,file_id,image_num])
200198
self.signal_status_message.emit('Recieved ID {} Im {} and placed in queue'.format(file_id,image_num))
201199
self.signal_draw_image.emit(image,image_num)
@@ -276,9 +274,15 @@ def process_next_image(self):
276274
image = image - self.emccd_bias # don't edit in place because this seemed to cause an issue with images not showing in GUI. Maybe not thread safe?
277275
# print('image min',np.min(image))
278276
# print('image max',np.max(image))
277+
image_num_too_big = False
279278
for group in self.roi_groups:
280279
for roi in group.rois:
281-
roi.counts[image_num][file_id] = image[roi.x:roi.x+roi.w,roi.y:roi.y+roi.h].sum()
280+
try:
281+
roi.counts[image_num][file_id] = image[roi.x:roi.x+roi.w,roi.y:roi.y+roi.h].sum()
282+
except IndexError: # image_num was not valid for the number of images that MAIA is expecting
283+
image_num_too_big = True
284+
if image_num_too_big:
285+
self.signal_status_message.emit('Image number {} is greater than max expected images, so this image has been ignored (most likely cause is rearrangement toggle).')
282286
self.signal_status_message.emit('Finished processing ID {} Im {}'.format(file_id,image_num))
283287
self.calculate_thresholds()
284288

@@ -303,8 +307,8 @@ def calculate_thresholds(self):
303307
for group in self.roi_groups:
304308
for roi in group.rois:
305309
for image in range(len(roi.counts)):
306-
print(roi.autothreshs)
307-
print('image',image)
310+
# print(roi.autothreshs)
311+
# print('image',image)
308312
if roi.autothreshs[image]:
309313
values = np.fromiter(roi.counts[image].values(), dtype=float)
310314
roi.thresholds[image] = self.calculate_threshold(values)
@@ -416,13 +420,15 @@ def save(self):
416420
self.should_save to true, but this will only be done once the image
417421
queue is empty."""
418422
if (self.should_save) and (not self.queue): # only save if should_save is True and queue is empty
419-
# filename = self.results_path+'\{}\MAIA.{}.csv'.format(self.measure_prefix,self.hist_id) # TODO might need to add hist ID in here
420-
filename = self.results_path+'\MAIA.{}.csv'.format(self.hist_id) # TODO might need to add hist ID in here
423+
self.signal_status_message.emit('Beginning save process')
424+
filename = self.results_path+'\MAIA.{}.csv'.format(self.hist_id)
421425
data = self.get_analyser_data()
426+
self.signal_status_message.emit('Extracted analyser data')
422427
analyser = Analyser(data)
423428
additional_data = self.get_user_variable_dict()
424429
additional_data['Hist ID'] = self.hist_id
425430
additional_data['EMCCD bias'] = self.emccd_bias
431+
self.signal_status_message.emit('Created Analyser, requesting data save')
426432
try:
427433
analyser.save_data(filename,additional_data)
428434
self.signal_status_message.emit('Saved data to {}'.format(filename))

master.py

+20-1
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ def init_UI(self, startn=0):
333333
'Resync DExTer', 'Start acquisition'])
334334
self.actions.resize(self.actions.sizeHint())
335335
self.centre_widget.layout.addWidget(self.actions, 2,0,1,1)
336+
336337

337338
# shortcuts
338339
self.shortcuts=[QShortcut('F2', self)]
@@ -359,6 +360,9 @@ def init_UI(self, startn=0):
359360
self.action_button.resize(self.action_button.sizeHint())
360361
self.centre_widget.layout.addWidget(self.action_button, 2,1, 1,1)
361362

363+
self.sync_label = QLabel('')
364+
self.centre_widget.layout.addWidget(self.sync_label, 3,0, 1,3)
365+
362366
#### choose main window position, dimensions: (xpos,ypos,width,height)
363367
self.setWindowTitle('PyDex controller')
364368
self.setWindowIcon(QIcon('docs/pydexicon.png'))
@@ -556,11 +560,13 @@ def start_action(self, action_text=''):
556560
if 'Run sequence' in action_text:
557561
# queue up messages: start acquisition, check run number
558562
self.action_button.setEnabled(False) # only process 1 run at a time
559-
self.rn._k = 0 # reset image per run count
563+
self.rn._k = 0 # reset image per run count
564+
self.rn.set_n('0')
560565
self.rn.server.add_message(TCPENUM['TCP read'], 'start acquisition\n'+'0'*2000)
561566
self.rn.monitor.add_message(self.rn._n, 'update run number')
562567
elif 'Multirun run' in action_text:
563568
if self.rn.seq.mr.check_table():
569+
self.rn.set_n('0')
564570
if not self.sync_toggle.isChecked():
565571
self.sync_toggle.setChecked(True) # it's better to multirun in synced mode
566572
warning('Multirun has changed the "sync with DExTer" setting.')
@@ -590,6 +596,7 @@ def start_action(self, action_text=''):
590596
self.rn.seq.mr.ind = 0
591597
self.rn.seq.mr.reset_sequence(self.rn.seq.tr.copy())
592598
self.rn.iGUI.clear_data_and_queue()
599+
self.sync_file_id_with_dexter(True)
593600
elif 'Skip multirun histogram' in action_text:
594601
if self.rn.seq.mr.multirun:
595602
self.rn.skip_mr_hist()
@@ -644,6 +651,14 @@ def sync_mode(self, toggle=True):
644651
reset_slot(self.rn.cam.AcquireEnd, self.rn.receive, toggle)
645652
reset_slot(self.rn.cam.AcquireEnd, self.rn.unsync_receive, not toggle)
646653

654+
def sync_file_id_with_dexter(self, toggle):
655+
"""Toggles whether the PyDex File ID should be synced with Dexter."""
656+
if toggle:
657+
self.sync_label.setText('Sync File ID with DExTer: on')
658+
else:
659+
self.sync_label.setText('Sync File ID with DExTer: off')
660+
reset_slot(self.rn.server.dxnum,self.rn.set_n,toggle)
661+
647662
def set_inflxdb_toggle(self, toggle=False):
648663
"""Whether to send data to influxdb database"""
649664
# self.rn.sw.send_data = toggle
@@ -699,6 +714,7 @@ def respond(self, msg=''):
699714
else: warning('Run %s started without camera acquisition.'%(self.rn._n))
700715
if 'restart' not in msg: self.rn.multirun_go(msg) # might be resuming multirun instead of starting a new one
701716
elif 'multirun run' in msg:
717+
self.sync_file_id_with_dexter(False)
702718
if self.check_rois.isChecked(): # start experiment when ROIs have atoms
703719
reset_slot(self.rn.check.rh['Cs'].trigger, self.trigger_exp_start, True)
704720
self.rn.atomcheck_go() # start camera in internal trigger mode
@@ -763,6 +779,9 @@ def end_run(self, msg=''):
763779
# for im in unprocessed:
764780
# # image dimensions: (# kscans, width pixels, height pixels)
765781
# self.rn.receive(im[0])
782+
783+
print('===reset ID slot===')
784+
self.sync_file_id_with_dexter(True)
766785
self.idle_state()
767786

768787
def print_times(self, keys=['waiting', 'blocking']):

monitor/DEoptimiseConfig.dat

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
n=16633
1+
n=0
22
config_file=Z:/Tweezer/Code/Python 3.5/PyDex/monitor/DEoptimiseConfig.dat
33
trace_file=DAQtrace.csv
44
graph_file=99.2MHz.csv
5-
save_dir=Z:\Tweezer\Experimental Results\2023\January\13\Measure9
5+
save_dir=Z:\Tweezer\Experimental Results\2023\February\17\Measure0
66
Sample Rate (kS/s)=50.0
7-
Duration (ms)=250.0
7+
Duration (ms)=600.0
88
Trigger Channel=/Dev4/PFI0
99
Trigger Level (V)=1.0
1010
Trigger Edge=rising
11-
channels=[[Dev4/ai0, STIRAP, 1.0, 0.0, 10.0, 0, 0], [Dev4/ai1, RB4, 1.0, 0.0, 1.0, 1, 1], [Dev4/ai2, bias coils, 1.0, 0.0, 10.0, 0, 0], [Dev4/ai3, RB2, 1.0, 0.0, 1.0, 1, 1], [Dev4/ai4, jump coils, 1.0, 0.0, 10.0, 0, 0], [Dev4/ai5, 1013, 1.0, 0.0, 5.0, 0, 0], [Dev4/ai6, RB1, 1.0, 0.0, 5.0, 1, 1], [Dev4/ai7, 817, 1.0, 0.0, 5.0, 0, 0]]
11+
channels=[[Dev4/ai0, Cs MOT, 1.0, 0.0, 10.0, 1, 1], [Dev4/ai1, RB4, 1.0, 0.0, 1.0, 0, 0], [Dev4/ai2, 1065 power, 1.0, 0.0, 10.0, 0, 0], [Dev4/ai3, RB2, 1.0, 0.0, 1.0, 0, 0], [Dev4/ai4, jump coils, 1.0, 0.0, 10.0, 0, 0], [Dev4/ai5, 1013, 1.0, 0.0, 5.0, 0, 0], [Dev4/ai6, RB1, 1.0, 0.0, 5.0, 0, 0], [Dev4/ai7, 817, 1.0, 0.0, 5.0, 0, 0]]

mythread.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- if the queue is empty, keep refreshing.
99
- stop the thread by calling close()
1010
"""
11-
from PyQt5.QtCore import QThread, pyqtSignal
11+
from PyQt5.QtCore import QThread, pyqtSignal, pyqtSlot
1212
from PyQt5.QtWidgets import QApplication
1313
enco = 'mbcs' # TCP message encoding
1414

@@ -31,6 +31,7 @@ def __init__(self):
3131
super().__init__()
3232
self.app = QApplication.instance()
3333

34+
@pyqtSlot(object)
3435
def add_item(self, new_item, *args, **kwargs):
3536
"""Append a new item to the queue for processing."""
3637
self.queue.append(new_item)

0 commit comments

Comments
 (0)