labscript-suite / labscript

The 𝗹𝗮𝗯𝘀𝗰𝗿𝗶𝗽𝘁 library provides a translation from expressive Python code to low-level hardware instructions.
http://labscriptsuite.org
BSD 2-Clause "Simplified" License
9 stars 48 forks source link

Strict timing of shot-submission times #35

Open philipstarkey opened 7 years ago

philipstarkey commented 7 years ago

Original report (archived issue) by Ian B. Spielman (Bitbucket: Ian Spielman, GitHub: ispielma).


For optimal experimental stability it is desired that shots be submitted as periodically as possible. I propose adding a new kwarg to "stop" in labscript so:

stop(t)

becomes

stop(t, shot_interval=20)

this would demand that the execution (not programming) of the next shot in the sequence start as close to 20 s after this one was executed as possible. If not currently present the h5 file will contain attributes marking both the start and completion time of the script along with a boolean reporting if the script was successfully started at the desired shot_interval (this might fail sometimes, owing to novatech programming for example), but we don't want to stop cycling because of this.

zakv commented 3 years ago

It might be reasonable to close this issue now. This has been implemented, though it requires enabling the blacs cycle_time extension in the lab config. The delay can be after programming, as requested above, by setting the optional cycle_time_delay_after_programming argument of stop() to True. I don't think it saves a boolean indicating success/failure of maintaining the desired cycle time though.