Replies: 1 comment 2 replies
-
|
What an interesting quesion! thank you! this really depends on how you identify the moment when this refocus is needed. So if for example you want to do it every 10 points of the sweep, then just add a condition for that inside the for-loop: for idx, set_v in enumerate(np.linspace(0,25,100):
if idx % 10 == 0:
do_auto_focus()
....If you have a morecomplicated scenario, you can still implement it - that's the power of the measurement context manager (as compared to e.g. dond function) that it's plain python, so feel free to do what you need to do, and at some point just call add_result when the time is right to store the data. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I’m just getting started with QCoDeS, so apologies if this is a basic question.
We’re working with an optical setup where we need to run long measurements at a fixed position. To keep the sample in focus, we use a piezo connected to the sample stage. The piezo is driven via an analog output of a DAQ card, and the same DAQ is used to read out the electrical signal from an APD.
What I’m trying to do is implement a function that optimizes the stage (piezo) position based on the detected counts. I’d like to trigger this optimization either:
What’s the best way to integrate this kind of “autofocus” step into a simple measurement loop like the one below?
Hope the question is clear—thanks a lot for any advice!
Beta Was this translation helpful? Give feedback.
All reactions