APS-USAXS / usaxs-bluesky-ended-2023

Bluesky instrument for USAXS
0 stars 0 forks source link

refactor detector items OUT of stage_sigs and INTO explicit bps.mv() calls #555

Open prjemian opened 2 years ago

prjemian commented 2 years ago

... I'm starting to form a stronger opinion about staging, that perhaps we use it too much for the way it is implemented. Thinking we could refactor many items out of stage_sigs and into yield from bps.mv() so we control exactly when and how often a PV is written.

When the RE stages an ophyd object, it calls the objects ophyd.stage() method directly, without concern this might take some time to complete. Same for .unstage(). The code is not obvious about how it handles timeouts, either.

Too tricky by half and we keep getting skewered. Let's address the detector staging issues first since they are most prominent.

Second item (with the blackfly camera) is not obvious what happened. Could not take sample image lacks some detail. Looking, next, at the log file for that time.

Originally posted by @prjemian in https://github.com/APS-USAXS/ipython-usaxs/issues/554#issuecomment-1047176945