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

Allow the set_passed_properties decorator to be used on labscript objects that do not have an entry in the device group #49

Open philipstarkey opened 5 years ago

philipstarkey commented 5 years ago

Original report (archived issue) by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


Currently, the set_passed_properties decorator is not supported for use on things like Output objects because we do not expect to create a device group for things other than devices with a BLACS connection.

Currently I think the behaviour actually forces the creation of device groups if you use the decorator on things like outputs, which is bad because BLACS assumes that every entry in the devices group is a real device it can communicate with via a BLACS_connection (hence why we had to role back a commit a while ago that inadvertently did something like this).

There are various ways to fix this, for example changing the way that BLACS determines which devices are in use. However, I also think that polluting the devices group with an entry per-channel is probably bad. So maybe we should save a special attribute in the device group for the parent, that contains JSON (aka a dictionary) of the properties of child objects like outputs and inputs.

Anyway, mainly I'm logging this so we don't forget about it, not because I need the feature right now or because I have a particular solution in mind.