reborn.viewers package¶
Subpackages¶
- reborn.viewers.mplviews package
- reborn.viewers.qtviews package
- Subpackages
- reborn.viewers.qtviews.padview_widgets package
- Submodules
- reborn.viewers.qtviews.padview_widgets.display_editor module
Widget
Widget.fix_current_levels
Widget.upper_fixed_checkbox_action
Widget.upper_fixed_spinbox_action
Widget.upper_percentile_checkbox_action
Widget.upper_percentile_spinbox_action
Widget.lower_fixed_checkbox_action
Widget.lower_fixed_spinbox_action
Widget.lower_percentile_checkbox_action
Widget.lower_percentile_spinbox_action
Widget.mirror_checkbox_action
Widget.ignore_masked_checkbox_action
- reborn.viewers.qtviews.padview_widgets.display_options module
- reborn.viewers.qtviews.padview_widgets.edit_beam module
- reborn.viewers.qtviews.padview_widgets.edit_geometry module
- reborn.viewers.qtviews.padview_widgets.frame_navigator module
- reborn.viewers.qtviews.padview_widgets.mask_editor module
- reborn.viewers.qtviews.padview_widgets.misc module
- reborn.viewers.qtviews.padview_widgets.ring_editor module
- reborn.viewers.qtviews.padview_widgets.run_stats module
- reborn.viewers.qtviews.padview_widgets.swaxs_simulator module
- Module contents
- reborn.viewers.qtviews.padview_widgets package
- Submodules
- reborn.viewers.qtviews.padviews module
PADViewMainWindow
PADView
PADView.show_histogram
PADView.downsample_function
PADView.hold_pad_geometry
PADView.hold_beam
PADView.hold_mask
PADView.hold_levels
PADView.skip_empty_frames
PADView.sig_geometry_changed
PADView.sig_beam_changed
PADView.sig_dataframe_changed
PADView.debug
PADView.get_pad_geometry
PADView.set_pad_geometry
PADView.get_dataframe
PADView.set_dataframe
PADView.get_beam
PADView.set_beam
PADView.get_mask
PADView.set_mask
PADView.get_pad_display_data
PADView.set_pad_display_data
PADView.set_title
PADView.set_shortcut
PADView.set_colormap
PADView.get_levels
PADView.set_levels
PADView.add_rectangle_roi
PADView.add_circle_roi
PADView.show_rois
PADView.hide_rois
PADView.toggle_rois
PADView.show_coordinate_axes
PADView.hide_coordinate_axes
PADView.toggle_coordinate_axes
PADView.show_fast_scan_directions
PADView.hide_fast_scan_directions
PADView.toggle_fast_scan_directions
PADView.show_pad_labels
PADView.hide_pad_labels
PADView.toggle_pad_labels
PADView.show_pad_indices
PADView.hide_pad_indices
PADView.toggle_pad_indices
PADView.choose_mask_color
PADView.get_mask_color
PADView.set_mask_color
PADView.update_masks
PADView.hide_masks
PADView.show_masks
PADView.toggle_masks
PADView.save_masks
PADView.load_masks
PADView.clear_masks
PADView.clear_processed_data
PADView.update_pads
PADView.update_pad_geometry
PADView.update_beam
PADView.update_dataframe
PADView.update_display
PADView.save_pad_geometry
PADView.load_pad_geometry
PADView.save_beam
PADView.load_beam
PADView.vector_to_view_coords
PADView.get_pad_coords_from_view_coords
PADView.get_pad_coords_from_mouse_pos
PADView.get_view_coords_from_mouse_pos
PADView.get_view_bounding_rect
PADView.mouse_moved
PADView.add_ring
PADView.update_rings
PADView.remove_rings
PADView.show_grid
PADView.hide_grid
PADView.toggle_grid
PADView.show_pad_border
PADView.hide_pad_border
PADView.show_pad_borders
PADView.hide_pad_borders
PADView.show_history_next
PADView.show_history_previous
PADView.show_next_frame
PADView.show_previous_frame
PADView.show_random_frame
PADView.show_frame
PADView.show_first_frame
PADView.reload_current_frame
PADView.add_plot_item
PADView.add_scatter_plot
PADView.remove_scatter_plots
PADView.load_pickled_dataframe
PADView.save_pickled_dataframe
PADView.load_npy_file
PADView.save_npy_file
PADView.open_data_file_dialog
PADView.save_data_file_dialog
PADView.vector_coords_to_2d_display_coords
PADView.panel_scatter_plot
PADView.display_editor_widget
PADView.mask_editor_widget
PADView.frame_navigator_widget
PADView.ring_editor_widget
PADView.runstats_widget
PADView.display_options_widget
PADView.edit_geometry_widget
PADView.swaxs_simulator_widget
PADView.beam_editor_widget
PADView.import_plugin_module
PADView.run_plugin
PADView.start
PADView.stop
PADView.show
PADView.save_screenshot_dialog
PADView.save_screenshot
PADView.save_file_dialog
PADView.tic
PADView.toc
PADView.histogram_widget
view_pad_data
DummyFrameGetter
show_and_raise
- reborn.viewers.qtviews.qtviews module
- Module contents
- Subpackages
Submodules¶
reborn.viewers.pandaviews module¶
Modified by R.A. Kirian from original source: https://gist.github.com/jsexauer/f2bb0cc876828b54f2ed
Quick and Dirty Qt app to view pandas DataFrames. Includes sorting, filtering, and plotting.
Based on qtpandas in pandas sandbox module, by Jev Kuznetsov
- class reborn.viewers.pandaviews.WidgetedCell(widget)[source]¶
Bases:
object
Set as the value of an element in a pandas DataFrame to create a widget You may also want your widget to implement the getWidgetedCellState and setWidgetedCellState methods so that interactions with the controls persist.
Create a widget in the DataFrameWidget cell
- Parameters:
widget (subclass of QWidget) – Widget to display in cell. The constructor of widget must accept only
argument (one)
inside. (the parent widget to build widget)
- class reborn.viewers.pandaviews.DataFrameModel[source]¶
Bases:
QAbstractTableModel
data model for a DataFrame class
- RawDataRole = 64¶
- RawIndexRole = 65¶
- property df¶
- beginDynamicFilter()[source]¶
Effects of using the “filter” function will not become permanent until endDynamicFilter called
- headerData(self, section: int, orientation: Qt.Orientation, role: int = Qt.ItemDataRole.DisplayRole) Any [source]¶
- class reborn.viewers.pandaviews.DataFrameSortFilterProxyModel[source]¶
Bases:
QSortFilterProxyModel
- setFilterString(needle)[source]¶
Filter DataFrame using df[col].str.contains(needle). Case insensitive.
- setFilterFunction(func)[source]¶
Filter DataFrame using df[col].apply(func). Func should return True or False
- property df¶
- class reborn.viewers.pandaviews.DynamicFilterLineEdit(*args, **kwargs)[source]¶
Bases:
QLineEdit
Filter textbox for a DataFrameTable
- bind_dataframewidget(host, col_ix)[source]¶
Bind this DynamicFilterLineEdit to a DataFrameTable column :param host: Host to filter :type host: DataFrameWidget :param col_ix: Index of column of host to filter :type col_ix: int
- property host¶
- class reborn.viewers.pandaviews.DynamicFilterMenuAction(parent, menu, col_ix)[source]¶
Bases:
QWidgetAction
Filter textbox in column-header right-click menu
Filter textbox in column right-click menu :param parent: Parent who owns the DataFrame to filter :type parent: DataFrameWidget :param menu: Menu object I am located on :type menu: QMenu :param col_ix: Index of column used in pandas DataFrame we are to filter :type col_ix: int
- class reborn.viewers.pandaviews.FilterListMenuWidget(parent, menu, col_ix)[source]¶
Bases:
QWidgetAction
Filter textbox in column-right click menu
Filter textbox in column right-click menu :param parent: Parent who owns the DataFrame to filter :type parent: DataFrameWidget :param menu: Menu object I am located on :type menu: QMenu :param col_ix: Column index used in pandas DataFrame we are to filter :type col_ix: int :param label: Label in popup menu :type label: str
- class reborn.viewers.pandaviews.DataFrameItemDelegate[source]¶
Bases:
QStyledItemDelegate
Implements WidgetedCell
- createEditor(self, parent: Optional[QWidget], option: QStyleOptionViewItem, index: QModelIndex) Optional[QWidget] [source]¶
- class reborn.viewers.pandaviews.DataFrameWidget(parent=None, df=None)[source]¶
Bases:
QTableView
DataFrameTable Create a widget to display a pandas DataFrame.
- Parameters:
parent (QObject) – Parent object (likely window or canvas)
df (pandas DataFrame, optional) – DataFrame to display
- dataFrameChanged¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- cellClicked¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
Create the menu displayed when right-clicking on a cell. Overwrite this method to add custom right-click options
- contextMenuEvent(event)[source]¶
Implements right-clicking on cell.
NOTE: You probably want to overwrite make_cell_context_menu, not this function, when subclassing.
- property df¶