Open rsbrost opened 1 month ago
If not plotting simply use expt.run() instead of try: except keyboardinterrupt: statements. Ensure that this does kill the experiment, and document this better to help users understand how to stop their experiments mid run. This is important for experimenters to feel safe running their experiments and to know that their instruments will be protected.
I would consider using the kill switch function I created on the kill-switch branch instead since I think this may have a few advantages, although the tradeoffs must be weighed before settling on a solution.
A potential disadvantage of this could be that if defined as a single key the experiment could be inadvertently stopped by unrelated keyboard use (I haven't tested implementing hotkey combinations, though it seems like a straightforward way of mitigating this).
The advantages of using the kill switch I made are that:
Example of an experiment set up and stopped using custom pyscan kill-switch:![Image](https://github.com/sandialabs/pyscan/assets/151087253/69f02688-8bc7-47f9-a7d6-228ec128ad94)
Both solutions work more or less in the same way, but with different tradeoffs.