Closed rassouly closed 4 years ago
instrument_property
behaves like a regular property
and there is no way this code ever worked. Your code works, another way to avoid duplicating would be something like:
field_sweep_rate = copy.deepcopy(CS4.field_sweep_rate)
@field_sweep_rate.setter
@secure_communication()
def field_sweep_rate(self, rate):
# converted from T/min to A/s
rate /= 60 * self.field_current_ratio
self.write('RATE 0 {};'.format(rate))
but I am fine with your version. Can you ping anybody in Takis lab to validate this ? not sure @galactikvoyager has time for this.
I don't think anyone at Takis lab was using this branch because it has been like this for a while. I will try to contact Marius anyways.
@lcontami has tried several time to do stuff but I forgot how it ended.
Since I couldn't get anyone in Paris to review this patch, I suggest we merge it now and fix the (potential) bugs later.
Fair enough. Can you rebase this on top of #71 and use query rather than ask ? I will merge once it is done.
Could you rebase one last time to clean a bit the history ?
Should be good to merge now.
I don't fully understand the interaction between @instrument_property and inheritance but copying the getter from the parent class seemed to fix the problem.
This patch fixes the last driver error present when launching exopy on my system.
The call to
ask
will need to be changed intoquery
once #71 is merged.