This is excellent! Just a couple notes from a quick read....
Under Tenet 3:
name = "CL_calibration_{energy_energy}eV_pd{pin_diode_current2_mean_value}_bpm2{xbpm2_sumX}_bpm3{xbpm3_sumX}_"
@bpp.run_decorator(md={'sample_name': name})
IMO that should be a sample dict not a sample name string with a bunch of content glommed into an underscore-separated bundle.
Under the canonical shape, avoid calling ophyd methods like position and put() directly in a plan. These methods perform I/O directly, rather than emitting a Msg describing what they want the RunEngine to do. Direct ophyd calls break tools that consume the plan to check it without the intent to actually touch hardware.
That is:
incident_angle.put(piezo.th.position)
should be
pos = yield from rd(piezo.th.readback) # I'm guessing about 'readback'
yield from abs_set(incident_angle, pos)
This is excellent! Just a couple notes from a quick read....
Under Tenet 3:
IMO that should be a sample dict not a sample name string with a bunch of content glommed into an underscore-separated bundle.
Under the canonical shape, avoid calling ophyd methods like
positionandput()directly in a plan. These methods perform I/O directly, rather than emitting aMsgdescribing what they want the RunEngine to do. Direct ophyd calls break tools that consume the plan to check it without the intent to actually touch hardware.That is:
should be