8.6.2.12. pymodaq_gui.examples.saving_loading module

class pymodaq_gui.examples.saving_loading.DataGenerator(parent=None)[source]

Bases: QObject

Attributes:
refresh_time

Methods

command_signal

data_signal

generate_data

queue_command

start

stop

stopped

generate_data()[source]
Return type:

DataToExport

queue_command(command)[source]
start()[source]
stop()[source]
command_signal
data_signal
property refresh_time: int
staticMetaObject = PySide6.QtCore.QMetaObject("DataGenerator" inherits "QObject": Methods:   #4 type=Signal, signature=data_signal(PyObject), parameters=PyObject   #5 type=Signal, signature=stopped()   #6 type=Signal, signature=command_signal(PyObject), parameters=PyObject   #7 type=Slot, signature=generate_data() )
stopped
class pymodaq_gui.examples.saving_loading.DataProcessor(h5saver, parent=None)[source]

Bases: ProcessorWorker

Methods

do_process_data(info)

Process data here, Be aware that load_all try to load multiple nodes from the h5file but not at the same time (sequentially).

do_process_data(info)[source]

Process data here, Be aware that load_all try to load multiple nodes from the h5file but not at the same time (sequentially). In this multithreaded application, the saving could add data to a node in between the reading. What you expect to be data with same shape/size may not be True!

If you want to avoid that effect, do the reading in the same thread that is saving the data, eventually sending then the loaded dte to this processor

staticMetaObject = PySide6.QtCore.QMetaObject("DataProcessor" inherits "ProcessorWorker": Methods:   #8 type=Slot, signature=do_process_data(PyObject), parameters=PyObject )
class pymodaq_gui.examples.saving_loading.MySaverLoader(parent)[source]

Bases: CustomApp

Attributes:
module_and_data_saver

Methods

connect_things()

Connect actions and/or other widgets signal to methods

do_things_after_ui_setup()

get_app_toolbars()

Get the main toolbars widget to be eventually added in the main window toolbararea

setup_actions()

Method where to create actions to be subclassed.

setup_docks_and_widgets()

Mandatory method to be subclassed to setup the docks layout

setup_menus_and_toolbars([menubar])

Non mandatory method to be subclassed in order to create a menubar

value_changed(param)

Actions to perform when one of the param's value in self.settings is changed from the user interface

connect_things()[source]

Connect actions and/or other widgets signal to methods

do_things_after_ui_setup()[source]
get_app_toolbars()[source]

Get the main toolbars widget to be eventually added in the main window toolbararea

Default is the default toolbar. To be reimplemented if needed

Return type:

list[QToolBar]

setup_actions()[source]

Method where to create actions to be subclassed. Mandatory

See also

ActionManager.add_action

setup_docks_and_widgets()[source]

Mandatory method to be subclassed to setup the docks layout

setup_menus_and_toolbars(menubar=None)[source]

Non mandatory method to be subclassed in order to create a menubar

value_changed(param)[source]

Actions to perform when one of the param’s value in self.settings is changed from the user interface

For instance:

if param.name() == 'do_something':
    if param.value():
        print('Do something')
        self.settings.child('main_settings', 'something_done').setValue(False)
Parameters:

param (Parameter) – the parameter whose value just changed

data_generator: DataGenerator
h5_base_group_name = 'SaverExample'
property module_and_data_saver: DataToExportTimedSaver
params = [{'name': 'refresh_grab', 'siPrefix': False, 'suffix': 'ms', 'title': 'Refresh Grab:', 'type': 'int', 'value': 50}, {'name': 'refresh_plot', 'siPrefix': False, 'suffix': 'ms', 'title': 'Refresh Plot:', 'type': 'int', 'value': 1000}, {'children': [{'name': 'worker_running', 'readonly': True, 'title': 'Worker Running:', 'type': 'led', 'value': False}, {'name': 'worker_tasks', 'readonly': True, 'title': 'Pending save tasks:', 'tooltip': 'Scan points queued to be written but not yet saved to disk. Usually near 0 since saving is normally faster than acquisition; a sustained non-zero value means the saver is falling behind the scan.', 'type': 'int', 'value': 0}], 'name': 'saver_worker', 'title': 'Saver Worker', 'type': 'group'}, {'children': [{'name': 'worker_running', 'readonly': True, 'title': 'Worker Running:', 'type': 'led', 'value': False}, {'name': 'worker_tasks', 'readonly': True, 'title': 'Pending save tasks:', 'tooltip': 'Scan points queued to be written but not yet saved to disk. Usually near 0 since saving is normally faster than acquisition; a sustained non-zero value means the saver is falling behind the scan.', 'type': 'int', 'value': 0}], 'name': 'processor_worker', 'title': 'Processor Worker', 'type': 'group'}]
show_h5file_statusbar_widgets = True
show_workflow_actions = True
staticMetaObject = PySide6.QtCore.QMetaObject("MySaverLoader" inherits "CustomApp": )
viewer: ViewerDispatcher
class pymodaq_gui.examples.saving_loading.MySaverLoaderWorker(app, parent=None)[source]

Bases: ExtensionWorker

Attributes:
app
processor_worker

Methods

process_data

send_data

show_data

process_data()[source]
send_data(dte)[source]
show_data(dte)[source]
property app: MySaverLoader
has_data_processor = True
property processor_worker: DataProcessor
staticMetaObject = PySide6.QtCore.QMetaObject("MySaverLoaderWorker" inherits "ExtensionWorker": )
pymodaq_gui.examples.saving_loading.main()[source]