Add prepare, kickoff and complete to ophyd_async.epics.motor.Motor. These will allow a constant velocity flyscan to be conducted, where the start, end and velocity of the constant velocity section are supplied.
prepare
This needs to take the following parameters wrapped in a dataclass:
start: position where the constant velocity section should begin after the run-up
end: position where the constant velocity section should end before the run-down
time: the amount of time to spend in the constant velocity section
We then need to:
Calculate self.velocity = abs(end - start) / time, and check it's less than self.max_velocity
The run-up (and run-down) distance, which is 0.5 * self.acceleration_time * self.velocity
Check run-up and run-down are within self.low_limit_travel : self.high_limit_travel
Move to start minus run-up in the right direction, and wait for it to complete
This should be detailed in the docstring for the Motor object
kickoff
Move to end plus run-down in the right direction
complete
Wait for it to complete
plan
We will not change self.acceleration_time as there is no reliable way to put it back.
This plan will eventually be extended to add the Panda PCOMP flyer too, but for now:
Grab current motor velocity
Prepare motor with start, end, time
Kickoff
Complete
Restore motor velocity
tests
Need to test both positive and negative moves, too high velocities, and run-up out of range of limits
Add
prepare
,kickoff
andcomplete
toophyd_async.epics.motor.Motor
. These will allow a constant velocity flyscan to be conducted, where the start, end and velocity of the constant velocity section are supplied.prepare
This needs to take the following parameters wrapped in a dataclass:
We then need to:
self.velocity = abs(end - start) / time
, and check it's less thanself.max_velocity
0.5 * self.acceleration_time * self.velocity
self.low_limit_travel : self.high_limit_travel
This should be detailed in the docstring for the Motor object
kickoff
Move to end plus run-down in the right direction
complete
Wait for it to complete
plan
We will not change
self.acceleration_time
as there is no reliable way to put it back.This plan will eventually be extended to add the Panda PCOMP flyer too, but for now:
tests
Need to test both positive and negative moves, too high velocities, and run-up out of range of limits