8.6.8.3. pymodaq_gui.utils.app_worker module

class pymodaq_gui.utils.app_worker.ExtensionWorker(app, parent=None)[source]

Bases: QObject

Attributes:
h5_manager

Convenience property

is_running
module_and_data_saver

Convenience property

modules_manager

Convenience property

processor_worker
settings

Methods

terminate_workers()

Will terminate/close/stops a few things when the worker is done working

pause

start

stop

update_worker_ntask

workers_terminated

pause(do_pause=True)[source]
start()[source]
stop(msg=None)[source]
terminate_workers()[source]

Will terminate/close/stops a few things when the worker is done working

update_worker_ntask(worker_name, n_saved)[source]
property h5_manager: H5Manager

Convenience property

has_data_processor = False
property is_running: bool
property module_and_data_saver: DataToExportSaver | DataToExportExtendedSaver | DataToExportEnlargeableSaver | DataToExportTimedSaver

Convenience property

property modules_manager: ModulesManager

Convenience property

n_tasks: dict[str, int]
property processor_worker: ProcessorWorker
saver_worker: SaverWorker
property settings: Parameter
staticMetaObject = PySide6.QtCore.QMetaObject("ExtensionWorker" inherits "QObject": Methods:   #4 type=Signal, signature=_workers_done()   #5 type=Signal, signature=workers_terminated()   #6 type=Slot, signature=update_worker_ntask(QString,int), parameters=QString, int )
workers_terminated
class pymodaq_gui.utils.app_worker.ProcessorWorker(h5saver, parent=None)[source]

Bases: ThreadWorker

Methods

do_process_data(info)

To be reimplemented to process data before reemission using processed_data_signal

do_process_data(info)[source]

To be reimplemented to process data before reemission using processed_data_signal

name = 'ProcessorWorker'
params = [{'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'}]
staticMetaObject = PySide6.QtCore.QMetaObject("ProcessorWorker" inherits "ThreadWorker": )
worker_setting_name: str = 'processor_worker'
class pymodaq_gui.utils.app_worker.SaverWorker(saver, parent=None)[source]

Bases: ThreadWorker

Worker in separated thread receiving the data ad DataBundle and adding them into the extended or enlargeable arrays within a H5file using one of the ExtensionSaver module saver

Note

The type of the saver is only hinted with the DataToExport savers (SaverTypes) the worker relies on. It can also be an object of a higher level, such as the extension savers of pymodaq (ScanSaver, LoggerSaver, OptimizerSaver…), as long as it provides the same saving interface.

Methods

add_nav_axes(axes)

Particular case of the ScanSaver where the Navigations axes are the same for all nodes and can therefore be added beforehand

nav_axes_signal

save_data

add_nav_axes(axes)[source]

Particular case of the ScanSaver where the Navigations axes are the same for all nodes and can therefore be added beforehand

save_data(data)[source]
name = 'SaverWorker'
nav_axes_signal
params = [{'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'}]
saver: DataToExportSaver | DataToExportExtendedSaver | DataToExportEnlargeableSaver | DataToExportTimedSaver
staticMetaObject = PySide6.QtCore.QMetaObject("SaverWorker" inherits "ThreadWorker": Methods:   #8 type=Signal, signature=nav_axes_signal(QVariantList), parameters=QVariantList   #9 type=Slot, signature=save_data(PyObject), parameters=PyObject   #10 type=Slot, signature=add_nav_axes(QVariantList), parameters=QVariantList )
worker_setting_name: str = 'saver_worker'