Package: typhos
TyphosAutomated User Interface Creation from Ophyd DevicesEPICS is a flexible and powerful controls system that gives access to experimental
information, however, the relation and meaning of process variables is often
obscure. Many of the user interfaces for EPICS information reflect this, as
walls of buttons and flashing lights bombard the user with little thought to
structure or cohesion.Typhos addresses this by providing an automated way to generate screens based
on a provided hierarchy of devices and signals. Built using PyDM, a PyQt based
display manager developed at SLAC National Laboratory, Typhos utilizes a large
toolkit of widgets to display EPICS information. For each process variable, a
corresponding widget is created based on; the importance to the average
operator, the type of value the EPICS PV will return, and whether a user should
be allowed to write to the variable. These widgets are then placed in a
convenient tab-based system to only show the necessary information for basic
function, but still allow access to more advanced signals.Instead of reinventing a new way to specify device structures, Typhos usesOphyd, a library to abstract EPICS information into consistently structured
Python objects. Originally built for scripting experimental procedures at
NSLSII, Ophyd represents devices as combinations of components which are
either signals or nested devices. Then, either at runtime or by using the
defaults of the representative Python class, these signals are sorted into
different categories based on their relevance to operators. Typhos uses this
information to craft user interfaces.InstallationRecommended installation on Linux:conda install typhos -c conda-forge -c pcds-tagAll-tagchannels have-devcounterparts for bleeding edge installations.
Bothrequirements.txtand optionaldev-requirements.txtare kept up to date
as well for those who prefer installation viapiptyphos utilizes PyDM's designer widget entrypoints.  This means that if you
have PyDM working correctly with the Qt Designer, typhos widgets will also be
available.  No further customization or environment settings are required.happiis an optional dependency but is recommended. This must be installed
manually if not using the CONDA recipe.Qt InstallationThere have been some observed inconsistencies between installations ofQtavailable onpip,defaultsandconda-forge. It is recommended that if you
want to use the fulltyphosfeature to install viaconda-forge. We have
found this the most reliable, especially when it comes to using theQtDesigner. It is worth noting that since this library usesqtpyas an
interface layer to the various options for Qt Python bindings, the bare
requirements will not install a specific one for you. The testing suite runs
usingPyQt5.Getting StartedCreating your firsttyphospanel for anophyd.Deviceonly takes two
lines:importsysfromophyd.simimportmotorfromqtpy.QtWidgetsimportQApplicationimporttyphos# Create our applicationapp=QApplication.instance()orQApplication(sys.argv)typhos.use_stylesheet()# Optionalsuite=typhos.TyphosSuite.from_device(motor)# Launchsuite.show()app.exec_()Available WidgetsTyphos has three major building blocks that combine into the final display seen
by the operator:TyphosSuite: The overall view for a Typhos window. It allows the
operator to view all of the loaded components and toolsTyphosDeviceDisplay: This is the widget created for a standardophyd.Device. Signals are organized based on theirKindand description.typhos.tools: These are widgets that interface with external
applications. While you may have other GUIs for these systems,typhos.toolsare built especially to handle the handshaking between all the
information stored on your device and the tool you are interfacing with. This
saves your operator clicks and ensures consistency in use.Initialization PatternAll three of the widgets listed above share a similar API for creation.
Instantiating the object by itself handles loading the container widgets and
placing them in the correct place, but these do not acceptophyd.Devicearguments. The reason for this is to ensure that we can use all of thetyphosscreens as templates, and regardless or not of whether you have anophyd.Deviceyou can always populate the screens by hand. If you do in fact
have anophyd.Deviceevery class has anadd_devicemethod and
alternatively and be constructed using thefrom_deviceclassmethod.Related ProjectsPyDM- PyQT Display Manager for EPICS informationOphyd- Device abstraction for Experimental Control