*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit f3af7959 authored by Leolab Cavity CAD PC's avatar Leolab Cavity CAD PC
Browse files

Fastcomtec: 600s Sweeps work with these wait times, don't know if we can wait shorter

parent 70f9c602
No related branches found
No related tags found
1 merge request!5Added Fastcomtec MCS8A timetagger for measurements with SPCM
...@@ -59,7 +59,7 @@ class MCS8AWorker(Worker): ...@@ -59,7 +59,7 @@ class MCS8AWorker(Worker):
# TODO: How to handle parameters (start new measurment when they changed, or treat parameters statically) # TODO: How to handle parameters (start new measurment when they changed, or treat parameters statically)
with h5py.File(h5_file,'r') as f: with h5py.File(h5_file,'r') as f:
stop_time = f["devices/" + f["connection table"].attrs["master_pseudoclock"]].attrs["stop_time"] stop_time = f["devices/" + f["connection table"].attrs["master_pseudoclock"]].attrs["stop_time"]
if getattr(self.device.get_acq_status(),"started") != 1 or time.perf_counter()-getattr(self,"start_time",-self.maxduration)>self.maxduration-stop_time-0.1: if getattr(self.device.get_acq_status(),"started") != 1 or time.perf_counter()-getattr(self,"start_time",-self.maxduration)>self.maxduration-stop_time-0.5:
while getattr(self.device.get_acq_status(),"started") == 1: while getattr(self.device.get_acq_status(),"started") == 1:
# If the current measurement doesn't have enought time left for this shot, wait until measurment ends. # If the current measurement doesn't have enought time left for this shot, wait until measurment ends.
time.sleep(0.1) time.sleep(0.1)
...@@ -74,7 +74,7 @@ class MCS8AWorker(Worker): ...@@ -74,7 +74,7 @@ class MCS8AWorker(Worker):
# self.device.erase_measruement() # Don't erase because this takes super long for some reason # self.device.erase_measruement() # Don't erase because this takes super long for some reason
self.device.start_measurement() self.device.start_measurement()
self.start_time = time.perf_counter() self.start_time = time.perf_counter()
time.sleep(0.1) # some buffer time to make sure the measurement already started for sure time.sleep(1) # some buffer time to make sure the measurement already started for sure
# TODO: What's the minimum time to wait here? # TODO: What's the minimum time to wait here?
# Save where to find the measurement data (which file and within file) # Save where to find the measurement data (which file and within file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment