MOSVizViewer

class mosviz.viewers.MOSVizViewer(session, parent=None)[source]

Bases: glue.viewers.common.qt.data_viewer.DataViewer

Attributes Summary

LABEL
subtools
tools
window_closed

Methods Summary

add_data(data) Processes data message from the central communication hub.
add_data_for_testing(data) Processes data message from the central communication hub.
add_slit([row, width, length])
add_subset(subset) Processes subset messages from the central communication hub.
closeEvent(event) Clean up the extraneous data components created when opening the MOSViz viewer by overriding the parent class’s close event.
get_comment()
get_flag()
get_slit_dimensions_from_file()
get_slit_units_from_file()
initialize_toolbar() Initialize the custom toolbar for the MOSViz viewer.
layer_view()
load_exposure(index) Loads the level 2 exposure into the 2D spectrum plot widget.
load_selection(row) Processes a row in the MOS catalog by first loading the data set, updating the stored data components, and then rendering the data on the visible MOSViz viewer plots.
load_ui() Setup the MOSView viewer interface.
options_widget()
refresh_comments()
register_to_hub(hub)
render_data(row[, spec1d_data, spec2d_data, …]) Render the updated data sets in the individual plot widgets within the MOSViz viewer.
send_NumericalDataChangedMessage()
set_locked_axes([x, y])
setup_connections() Connects gui elements to event calls.
show(self)
update_comments([pastSelection]) Process comment and flag changes and save to file.
write_comments() Setup save file.

Attributes Documentation

LABEL = 'MOSViz Viewer'
subtools = []
tools = []
window_closed

Methods Documentation

add_data(data)[source]

Processes data message from the central communication hub.

Parameters:
data : glue.core.data.Data

Data object.

add_data_for_testing(data)[source]

Processes data message from the central communication hub.

Parameters:
data : glue.core.data.Data

Data object.

add_slit(row=None, width=None, length=None)[source]
add_subset(subset)[source]

Processes subset messages from the central communication hub.

Parameters:
subset :

Subset object.

closeEvent(event)[source]

Clean up the extraneous data components created when opening the MOSViz viewer by overriding the parent class’s close event.

get_comment()[source]
get_flag()[source]
get_slit_dimensions_from_file()[source]
get_slit_units_from_file()[source]
initialize_toolbar()[source]

Initialize the custom toolbar for the MOSViz viewer.

layer_view()[source]
load_exposure(index)[source]

Loads the level 2 exposure into the 2D spectrum plot widget.

It can also load back the level 3 spectrum.

load_selection(row)[source]

Processes a row in the MOS catalog by first loading the data set, updating the stored data components, and then rendering the data on the visible MOSViz viewer plots.

Parameters:
row : astropy.table.Row

A row object representing a row in the MOS catalog. Each key should be a column name.

load_ui()[source]

Setup the MOSView viewer interface.

options_widget()[source]
refresh_comments()[source]
register_to_hub(hub)[source]
render_data(row, spec1d_data=None, spec2d_data=None, image_data=None, level2_data=None)[source]

Render the updated data sets in the individual plot widgets within the MOSViz viewer.

send_NumericalDataChangedMessage()[source]
set_locked_axes(x=None, y=None)[source]
setup_connections()[source]

Connects gui elements to event calls.

show(self)[source]
update_comments(pastSelection=False)[source]

Process comment and flag changes and save to file.

Parameters:
pastSelection : bool

True when updating past selections. Used when user forgets to save.

write_comments()[source]

Setup save file. Write comments and flags to file