-
Notifications
You must be signed in to change notification settings - Fork 2
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
Loop forever or for n steps, or for given time. #14
Comments
@MerlinSmiles we use a NoneSweep for that, it corresponds basically to the step param you introduced. I think using a manual parameter in that fashion is simple enough and does not warrant introducing extra syntax. I do however like the BreakIf statement. This could be combined with a Loop to e.g. 1e8 with a break if timemark>end_time. I don't think it warrants introducing the Loop_forever(). I have to admit I am a bit biased though, I much prefer to be allowed to use standard python (which allows all sorts of constructions you can come up with) within the loop than to introduce an ad hoc syntax for every special case we come up with. The reason I don't like it is that I think it is at use time very hard to know what all the specific commands are that are available, not to mention teaching this to your new master student. Therefore I am of the opinion simpler is better. |
@AdriaanRol generally I agree with your statement of 'simpler is better' but I'm more in favor of usability. |
Fair point, would it be easier if a ManualParameter that does nothing was predefined? The reason that this seems so natural to me is that we used to have sweep functions (which were basically wrappers around parameters) and we had the NoneSweep as one of the most basic ones. To me this really seems the simplest generalisation of the concept of a loop. I think the question boils down to how many new concepts does someone need to learn. The question then is what is harder to learn, the ins and outs of the Loop syntax (+special cases) or how to use the concepts you have to do a repeated loop. As the None parameter involves 1 line of code this seems simple to me, especially as at this point there is no good overview of the different ways the Loop can be used. However in the ideal world we will end up with a good manual for the Loop and this may be the preferred way. So to summarise my opinion on this: Yes, this is a basic functionality that should be there. And it is a matter of taste what is simpler to learn for a new user and this depends a lot on how we structure our concepts and explanations. |
You raise good points there, and you're right, the parameter belongs to the basic concept of qcodes so it has to be introduced anyways. I'm not in favor of a There is another point I didnt mention before, but that is more a bug / unhappy feature of the dataset, When the loop is created, an array to hold the data is created with it. for live-plotting that array is synced all the time. |
If this is a parameter, then you'd use it like This brings up that we really need to support expanding the data arrays during a
Right - to get started quickly I just had |
I have bad experience with expanding (almost) single points, expanding in chunks is much nicer, I've been doing newsize = oldsize * 2 a lot. As for the sync, wouldnt it be enough to call |
Sounds reasonable
Yes, as long as we don't allow data to arrive out of order. The plot wouldn't need to store it, the |
Why would the dataset have to save it? if I connect several plots, the dataset would have to keep track of all connected plots, no? |
I suppose there are two sync steps here - first the |
Ah, I didnt think about that... will think about it. |
During measurements I often encounter situations where I want to run a loop over and over again, i.e. measuring IV-traces during cooldown.
Is there an easy solution for that?
What I can do right now is something like this:
It would be nice if we had loops that don't do anything than repeating the inner loop, or loops that would repeat the inner loop for a given amout of time.
@alexcjohnson or anyone else, any ideas on how to do this?
The text was updated successfully, but these errors were encountered: