You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can be done using the reset_positions_wrapper in bluesky.preprocessors, or the equivalent reset_positions_decorator.
Quick example:
from bluesky.preprocessors import reset_positions_decorator
@reset_positions_decorator
def my_scan(*args, **kwargs):
yield from some_plan()
In this way we can apply this to any plan that wants this. At LCLS I suspect this is desired on most scans, the only exception being if the pre-scan positions are further from the first point than the end positions...
I would say half the scans we would like to return to original position, and another half we actually would want to go to the peak (being it a fitting position or simply the maximum). The 'maximum' option probably need some sanity check for 'noisy' scans, if no clear peak is present, can be a query at the end of the scan.
This is something that can be done. Bluesky has hooks for soliciting user input, and we can cache all points from the scan and use the peak as the end of scan goal position. We need some way to determine the user's desired end of scan behavior, but we can probably bake this in as a standard scan arg.
Feature Request
Devices scanned should return to their start position.
Existing Alternatives
Have to add this step by hand.
Context
This was the behavior in old python. I also believe this is the intended behavior here, but it's not what the code does.
The text was updated successfully, but these errors were encountered: