Suggested updates to API reference

I am a prolific user of the Moku Python API, and have probably used every function in the book so far! I just came across a few minor errors in the API reference documentation (apis.liquidinstruments.com) that I’ve accumulated, which could be easily fixed and might help future users:

  • The landing page (https://apis.liquidinstruments.com/reference/) has a textbox stating “This library only supports interactions with Moku:Go and Moku:Pro. To command or control Moku:Lab please visit …” but I believe this is outdated information, with Moku:Labs using the same API as Pro and Go since 3.0.0.

  • laser_lock_box.set_output_limit.low_limit: has a listed default value of “nullptr” which is C++

  • laser_lock_box.set_scan_oscillator: keyword for amplitude of the auxillary oscillator is labelled as “frequency”

  • laser_lock_box.set_filter.order: no allowed values listed, labelled as “required” despite not being set in example code, type “number” should probably be type “integer”. Same issues in digital_filter_box.set_filter.order

  • laser_lock_box:set_monitor:monitor_channel has no list of allowed values.

  • phasemeter:enable_freewheeling: request additional information on function. Not clear from the instrument documentation.

  • phasemeter:get_data is the entire function deprecated, or just the two listed parameters? Unclear.

  • phasemeter:set_pm_loop:bandwidth, type listed as “number”, should be “string”; “units” unnecessary

In addition, I’m suddenly unable to set the slow control PID controller using “set_pid_by_frequency” function of the laser_lock_box: every attempt returns “Invalid Method” error despite having worked in this exact form a few weeks ago.

Cheers, and thanks for all the updates and improvements!

Hi Todd,

Thank you for your attentive API documentation fixes, I’ll update these in the API Reference. These changes will come out alongside a more significant update of the API Reference documentation, so you’ll probably see these published in the next month or so.

Thanks again,
Indira

1 Like

Hey @todd,

I’ve found a work around for the set_pid_by_frequency issue that you can use to set the slow controller. You can set the slow controller in the Laser Lock Box using the App and then use persist_state when connecting to the device over the API to keep the slow controller settings that you set in the App.

In Python this is i = LaserLockBox('10.1.XXX.XXX', persist_state=True)

Sorry that this isn’t working right now but the dev team is working to fix function at the moment. You can find more information about persist_state here: https://apis.liquidinstruments.com/reference/moku/claim_ownership.html#param-persist_state

I hope this helps,
Indira

1 Like