-
Notifications
You must be signed in to change notification settings - Fork 26
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
Time overhead of Alazar measurements #113
Comments
Thank you @emartinez for this nice timing overview. I would suggest that we focus on fixing the allocation as a first step as this is comparably easy and it is certain to yield improvements. |
Thanks for this esteban. Moving the the call to the demodulator out of the pre_start_capture seems like a really obvious and easy fix. I'd be interested to know how long the filtering takes compared to the matrix multiplication and if there is any reason why turning off the filtering (and instead just taking the average) takes longer if you do it via the demodulator rather than by hand matrix multiplication (and by hand I don't actually mean by hand). It would also be really good to map out the different ways of taking data and to get some duration estimate as well and a feeling for dead time during the measurement and how much data we are taking. My thinking is in the direction of working out the likelihood of being able to demodulate on the fly and of course also the memory limitations. We could work out a plan for how to tackle this maybe next week or the week after (and work out who does what)? |
It's not quite as simple as moving the init of the demodulation. You cannot know until get is called which demod frequencies are used. This is not to say that it can't be done but we would need to automatically reinit the demodulator when ever the demod frequencies are changed |
the demod freq of a channel is a parameter of it though isn't it? so we could change the set_cmd to update or reinit the demodulator at that point rather than on acquire? Or as part of prepare channel? What do you think? Also I noticed that from the syntax it looks like demodulator still thinks it can demodulate at multiple frequencies but since each channel has max one demodulation frequency this will never happen, is that true? |
@nataliejpg Yes that's what i suggested.
No that is wrong AFAIK, There is only one demodulator that does the demodulation at all the channels at the same time |
Thanks for the clarification I wasn't aware a single demodulator did everything. @Dominik-Vogel the slowest part of the demodulator is not the scipy.filter (this doesnt even show up in the list above) rather of the 5.4s 65% of the time is spent at Also of note the one of the reasons for Wolfgang/Gijs to come to CPH on Friday is to see what we can learn from each other on how to best to take data with the alazar card. So it might be useful to think about getting the alazar channels into main qcodes. |
Just to follow up on the point from @Dominik-Vogel about how many buffers/records/samples are used. The overhead is not surprisingly very dependent on the amount of averages and whether the data is averaged over buffers (this is cheap as it is done on the fly during measurement and there is less data to demodulate). To give a few numbers with averages over buffers and samples:
in ATS.py:616(acquire):
in ATS_ctrl (post_acquire)
|
so more time in handle buffer than in post_acquire!? that's interesting. Next time I get on a fridge I'll compare filter on to filter off (but within the demodulator). And try to make some timer for dead time that we could be using to demodulate on the fly. :) Thanks @ThorvaldLarsen |
I am not entirely sure what is happening during calls to handle_buffer and ATS call_dll. Neither of them takes long enough to complete the full measurement so alazar must be acquiring data during both function calls. |
The actual data acquisition happens asynchronously while the copying is happening in handle buffer so it's a bit more complicated. Also @ThorvaldLarsen I fixed the table |
ah ok, that makes more sense, thanks @jenshnielsen. |
@jenshnielsen @ThorvaldLarsen @nataliejpg See below a profile of a measurement I am doing with the Alazar card. The bottomline is:
For reference, a naïve implementation of the demodulation routine (a single matrix product) takes a couple hundred ms. Some suggestions for optimization are:
The text was updated successfully, but these errors were encountered: