Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rough approximation of our approach to odemis SI acquisition
def approx_acquisition_method():
self.spect.data.synchronizedOn(self.escan.newPosition)
startt = time.time()
self.spect.data.subscribe(self.receive_spect_point)
sed_data = self.sed.data.get()
# wait the last point is fully acquired
self.acq_complete.wait()
def receive_spect_point(self, dataflow, data):
"""
callback for each point scanned as seen by the spectrometer
"""
self.acq_spect_buf.append(data)
self.acq_left -= 1
if self.acq_left <= 0:
dataflow.unsubscribe(self.receive_spect_point)
self.acq_complete.set()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.