Allow direct control of sample rate and data length for Oscilloscope in SDK

If targeting a certain sample rate, using the set_timebase() function is cumbersome. It feels like a guessing game to try to figure out which sample rate the function will select.

Furthermore, behavior with the “max_length” parameter is non-intuitive. The documentation states that the returned data will have “as close to this many points as possible”. Testing on a Moku:Go, it seems like the data length is only around 80% of the max_length.

Hello @MattBahr ,

Thank you for reaching out to Liquid Instruments! For selecting a sample rate, I would recommend to use the app to find the timebase that corresponds to your sample rate first, and then set that particular timebase in the API. This will prevent you from having to guess which timebase corresponds to which sample rate. Thank you for the suggestions!

-Dylan