sandialabs / pyscan

Scientific Measurement Toolbox
https://pyscan.readthedocs.io/en/latest/
MIT License
4 stars 4 forks source link

Kill switch #162

Closed rsbrost closed 1 month ago

rsbrost commented 1 month ago

I think adding this feature is worth considering. Please take a look at your convenience and let me know what you think.

i-am-mounce commented 1 month ago

Stash this please. Between expt.run() and our try: except: syntax, this doesn't seem to do anything new.

rsbrost commented 1 month ago

Stash this please. Between expt.run() and our try: except: syntax, this doesn't seem to do anything new.

Actually, it is much more straightforward in certain cases. For example, you want to run an experiment without a liveplot - the try: except: syntax is not straightforward because you then have to create a loop in the try statement saying something like: while expt.runinfo.running is True: continue and only then the except statement. I think this is rather convoluted and while yes we could include demos for this I think this feature is worth considering, already built, and would be much more intuitive for experimentalists that are not as strong with coding.

I really don't see the downside to including this so ultimately the final call is yours, just think it would be good to discuss the tradeoffs when we have time.