Aharoni-Lab / miniscope-io

Data formatting, reading, and writing from miniscopes
https://miniscope-io.readthedocs.io
GNU Affero General Public License v3.0
6 stars 2 forks source link

Scalable method for defining device update commands #70

Open t-sasatani opened 2 weeks ago

t-sasatani commented 2 weeks ago

https://github.com/Aharoni-Lab/miniscope-io/pull/48 added downlink commands, but the command set is still hard-coded and complicated to expand. We should unify the command set (related: https://github.com/Aharoni-Lab/miniscope-io/pull/48#discussion_r1830337498), or maybe feed them using the device config. Using device config might be better because the available peripherals and bounds of the values vary between devices, which seems relatively easy to handle with a nested YAML file.

sneakers-the-rat commented 2 weeks ago

Agreed. This is part of the API refactor (which im realizing I should have done separately from the pipelining system, but so it goes) - each device will have a configure method that takes an instance of that device's DeviceConfig. So we will want to do a few things to make that possible, also described in other issues

Then we can also have cli for setting specific options like mio configure MyDevice fps=30 or whatever that both sets the value on the device and sets it in the config file so they stay sync'd