labscript-suite-temp-2 / 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

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 6 years ago

philipstarkey commented 6 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.