We're now in a position where we can create a top level flyscan_xray_centre_plan which calls parts from panda_flyscan_xray_centre_plan and zebra_flyscan_xray_centre_plan, depending on the use_panda parameter. This will be a lot cleaner and remove quite a bit of duplicated code.
Differences between panda and zebra scans:
They use different tidy-up-plans
Panda scan does a check on the smargon velocity (although there was some debate as to whether this check is in the right place)
Different FGS params
Panda scan does an extra device set up (for the panda)
Panda scan creates its directory just before setup
The best way to do this:
panda_flyscan_xray_centre_plan and zebra_flyscan_xray_centre_plan should contain small functions for the bits that differ, eg they both have a setup_devices_for_gridscan, and tidy_up_devices which do different things. Then, the top level plan can have a single check at the beginning to see which type of gridscan it's doing, and then import the functions from the correct place.
Acceptance Criteria
panda_flyscan_xray_centre_plan and zebra_flyscan_xray_centre_plan reduced to a few functions which differentiate them
Top level plan created, and only needs to do one check to see whether it's doing the panda or zebra version
We're now in a position where we can create a top level
flyscan_xray_centre_plan
which calls parts frompanda_flyscan_xray_centre_plan
andzebra_flyscan_xray_centre_plan
, depending on theuse_panda
parameter. This will be a lot cleaner and remove quite a bit of duplicated code.Differences between panda and zebra scans:
The best way to do this:
panda_flyscan_xray_centre_plan
andzebra_flyscan_xray_centre_plan
should contain small functions for the bits that differ, eg they both have asetup_devices_for_gridscan
, andtidy_up_devices
which do different things. Then, the top level plan can have a single check at the beginning to see which type of gridscan it's doing, and then import the functions from the correct place.Acceptance Criteria
panda_flyscan_xray_centre_plan
andzebra_flyscan_xray_centre_plan
reduced to a few functions which differentiate them