taurus Logo
  • Installation
  • Tutorials
    • Build your first Taurus GUI in Python
    • Plot data with Taurus
    • Build a GUI with TaurusGUI
    • Build a Taurus widget with Qt Designer
  • How-to guides
    • Use Taurus forms
    • Create a basic SVG synoptic
    • Organize models in a TaurusGrid
    • Select models with TaurusModelChooser
    • Edit arrays
    • Use device panels
    • Work with TaurusPlot
    • Work with Taurus trends
    • Display an image attribute
    • Work with TaurusGUI applications
    • Troubleshoot Taurus widgets in Qt Designer
    • Browse Taurus configurations
    • Monitor Taurus logs
    • Inspect a running Taurus GUI
    • Create custom Taurus widgets
    • Work with evaluated models
    • Create a custom Taurus scheme
    • Change the Tango event subscription mode
    • Development guides
      • Contributing to Taurus
      • Writing Taurus documentation
      • Taurus coding guide
      • Qt programming guidelines
      • Releasing Taurus
    • Migration guides
      • Taurus 3.x to Taurus 4.x migration guide
  • Explanation
    • What is Taurus?
    • Models and schemes
    • TaurusForm
    • Plotting with Taurus
    • Trends and 2D trends
    • Displaying images
    • Synoptics
    • The TaurusGUI framework
    • Taurus colors
    • Extending Taurus widgets
    • Tango event subscription modes
  • Reference
    • Python API
      • taurus
        • taurus.cli
        • taurus.console
        • taurus.core
        • taurus.external
        • taurus.qt
        • taurus.tauruscustomsettings
        • Logger
    • User interface widgets
    • Plugins
    • Configuration settings
    • Icons
  • News & releases
    • What's new
    • Changelog
    • Other versions
  • Showcase
    • Taurus applications
    • Taurus Demo
    • Widget gallery
  • Project repository
taurus
  • How-to guides
  • Work with Taurus trends
  • View page source

Work with Taurus trends

This guide covers common tasks specific to TaurusTrend and TaurusTrend2DDialog. For the concepts behind trends, see Trends and 2D trends.

Note

Some details in this page originate from the legacy plotting widgets and may not exactly match the current taurus_pyqtgraph interface.

Launch TaurusTrend as a standalone application

Launch TaurusTrend with:

taurus trend [options] [<model_list>]

Run the following command for more details:

taurus trend --help

The model list is optional and is a space-separated list of models for TaurusTrend. Valid models are scalar or 1D attribute names; 1D attributes are treated as collections of scalars. See the TaurusTrend API for more information about valid models.

Use a fixed X-axis range

When working with trends, you may only want to see the latest values. For example, you may want the last five minutes in timestamp mode or the latest 20 values in event-number mode.

Switch the fixed-range X-scale mode on or off from either:

  • the Use the TaurusPlot context menu, under the Scales submenu;

  • the Configure the plot, under the X axis submenu, where you can choose a suggested value or enter a range.

../_images/taurustrend-fixedRange01.png

Plot a spectrum as separate scalar trends

A 1D attribute can be plotted as a set of independent scalar curves. Add the 1D attribute as a TaurusTrend model in the same way as a scalar model. Each element of the spectrum is then represented by its own curve.

See Trends and 2D trends for the rationale and update behavior of this mode.

Force periodic attribute reads

Some control-system attributes may only send events when their value changes. In a TaurusTrend this can make attributes that change infrequently appear to have been lost.

To force TaurusTrend to periodically re-read the displayed attributes, enable the feature and set its period from the Use the TaurusPlot context menu.

When launching TaurusTrend as a standalone application, the same behavior can be enabled with the -r option.

Warning

Very frequent re-reads may affect both the control system and GUI performance, especially when several attributes are being plotted. Use this feature only when needed.

Trend a Tango State attribute

taurus trend does not directly support Tango State attributes, but an evaluation model can expose their numerical representation. For example:

taurus trend -r 500 'eval:state=int({tango:sys/tg_test/1/state});state'

To trend whether the state is MOVING (enumeration value 6):

taurus trend -r 500 'eval:moving=(int({tango:sys/tg_test/1/state})==6);moving'

The same technique can be applied to other non-numerical attributes.

Launch a 2D trend

Launch TaurusTrend2DDialog as a standalone application with:

taurus trend2d <array_attribute_name>

Run the following command for more details:

taurus trend2d --help

For an explanation of the spectrogram representation, see 2D trends.

Access archived values

Archived-value support is outside the Taurus core. See the taurus-tangoarchiving plugin for the corresponding integration.

Previous Next

© Copyright Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 3.0 License.

Built with Sphinx using a theme provided by Read the Docs.