Parameter / DelegateParameter value validation #4819
Junliang-Wang
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Hi Junliang, Thanks for your question. That sounds like a reasonable ask. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I love the safety limits for Parameters, but I have a tiny suggestion for the value validation.
The problem is that DelegateParameter.validate does not check its source parameter limits.
Let's see the following case:
One solution is to add in .validate also the validation for the source parameter.
For instance, I have a simple method to validate a list of values for any qcodes parameter.
Although this may seem to be an edge case, it is very useful when one wants to validate all the sweeping values before running the actual measurement.
The problem with validating at the moment of setting the value is that the measurement can stop in the middle of the sweep, unless you have an exception block to handle the error.
Therefore, I think it is better to add also the validation of all the source parameters.
Cheers,
Junliang
Beta Was this translation helpful? Give feedback.
All reactions