Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hooks to piezo scan (CounterAndScanner) to perform arbitrary function hook during scan #83

Open
gadamc opened this issue Feb 3, 2023 · 0 comments

Comments

@gadamc
Copy link
Collaborator

gadamc commented Feb 3, 2023

Researchers would like the ability to perform tasks at each point in a piezo scan. Such tasks could be to take an ODMR spectrum or measure the wavelength spectrum emitted. In order to provide for arbitrary functionality, a hook needs so be installed in the CounterAndScanner class. The user-defined function will also likely generate some data. We need to construct a way for the user to access that data along with the scan data.

Upon review of CounterAndScanner class, we might need to consider the way that class is organized and ask if multiple classes are needed to more easily achieve this functionality. The qt3scan (piezoscan.py) application could also be a user of this callback hook -- in the case of qt3scan, the function provided to CounterAndScanner would simply be to update the data for its window.

Also, we might need to install multiple hooks -- one hook for each point in the scan, one at the end of each raster line (used by qt3scan to draw a new line), and a hook to perform an action at the end of a scan.

One thing I immediately see is that we probably don't want hook functions being called when we run the 'optimize' function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant