-
Notifications
You must be signed in to change notification settings - Fork 53
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
limits should be stored in the connection table #44
Comments
Original comment by Jan Werkmann (Bitbucket: PhyNerd, GitHub: PhyNerd). I'm in favor of this change but I see one problem with storing limits in connection table properties. The limits of a experiment file need to be the exact same as those of the connection table or connection table comparison fails. This could be done by checking them separately in Connection.compare_to. |
Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey). Unfortunately I don't have a better idea. I don't particularly like having to treat "limits" as a special key of the connection table properties dictionary, but don't see any other option other than not allowing you to have limits that differ from the connection table. I'm not sure...maybe you shouldn't be able to set limits that are different to the main connection table? What are the scenarios where you might want different limits set? |
Original comment by Jan Werkmann (Bitbucket: PhyNerd, GitHub: PhyNerd). Don't have any example handy, but I would feel better with allowing subranges. This prevents the user from recompiling the connection table in some cases and that always a good thing. |
Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey). Another idea I have is that we could encode the method of comparison inside the key of the JSON dictionary. This is similar to the way you define SQL clauses using Pythonic syntax in Django. For example, instead of saving it as Not sure if I like this a 100%, but could be preferable to hardcoding a special case for Note: I realise |
Original comment by Jan Werkmann (Bitbucket: PhyNerd, GitHub: PhyNerd). While that sounds more elegant it is equivalent in my opinion. I don't think there is any other case where we store a 2-tuple in the connection table properties that would need this subset feature. Also limits allowing subsets doesn't really need documenting as that is expected behavior. |
Do not assume `__file__` is not None if it exists. Approved-by: Philip Starkey <[email protected]>
Original report (archived issue) by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).
Currently limits only protect you from breaking something when running a shot, but are not respected by BLACS since they aren't saved anywhere.
Device limits (really only relevant to analog quantities and derivatives) should be stored somewhere so that BLACS can access them and use them to protect devices. I'm not sure that connection table properties is really the best idea (should probably be device properties) but since we don't have device properties working for channels (they only work for devices) then the connection table is really the only place left to us.
We should probably also document them (at least show an example in example.py) as probably most people reading this won't even have known limits exist!
The text was updated successfully, but these errors were encountered: