labscript-suite-temp / labscript

The labscript Python library provides a translation from simple Python code to complex hardware instructions. The library is used to construct a "connection table" containing information about what hardware is being used and how it is interconnected. Devices described in this connection table can then have their outputs set by using a range of functions, including arbitrary ramps.
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Round-off error in ramps tries to make devices go beyond their limits #16

Open philipstarkey opened 9 years ago

philipstarkey commented 9 years ago

Original report (archived issue) by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).


When trying to ramp a DDS to zero amplitude (in this case using an exponential ramp), I often find that the compilation fails saying that the device cannot accept values between 0 and 1. My current workaround for this is to change the final value of the ramp to be a small non-zero number below the quantisation limit of the device so that it will be rounded to zero anyway. There must be some rounding issues involved in the evaluation of ramp functions. The error message does not tell me what value it is tying to program, but I suspect that it will be an extremely small negative number.