API Reference

class runviewer.__main__.ColourDelegate(view, *args, **kwargs)[source]

Bases: QItemDelegate

createEditor(self, parent: QWidget | None, option: QStyleOptionViewItem, index: QModelIndex) QWidget | None[source]
get_next_colour()[source]
setEditorData(self, editor: QWidget | None, index: QModelIndex)[source]
setModelData(self, editor: QWidget | None, model: QAbstractItemModel | None, index: QModelIndex)[source]
updateEditorGeometry(self, editor: QWidget | None, option: QStyleOptionViewItem, index: QModelIndex)[source]
class runviewer.__main__.RunViewer(exp_config)[source]

Bases: object

add_shutter_markers(shot, channel, shutters_checked)[source]
channel_checked_and_enabled(channel)[source]
create_plot(channel, ticked_shots)[source]
get_selected_shots_and_colours()[source]
load_shot(filepath)[source]
mouseMovedEvent(position, ui, name)[source]
on_add_shot()[source]
on_load_channel_config()[source]
on_remove_shots(confirm=True)[source]
on_save_channel_config()[source]
on_shot_selection_changed(item)[source]
on_toggle_shutter(checked, current_shot)[source]
on_x_axis_reset()[source]
on_x_range_changed(*args)[source]
on_y_axes_reset()[source]
resample(data_x, data_y, xmin, xmax, stop_time, num_pixels)[source]

This is a function for downsampling the data before plotting it. Unlike using nearest neighbour interpolation, this method preserves the features of the plot. It chooses what value to use based on what values within a region are most different from the values it’s already chosen. This way, spikes of a short duration won’t just be skipped over as they would with any sort of interpolation.

update_channels_treeview()[source]
update_plot_positions()[source]
update_plots()[source]
update_ticks_of_selected_shots(state)[source]
class runviewer.__main__.RunviewerServer(*args, **kwargs)[source]

Bases: ZMQServer

handler(h5_filepath)[source]
class runviewer.__main__.ScaleHandler(input_times, target_positions, stop_time)[source]

Bases: object

class runviewer.__main__.Shot(path)[source]

Bases: object

add_shutter_times(shutters)[source]
add_trace(name, trace, parent_device_name, connection)[source]
property channels
clear_cache()[source]
delete_cache()[source]
property markers
scaled_times(channel)[source]
property shutter_times
property traces
class runviewer.__main__.TempShot(i)[source]

Bases: Shot

property channels
get_traces()[source]
runviewer.__main__.format_time(input_sec)[source]
runviewer.__main__.int_to_enum(enum_list, value)[source]

stupid hack to work around the fact that PySide screws with the type of a variable when it goes into a model. Enums are converted to ints, which then can’t be interpreted by QColor correctly (for example) unfortunately Qt doesn’t provide a python list structure of enums, so you have to build the list yourself.