spc-group / haven

Bluesky tools for beamlines managed by the spectroscopy group
https://haven-spc.readthedocs.io/en/latest/
Other
2 stars 6 forks source link

Calculate fly-scanning parameters in AerotechFlyer device #111

Closed canismarko closed 1 year ago

canismarko commented 1 year ago

Make this method stub do the calculations we need. The docstring includes things that @aps-7bm included in their position class, but we may or may not need those.

I wrote a test for this here that should check the calculations for the output parameters. I think those are the only ones we need to set up the PSO commands, but maybe I missed some.

A note on units

Units will be tricky here since some values are in the engineering units of the motor, and some are encoder pulses. We should strongly consider using a library like pint to handle unit convertions. I set up a property (motor_egu_pint) to get the pint unit for the motor.

See Alan's fly_scan_script.py file for calculations to do: https://anl.app.box.com/file/1255083673376

Also, some useful resources:

canismarko commented 1 year ago

Fixed in b8f7b09d7e7c0eccfff27bc30afe2766182878aa, bbfedcbcc1341dacf1b0c951b62b1eb8b27da3c2