Last active
July 4, 2019 12:58
-
-
Save thomasaarholt/030ffe365f97ba4aa251a23a7bd62538 to your computer and use it in GitHub Desktop.
Rough approximation of our approach to odemis SI acquisition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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