8.5.2.1. pymodaq_gui.h5modules.browsing module

Created the 15/11/2022

@author: Sebastien Weber

class pymodaq_gui.h5modules.browsing.H5Browser(parent, h5file=None, h5file_path=None, backend='tables')[source]

Bases: QObject, ActionManager

UI used to explore h5 files, plot and export subdatas

Parameters:
  • parent (QMainWindow) – either a QWidget or a QMainWindow

  • h5file (h5file instance) – exact type depends on the backend

  • h5file_path (str or Path) – if specified load the corresponding file, otherwise open a select file dialog

  • backend (str) – either ‘tables, ‘h5py’ or ‘h5pyd’

See also

H5Backend, H5Backend

Methods

add_comments(status[, comment])

Add comments to a node

check_version()

Check version of PyMoDAQ to assert if file is compatible or not with the current version of the Browser

export_data()

Opens a dialog to export data

get_tree_node_path()

Get the node path of the currently selected node in the UI

populate_tree()

setup_actions()

show_h5_data(item[, with_bkg, plot_all])

add_log

connect_things

data_node_signal

get_node_and_plot

load_file

quit_fun

save_file

setup_menu

show_about

show_h5_attributes

show_help

show_log

show_pixmaps

status_signal

static add_log(txt)[source]
static show_help()[source]
static show_log()[source]
add_comments(status, comment='')[source]

Add comments to a node

Parameters:
  • status (bool)

  • comment (str) – The comment to be added in a comment attribute to the current node path

See also

current_node_path

check_version()[source]

Check version of PyMoDAQ to assert if file is compatible or not with the current version of the Browser

connect_things()[source]
export_data()[source]

Opens a dialog to export data

get_node_and_plot(with_bkg, plot_all=False)[source]
get_tree_node_path()[source]

Get the node path of the currently selected node in the UI

load_file(h5file=None, h5file_path=None)[source]
populate_tree()[source]
Init the ui-tree and store data into calling the h5_tree_to_Qtree convertor method

See also

h5tree_to_QTree, update_status

quit_fun()[source]
save_file(filename=None)[source]
setup_actions()[source]
setup_menu()[source]
show_about()[source]
show_h5_attributes(item=None)[source]
show_h5_data(item, with_bkg=False, plot_all=False)[source]
Parameters:
  • item

  • with_bkg

  • plot_all

show_pixmaps(pixmaps=[])[source]
class pymodaq_gui.h5modules.browsing.View(widget, settings_tree, settings_attributes_tree)[source]

Bases: QObject

Attributes:
pixmap_widget
text_list
viewer_widget

Methods

add_actions

add_base_item

add_widget_to_tree

clear

current_node_path

item_clicked_sig

item_double_clicked_sig

setup_ui

add_actions(actions)[source]
add_base_item(base_tree_item)[source]
add_widget_to_tree(pixmap_items)[source]
clear()[source]
current_node_path()[source]
setup_ui(settings_tree, settings_attributes_tree)[source]
h5file_tree: TreeLayout
property pixmap_widget
property text_list
property viewer_widget
pymodaq_gui.h5modules.browsing.browse_data(fname=None, ret_all=False, message=None)[source]

Browse data present in any h5 file using the H5Browser within a dialog window when the user has selected a given node, return its content

Parameters:
Return type:

Tuple[DataWithAxes, str, str]

Returns:

  • data (DataWithAxes)

  • if argument ret_all is True, returns also

  • fname (the file name)

  • node_path (hte path of the selected node within the H5 file tree)