We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Ophyd has a way to abstract multiple axes into a single object with a scientific unit.
The text was updated successfully, but these errors were encountered:
Ophyd docs at http://nsls-ii.github.io/ophyd/positioners.html#pseudopositioner
PsuedoPositioner basic examples from my testing:
PsuedoPositioner
from ophyd.device import Component as Cpt from ophyd.positioner import SoftPositioner from ophyd.pseudopos import (PseudoPositioner, PseudoSingle, pseudo_position_argument, real_position_argument) class Test(PseudoPositioner): energy = Cpt(PseudoSingle, limits=(0, 1000)) motor = Cpt(SoftPositioner, limits=(0, 100), init_pos=10) @pseudo_position_argument def forward(self, pseudo_pos): return self.RealPosition(motor=pseudo_pos.energy/10) @real_position_argument def inverse(self, real_pos): return self.PseudoPosition(energy=real_pos.motor*10)
In [14]: t.position Out[14]: TestPseudoPos(energy=4.0) In [15]: t.position.energy Out[15]: 4.0 In [16]: t.energy.move(40) Out[16]: MoveStatus(done=True, pos=test, elapsed=0.0, success=True, settle_time=0.0) In [17]: t.energy.position Out[17]: 40.0
Sorry, something went wrong.
@klauer this looks familiar 🤔
Hah! Indeed it does...
ZryletTC
No branches or pull requests
Ophyd has a way to abstract multiple axes into a single object with a scientific unit.
The text was updated successfully, but these errors were encountered: