-
Notifications
You must be signed in to change notification settings - Fork 76
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
BUG: additional pseudo-positioner (not in _pseudo) feature not working #924
Comments
from hklpy, the
|
There is no unit test for this feature. The Either the instructions should be changed, removing the instructions shown above, or this will need more work to implement the feature allowing additional pseudos. |
Why do you want to add an additional pseudo axis that is not included in any of the pseudo machinery? Looking at that code (last touched in 2015 when @klauer originally wrote it), my guess is that the intention of |
It's a valid question and I can only conjure up one case. I was trying out the documented feature for The case I conjure is to compute |hkl| vector magnitude Q as a convenience. This could be done as a property but it does not show up with a I don't quite understand the promotion of components that are not Please improve my clumsy wording here. |
I would like @klauer to weigh in, but I am in favor of ripping that extra control out. If you use it to mask that a The case of adding There is no use of |
@tacaswell we have some code that inspects |
The class version is also always shadowed by an instance version that is created at init time. |
Note this problem cannot be solved in bluesky/hklpy#48 |
@prjemian Are you OK with the suggestion to remove this functionality (which does not work) rather than trying to fix it? |
Yes. |
Ok, understanding this again I think what is going on here is:
I guess we could raise a better error, but I'm not sure what the intended purpose of this feature was.
So I come to:
If we were starting now, I might want to do the pseudo axis only with Type annotation 😈 . |
Edited to change title and emphasize the actual problem to solve.
Looks like a problem in ophyd.pseudopos, lines 417-8, the
_idx
is clearly set toNone
with statement that it will be set later:Later, it would be set by this code:
... but this fails because we are following these instructions
In our test, we setup a
Fourc
class: https://github.com/bluesky/hklpy/blob/98eb88c0a05dff7b200b58d36bffe77dbdd155cb/hkl/tests/test_extra_motor.py#L13-L27then subclass per instructions. https://github.com/bluesky/hklpy/blob/98eb88c0a05dff7b200b58d36bffe77dbdd155cb/hkl/tests/test_extra_motor.py#L104-L106 The
enumerate(self._pseudo)
part misses our additional pseudo-positioner.Need to refactor to use code that walks through all pseudo-positioners, not just the ones in
_pseudo
, such as:Originally posted by @prjemian in bluesky/hklpy#48 (comment)
The text was updated successfully, but these errors were encountered: