Viewer

class sofia_redux.pipeline.viewer.Viewer[source]

Bases: object

Parent class for Redux data viewers.

This class establishes the API for data viewers. The display method, at a minimum, should be overridden by child classes. The display function for this class only logs a message at the DEBUG level.

Attributes:
namestr

Name of the viewer. This value is used to identify the viewer in the reduction classes.

display_datalist of object

Data to display. May contain any object the viewer understands how to display.

parentwidget

May contain a parent widget to embed the viewer in.

embeddedbool

If True, the viewer is build as an embedded widget child of the parent widget. This flag may be used by the GUI interface (see sofia_redux.pipeline.gui.main, for example) to determine how to instantiate the viewer.

Instantiate the viewer.

Methods Summary

close()

Close the viewer.

display()

Display the data.

reset()

Reset the viewer.

start([parent])

Start the viewer.

update(data)

Update the viewer with new data.

Methods Documentation

close()[source]

Close the viewer.

display()[source]

Display the data.

This function only logs the input data. Override it in a subclass to implement custom displays. See sofia_redux.pipeline.qad.qad_viewer for an example.

reset()[source]

Reset the viewer.

start(parent=None)[source]

Start the viewer.

Parameters:
parentwidget, optional

Parent widget for the viewer.

update(data)[source]

Update the viewer with new data.

Data is passed to the display method.

Parameters:
datalist of object or object

Data to display.