ReferenceWindow¶
- class sofia_redux.visualization.display.reference_window.ReferenceWindow(parent: Any)[source]¶
Bases:
QDialog,Ui_DialogGUI framework for displaying spectral reference lines.
Creates a
Reference Datawindow for user interaction. It includes the following buttons:Load List: allows loading reference data files, one at a time.
Clear Lists: removes all loaded files as well lines and labels from plots.
Each loaded file can be examined by double-clicking on its listing in the display window.
There are also two check boxes to control display preferences:
Show labels: shows or hides text labels for the lines
Show lines: shows or hides lines and any associated labels
- Attributes:
- signals: sofia_redux.visualization.signals.Signals
Custom signals recognized by the Eye interface, used to trigger callbacks from user events.
- ref_models: reference_model.ReferenceData
The line list data.
- visibility: dict
Keys are
ref_lineandref_label. Values are boolean flags matching the current visibility of lines and labels, respectively.- textview: sofia_redux.visualization.display.text_view.TextView
Text viewer widget.
Methods Summary
Remove all lines and labels from display.
Reset the status bar.
Establish connections to callbacks.
Load reference lines from a file.
set_status(message)Set a status message.
show_text(item)Show the text of the loaded reference data file.
toggle_visibility(target)Toggle the visibility for lines or labels.
Methods Documentation
- connections()[source]¶
Establish connections to callbacks.
The buttons connect to
load_linesandclear_lists. The checkboxes connect totoggle_visibility. Items in the file list connect toshow_text.
- load_lines() bool[source]¶
Load reference lines from a file.
- Returns:
- resultbool
True if the file is successfully read in; otherwise False.