gui.calibration.charts — Visualizes the calibration data

This module contains the ChartHandler class, which manages a set of Chart widgtes that visualize the measurements taken during the calibration procedure and the and the estimation functions that are its result.

The class provides three charts:

Clients need not actually deal with the ChartHandler itself; instead, they can use the createCharts() function, which creates the handler and returns the Chart widgtes. The charts will be automatically updated when the calibration data of the ProductionSystem passed to the function changes.

gui.calibration.charts.createCharts(system)
Creates a ChartHandler and returns its Chart widgets as a tuple (measurementsChart, temperatureChart, currentChart). system is the ProductionSystem whose calibration measurement are to be visualized.

The ChartHandler Class

class gui.calibration.charts.ChartHandler(system)
Creates a new instance of this class, which visualizes the calibration data of the given ProductionSystem.
ChartHandler.measurementsChart
The Chart object that displays the measurements chart. Immutable.
ChartHandler.temperatureChart
The Chart object that displays the temperature chart. Immutable.
ChartHandler.currentChart
The Chart object that displays the current chart. Immutable.

Constants

gui.calibration.charts.MIN_CAPTION_LINES

The minimum number of lines worth of space the charts reserve for their caption. If a captions uses fewer lines, it still receives the amount of vertical space that would be used by that number of lines, so that the charts are visually congruent. If a caption uses more lines, it receives as much space as required.

The value can be set during localization by using a message string that can be parsed as an integer for the message id {{MIN_CAPTION_LINES}}.

gui.calibration.charts.CHART_SIZE
The minimum size of the charts in pixels, as a tuple (width, height).
gui.calibration.charts.DIMENSION_LABEL_TEXTS
A tuple that lists the text of the dimension labels for heating current, heating temperature, and temperature sensor voltage. Strings of the form 'numerator / denominator' are displayed as a proper fraction. Pango Markup Language tags are supported.
gui.calibration.charts.COLORS

A tuple that lists the colors used for the graphs that show heating current, heating temperature, and temperature sensor voltage, as X11 color names (e.g. 'blanched almond') or hexadecimal strings (e.g. '#FFEBCD').

If these colors are changed, the captions need to be adjusted as well.

Captions

gui.calibration.charts.MEASUREMENTS_CHART_CAPTION
The caption used for the measurements chart if the estimation function has been fitted.
gui.calibration.charts.MEASUREMENTS_CHART_POINTS_ONLY_CAPTION
The caption used for the measurements chart if the estimation function has not been fitted.
gui.calibration.charts.TEMPERATURE_CHART_CAPTION
The caption used for the temperature chart if the estimation function has been fitted.
gui.calibration.charts.TEMPERATURE_CHART_POINTS_ONLY_CAPTION
The caption used for the temperature chart if the estimation function has not been fitted.
gui.calibration.charts.CURRENT_CHART_CAPTION
The caption used for the current chart if the estimation function has been fitted.
gui.calibration.charts.CURRENT_CHART_POINTS_ONLY_CAPTION
The caption used for the current chart if the estimation function has not been fitted.