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 52 forks source link

Store times as integer multiples of the master pseudoclock `clock_resolution` #108

Open philipstarkey opened 9 months ago

philipstarkey commented 9 months ago

As per #99, floating point rounding errors can lead to incorrect compilation errors.

We should really avoid internal floating point storage of time as it just causes us grief. We'll probably need to store the floating point time for error messages (otherwise quantisation of times could lead to confusion when trying to identify the line of code causing the issue), but that's probably not any harder than the rest of the work needed.