OrientationΒΆ
There are two basic use cases for labbench
: packaging low-level code into re-usable python automation objects (writing modules), and using these packaged objects to implement an experimental procedure (writing scripts). The main goal of this section is to build a basic familiarity the recommended workflows for these processes. Further, to help make these accessible to beginning python developers, workflows demonstrate the simplified subset of advanced python concepts.
Typical workflow for packaging low-level automation centers on:
For each specific hardware or software: Writing subclasses of
labbench.Device
(starting from backends likelabbench.VISABackend
orlabbench.ShellBackend
) using descriptor shortcutsTo coordinate multiple snippets of experimental procedures: Writing subclasses of
labbench.Rack
that coordinate devices and racks
The result of these can be accumulated in a re-usable code library.
To implement experimental procedures through python scripts, a typical workflow involves:
Usage of the
labbench.Device
andlabbench.Rack
objects that have already been writtenLooping across experimental conditions
Automated data logging of measurement data and test conditions with objects like
labbench.CSVLogger
orlabbench.SQLiteLogger
A handful of utility functions, such as
labbench.concurrently()
,labbench.show_messages()
When re-usable components of the procedure can be identified, they can be encapsulated back into labbench.Rack
in a library for future use. Otherwise, this process can be mainly procedural, and less focused on writing classes.