diff --git a/README.rst b/README.rst index 0ac3522..3292f82 100644 --- a/README.rst +++ b/README.rst @@ -1,99 +1,33 @@ -pymodaq_plugins_template +pymodaq_plugins_waveform ######################## -.. the following must be adapted to your developed package, links to pypi, github description... -.. image:: https://img.shields.io/pypi/v/pymodaq_plugins_template.svg - :target: https://pypi.org/project/pymodaq_plugins_template/ +.. image:: https://img.shields.io/pypi/v/pymodaq_plugins_waveform.svg + :target: https://pypi.org/project/pymodaq_plugins_waveform/ :alt: Latest Version .. image:: https://readthedocs.org/projects/pymodaq/badge/?version=latest :target: https://pymodaq.readthedocs.io/en/stable/?badge=latest :alt: Documentation Status -.. image:: https://github.com/PyMoDAQ/pymodaq_plugins_template/workflows/Upload%20Python%20Package/badge.svg - :target: https://github.com/PyMoDAQ/pymodaq_plugins_template +.. image:: https://github.com/PyMoDAQ/pymodaq_plugins_waveform/workflows/Upload%20Python%20Package/badge.svg + :target: https://github.com/PyMoDAQ/pymodaq_plugins_waveform :alt: Publication Status -.. image:: https://github.com/PyMoDAQ/pymodaq_plugins_template/actions/workflows/Test.yml/badge.svg - :target: https://github.com/PyMoDAQ/pymodaq_plugins_template/actions/workflows/Test.yml +.. image:: https://github.com/PyMoDAQ/pymodaq_plugins_waveform/actions/workflows/Test.yml/badge.svg + :target: https://github.com/PyMoDAQ/pymodaq_plugins_waveform/actions/workflows/Test.yml -Use this template to create a repository on your account and start the development of your own PyMoDAQ plugin! +Design waveforms and send them to the analog outputs and arbitrary waveform generators of the Dashboard. -This branch targets **PyMoDAQ 5.3.x** (Python 3.10 to 3.13). Use the branch matching your PyMoDAQ version. +This package holds the Dashboard extension that builds a waveform from the factory of ``pymodaq_plugins_utils`` +(sine, square, triangle, ramp, pulse, piecewise linear, array...), shows it, and sends it to any actuator whose plugin +follows the waveform output contract of ``pymodaq_plugins_utils.hardware.waveform_output`` (NI-DAQmx analog outputs, +Red Pitaya...). It is under development: nothing is released yet. + +This branch targets **PyMoDAQ 5.3.x** (Python 3.10 to 3.13). Authors ======= -* First Author (myemail@xxx.org) -* Other author (myotheremail@xxx.org) - -.. if needed use this field - - Contributors - ============ - - * First Contributor - * Other Contributors - -.. if needed use this field - - Depending on the plugin type, delete/complete the fields below - - -Instruments -=========== - -Below is the list of instruments included in this plugin - -Actuators -+++++++++ - -* **yyy**: control of yyy actuators -* **xxx**: control of xxx actuators - -Viewer0D -++++++++ - -* **yyy**: control of yyy 0D detector -* **xxx**: control of xxx 0D detector - -Viewer1D -++++++++ - -* **yyy**: control of yyy 1D detector -* **xxx**: control of xxx 1D detector - - -Viewer2D -++++++++ - -* **yyy**: control of yyy 2D detector -* **xxx**: control of xxx 2D detector - - -PID Models -========== - - -Extensions -========== - - -Installation instructions -========================= - -* PyMoDAQ’s version. -* Operating system’s version. -* What manufacturer’s drivers should be installed to make this plugin run? - - -Development -=========== - -* Install your plugin in editable mode: ``pip install -e .`` -* Check it, without any hardware: ``check_plugin`` (and ``pytest``) -* If you use an AI coding assistant, point it to ``AGENTS.md``: it describes the patterns to follow for instrument - plugins, Dashboard extensions (``CustomExt``, whenever instruments are involved) and standalone apps - (``CustomApp``, only if no instruments are needed). +* Sebastien Weber diff --git a/pyproject.toml b/pyproject.toml index 1033006..933e64f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,38 +1,38 @@ [features] # defines the plugin features contained into this plugin -instruments = true # true if plugin contains instrument classes (else false, notice the lowercase for toml files) +instruments = false # true if plugin contains instrument classes (else false, notice the lowercase for toml files) extensions = false # true if plugins contains dashboard extensions models = false # true if plugins contains models of the extensions (PID, optimizers, data mixer, sequencer, ...) h5exporters = false # true if plugin contains custom h5 file exporters scanners = false # true if plugin contains custom scan layout (daq_scan extensions) [urls] -package-url = 'https://github.com/PyMoDAQ/pymodaq_plugins_template' #todo modify url by your plugin url +package-url = 'https://github.com/PyMoDAQ/pymodaq_plugins_waveform' [project] -name = "pymodaq_plugins_template" #todo modify template by your plugin short name -description = 'some word about your plugin' #todo: one sentence naming the instrument(s) and what it does, shown on PyPI +name = "pymodaq_plugins_waveform" +description = 'Design waveforms and send them to the analog outputs and arbitrary generators of the Dashboard' keywords = [ "pymodaq", "plugin", "instrument control", "data acquisition", - #todo: add the instrument, manufacturer and measurement type (camera, stage, spectrometer...) + "waveform", + "analog output", + "arbitrary waveform generator", ] dependencies = [ "pymodaq>=5.3.7", "pymodaq_utils>=5.3.1", "pymodaq_gui>=5.3.0", "pymodaq_data>=5.3.0", - #todo: list here all dependencies your package may have + "pymodaq_plugins_utils", ] authors = [ - {name = "Name Surname", email = "myname@test.fr"}, - #todo: list here all authors of your plugin + {name = "Weber Sebastien"}, ] maintainers = [ - {name = "Name Surname", email = "myname@test.fr"}, - #todo: list here all maintainers of your plugin + {name = "Weber Sebastien"}, ] # nottodo: leave everything below as is! diff --git a/src/pymodaq_plugins_template/app/custom_app_template.py b/src/pymodaq_plugins_template/app/custom_app_template.py deleted file mode 100644 index e29b851..0000000 --- a/src/pymodaq_plugins_template/app/custom_app_template.py +++ /dev/null @@ -1,130 +0,0 @@ -"""Template of a standalone application, for applications that need NO instruments. - -If your application drives instruments (actuators, detectors), write a Dashboard extension (CustomExt, see the -extensions folder) instead: it relies on the Dashboard's stable mechanisms to handle instruments (experiment and -state managers, modules manager...). -""" -from qtpy import QtWidgets - -from pymodaq_gui import utils as gutils -from pymodaq_utils.config import GlobalConfig -from pymodaq_utils.logger import set_logger, get_module_name - -logger = set_logger(get_module_name(__file__)) - -# all the configurations (PyMoDAQ's packages and the one of your plugin package) are read from GlobalConfig, for -# instance: config('gui', 'style', 'theme') -config = GlobalConfig() - - -# todo: modify the name of this class to reflect its application and change the name in the main -# method at the end of the script -class CustomAppTemplate(gutils.CustomApp): - - # todo: if you wish to create custom Parameter and corresponding widgets. These will be - # automatically added as children of self.settings. Morevover, the self.settings_tree will - # render the widgets in a Qtree. If you wish to see it in your app, add is into a Dock - params = [] - - def __init__(self, parent: gutils.DockArea): - super().__init__(parent) - - self.setup_ui() # calls, in this order: setup_docks_and_widgets, setup_menus_and_toolbars, - # setup_actions, connect_things and do_things_after_ui_setup - - def setup_docks_and_widgets(self): - """Method to be subclassed to setup the docks layout - - Examples - -------- - >>>self.docks['ADock'] = gutils.Dock('ADock name') - >>>self.dockarea.addDock(self.docks['ADock']) - >>>self.docks['AnotherDock'] = gutils.Dock('AnotherDock name') - >>>self.dockarea.addDock(self.docks['AnotherDock'''], 'bottom', self.docks['ADock']) - - See Also - -------- - pyqtgraph.dockarea.Dock - """ - # todo: create docks and add them here to hold your widgets. Here the settings tree in a dock - self.docks['settings'] = gutils.Dock('Settings') - self.dockarea.addDock(self.docks['settings']) - self.docks['settings'].addWidget(self.settings_tree) - - def setup_menus_and_toolbars(self, menubar: QtWidgets.QMenuBar = None): - """Non mandatory method to be subclassed in order to create menus and toolbars - - It is called before setup_actions: only create the (empty) menus and toolbars here, the actions are created - afterwards in setup_actions where they can be put in them, for instance: - - Examples - -------- - >>> self.add_menu('file', 'File', parent_menu=menubar) # here - >>> self.add_toolbar('main', 'Main toolbar', self.mainwindow) # here - >>> self.add_action('save', 'Save', 'SaveAs', "Save current data", menu='file', toolbar='main') # in setup_actions - - See Also - -------- - pymodaq_gui.managers.action_manager.ActionManager - """ - # todo create the menus and toolbars of your app here (they will be populated by the actions of setup_actions) - pass - - def setup_actions(self): - """Method where to create actions to be subclassed - - Examples - -------- - >>> self.add_action('quit', 'Quit', 'close2', "Quit program") - >>> self.add_action('grab', 'Grab', 'camera', "Grab from camera", checkable=True) - >>> self.add_action('load', 'Load', 'Open', "Load target file (.h5, .png, .jpg) or data from camera" - , checkable=False) - >>> self.add_action('save', 'Save', 'SaveAs', "Save current data", checkable=False) - - See Also - -------- - ActionManager.add_action - """ - # todo: replace this example action by yours - self.add_action('say_hello', 'Say hello', 'add_circle', tip='Show a message in the status bar') - - def connect_things(self): - """Connect actions and/or other widgets signal to methods""" - # todo: replace this example by your connections - self.connect_action('say_hello', lambda: self.update_status('Hello')) - - def value_changed(self, param): - """ 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 - """ - pass - - -def main(): - from pymodaq_gui.qt_utils import mkQApp - app = mkQApp('CustomApp') - - mainwindow = QtWidgets.QMainWindow() - dockarea = gutils.DockArea() - mainwindow.setCentralWidget(dockarea) - - # todo: change the name here to be the same as your app class - prog = CustomAppTemplate(dockarea) - - mainwindow.show() - - app.exec() - - -if __name__ == '__main__': - main() diff --git a/src/pymodaq_plugins_template/daq_move_plugins/daq_move_Template.py b/src/pymodaq_plugins_template/daq_move_plugins/daq_move_Template.py deleted file mode 100644 index 34777b5..0000000 --- a/src/pymodaq_plugins_template/daq_move_plugins/daq_move_Template.py +++ /dev/null @@ -1,231 +0,0 @@ - -from typing import Union, List, Dict -from pymodaq.control_modules.move_utility_classes import (DAQ_Move_base, comon_parameters_fun, - main, DataActuatorType, DataActuator) -from pymodaq.control_modules.daq_move_ui.utils import UiType - -from pymodaq_utils.utils import ThreadCommand # object used to send info back to the main thread -from pymodaq_gui.parameter import Parameter - -# TODO: -# Replace the following fake import with the import of the real Python wrapper of your instrument. Here we suppose that -# the wrapper is in the hardware directory, but it could come from an external librairy like pylablib or pymeasure. -from pymodaq_plugins_template.hardware.python_wrapper_file_of_your_instrument import PythonWrapperObjectOfYourInstrument - -# TODO: -# (1) change the name of the following class to DAQ_Move_TheNameOfYourChoice -# (2) change the name of this file to daq_move_TheNameOfYourChoice ("TheNameOfYourChoice" should be the SAME -# for the class name and the file name.) -# (3) this file should then be put into the right folder, namely IN THE FOLDER OF THE PLUGIN YOU ARE DEVELOPING: -# pymodaq_plugins_my_plugin/daq_move_plugins - - -class DAQ_Move_Template(DAQ_Move_base): - """ Instrument plugin class for an actuator. - - This object inherits all functionalities to communicate with PyMoDAQ’s DAQ_Move module through inheritance via - DAQ_Move_base. It makes a bridge between the DAQ_Move module and the Python wrapper of a particular instrument. - - TODO Complete the docstring of your plugin with: - * The set of controllers and actuators that should be compatible with this instrument plugin. - * With which instrument and controller it has been tested. - * The version of PyMoDAQ during the test. - * The version of the operating system. - * Installation instructions: what manufacturer’s drivers should be installed to make it run? - - Attributes: - ----------- - controller: object - The particular object that allow the communication with the hardware, in general a python wrapper around the - hardware library. - - # TODO add your particular attributes here if any - - """ - is_multiaxes = False # TODO for your plugin set to True if this plugin is controlled for a multiaxis controller - _axis_names: Union[List[str], Dict[str, int]] = ['Axis1', 'Axis2'] # TODO for your plugin: complete the list - _controller_units: Union[str, List[str]] = 'mm' # TODO for your plugin: put the correct unit here, it could be - # TODO a single str (the same one is applied to all axes) or a list of str (as much as the number of axes) - _epsilons: Union[float, List[float]] = 0.1 # TODO replace this by a value that is correct depending on your controller - # TODO it could be a single float of a list of float (as much as the number of axes) - # _epsilons is the initial default value for the epsilon parameter allowing pymodaq to know if the controller reached - # the target value. It is the developer responsibility to put here a meaningful value - - - data_actuator_type = DataActuatorType.DataActuator # keep this line: move_abs / move_rel receive a DataActuator (with - # units) and get_actuator_value returns one. The default of the PyMoDAQ base class is DataActuatorType.float, only - # kept for old plugins (a plain float in the axis unit is exchanged instead): do not remove this line, and do not - # use DataActuatorType.float in a new plugin. - - #todo: set the correct values for these two variables (pymodaq>5.3.0 only, if developing using lower version, just - # remove the two lines) - ui_type = UiType.NONE # should precise (force if possible) what should be the ui type to be used with this - # actuator. If NONE, PyMoDAQ will use the default ui type (see preferences). - has_encoder = True # tell PyMoDAQ if this actuator is able to set an absolute position and read the controller - # value. If False, you should consider having ui_type = UiType.RELATIVE - - - params = [ # TODO for your custom plugin: elements to be added here as dicts in order to control your custom stage - ] + comon_parameters_fun(axis_names=_axis_names) - - def ini_attributes(self): - # TODO declare the type of the wrapper (and assign it to self.controller) you're going to use for easy - # autocompletion - self.controller: PythonWrapperObjectOfYourInstrument = None - - #TODO declare here attributes you want/need to init with a default value - pass - - def ini_stage(self, controller=None): - """Actuator communication initialization - - Parameters - ---------- - controller: (object) - custom object of a PyMoDAQ plugin (Slave case). None if only one actuator by controller (Master case) - - Returns - ------- - info: str - initialized: bool - False if initialization failed otherwise True - """ - raise NotImplementedError # TODO when writing your own plugin remove this line and modify the ones below - if self.is_master: # is needed when controller is master - self.controller = PythonWrapperObjectOfYourInstrument() # TODO add the arguments for the instantiation - initialized = self.controller.a_method_or_atttribute_to_check_if_init() # todo - # todo: enter here whatever is needed for your controller initialization and eventual - # opening of the communication channel - else: - self.controller = controller - initialized = True - - info = "Whatever info you want to log" - return info, initialized - - def close(self): - """Terminate the communication protocol""" - ## TODO for your custom plugin - raise NotImplementedError # when writing your own plugin remove this line - # only the master owns the controller (a slave must not close the shared one) and ini_stage/ini_detector may - # have failed before creating it, so close can be called while self.controller is still None - if self.is_master and self.controller is not None: - # self.controller.your_method_to_terminate_the_communication() # when writing your own plugin replace this line - ... - - def get_actuator_value(self) -> DataActuator: - """Get the current value from the hardware with scaling conversion. - - Returns - ------- - float: The position obtained after scaling conversion. - """ - ## TODO for your custom plugin - raise NotImplementedError # when writing your own plugin remove this line - pos = DataActuator(data=self.controller.your_method_to_get_the_actuator_value(), # when writing your own plugin replace this line - units=self.axis_unit) - pos = self.get_position_with_scaling(pos) - return pos - - def user_condition_to_reach_target(self) -> bool: - """ Implement a condition for exiting the polling mechanism and specifying that the - target value has been reached - - Returns - ------- - bool: if True, PyMoDAQ considers the target value has been reached - """ - # TODO either delete this method if the usual polling is fine with you, but if need you can - # add here some other condition to be fullfilled either a completely new one or - # using or/and operations between the epsilon_bool and some other custom booleans - # for a usage example see DAQ_Move_brushlessMotor from the Thorlabs plugin - return True - - def move_abs(self, value: DataActuator): - """ Move the actuator to the absolute target defined by value - - Parameters - ---------- - value: DataActuator - Absolute target, with units. (With the backcompatibility DataActuatorType.float it would be a plain float, - already expressed in the axis unit, but new plugins should not use it.) - """ - - value = self.check_bound(value) #if user checked bounds, the defined bounds are applied here - self.target_value = value - value = self.set_position_with_scaling(value) # apply scaling if the user specified one - ## TODO for your custom plugin - # IMPORTANT: the controller only understands its own units. Always send value.value(self.axis_unit), it returns - # the magnitude expressed in the unit of this axis (the one of _controller_units, 'mm' here). PyMoDAQ already - # converts the target to the axis unit before calling move_abs, but value.value() alone is just the magnitude - # in whatever unit `value` carries (1 cm gives 1.0, not 10.0): value.value(self.axis_unit) guards against a - # mistake, and keeps the plugin correct when move_abs is called from elsewhere with another unit. - # (axis_unit is the unit of the current axis, axis_units the list/dict of the units of all the axes.) - raise NotImplementedError # when writing your own plugin remove this line - self.controller.your_method_to_set_an_absolute_value(value.value(self.axis_unit)) # when writing your own plugin replace this line - self.emit_status(ThreadCommand('Update_Status', ['Some info you want to log'])) - - def move_rel(self, value: DataActuator): - """ Move the actuator to the relative target actuator value defined by value - - Parameters - ---------- - value: DataActuator - Relative displacement, with units (convert it with value.value(self.axis_unit) before sending it to the - controller, see move_abs). - """ - value = self.check_bound(self.current_value + value) - self.current_value - self.target_value = value + self.current_value - value = self.set_position_relative_with_scaling(value) - - ## TODO for your custom plugin - # IMPORTANT: send value.value(self.axis_unit), not value.value(): the controller only understands its own units - raise NotImplementedError # when writing your own plugin remove this line - self.controller.your_method_to_set_a_relative_value(value.value(self.axis_unit)) # when writing your own plugin replace this line - self.emit_status(ThreadCommand('Update_Status', ['Some info you want to log'])) - - def move_home(self): - """Call the reference method of the controller - - Contrary to move_abs and move_rel, PyMoDAQ does not poll the position to know when the homing is finished. - Whether this method blocks until the actuator is at home or only starts the homing (asynchronous), the plugin - has to call self.move_done() when the homing process ends, otherwise PyMoDAQ keeps waiting for it. - """ - - ## TODO for your custom plugin - raise NotImplementedError # when writing your own plugin remove this line - self.controller.your_method_to_get_to_a_known_reference() # when writing your own plugin replace this line - self.emit_status(ThreadCommand('Update_Status', ['Some info you want to log'])) - self.move_done() # blocking homing: call it here. Asynchronous homing: call it once the controller reports the end - - def stop_motion(self): - """Stop the actuator and emits move_done signal""" - - ## TODO for your custom plugin - raise NotImplementedError # when writing your own plugin remove this line - self.controller.your_method_to_stop_positioning() # when writing your own plugin replace this line - self.emit_status(ThreadCommand('Update_Status', ['Some info you want to log'])) - - def commit_settings(self, param: Parameter): - """Apply the consequences of a change of value in the detector settings - - Parameters - ---------- - param: Parameter - A given parameter (within detector_settings) whose value has been changed by the user - """ - ## TODO for your custom plugin - if param.name() == 'axis': - self.axis_unit = self.controller.your_method_to_get_correct_axis_unit() - # do this only if you can and if the units are not known beforehand, for instance - # if the motors connected to the controller are of different type (mm, µm, nm, , etc...) - # see BrushlessDCMotor from the thorlabs plugin for an exemple - - elif param.name() == "a_parameter_you've_added_in_self.params": - self.controller.your_method_to_apply_this_param_change() - else: - pass - - -if __name__ == '__main__': - main(__file__) diff --git a/src/pymodaq_plugins_template/daq_viewer_plugins/plugins_0D/daq_0Dviewer_Template.py b/src/pymodaq_plugins_template/daq_viewer_plugins/plugins_0D/daq_0Dviewer_Template.py deleted file mode 100644 index 3a75b1f..0000000 --- a/src/pymodaq_plugins_template/daq_viewer_plugins/plugins_0D/daq_0Dviewer_Template.py +++ /dev/null @@ -1,160 +0,0 @@ -import numpy as np - -from pymodaq_utils.utils import ThreadCommand -from pymodaq_data.data import DataToExport -from pymodaq_gui.parameter import Parameter - -from pymodaq.control_modules.viewer_utility_classes import DAQ_Viewer_base, comon_parameters, main -from pymodaq.utils.data import DataFromPlugins - -# TODO: -# Replace the following fake import with the import of the real Python wrapper of your instrument. Here we suppose that -# the wrapper is in the hardware directory, but it could come from an external librairy like pylablib or pymeasure. -from pymodaq_plugins_template.hardware.python_wrapper_file_of_your_instrument import PythonWrapperObjectOfYourInstrument - -# TODO: -# (1) change the name of the following class to DAQ_0DViewer_TheNameOfYourChoice -# (2) change the name of this file to daq_0Dviewer_TheNameOfYourChoice ("TheNameOfYourChoice" should be the SAME -# for the class name and the file name.) -# (3) this file should then be put into the right folder, namely IN THE FOLDER OF THE PLUGIN YOU ARE DEVELOPING: -# pymodaq_plugins_my_plugin/daq_viewer_plugins/plugins_0D - - -class DAQ_0DViewer_Template(DAQ_Viewer_base): - """ Instrument plugin class for a OD viewer. - - This object inherits all functionalities to communicate with PyMoDAQ’s DAQ_Viewer module through inheritance via - DAQ_Viewer_base. It makes a bridge between the DAQ_Viewer module and the Python wrapper of a particular instrument. - - TODO Complete the docstring of your plugin with: - * The set of instruments that should be compatible with this instrument plugin. - * With which instrument it has actually been tested. - * The version of PyMoDAQ during the test. - * The version of the operating system. - * Installation instructions: what manufacturer’s drivers should be installed to make it run? - - Attributes: - ----------- - controller: object - The particular object that allow the communication with the hardware, in general a python wrapper around the - hardware library. - - # TODO add your particular attributes here if any - - """ - params = comon_parameters+[ - ## TODO for your custom plugin: elements to be added here as dicts in order to control your custom stage - ] - - def ini_attributes(self): - # TODO declare the type of the wrapper (and assign it to self.controller) you're going to use for easy - # autocompletion - self.controller: PythonWrapperObjectOfYourInstrument = None - - #TODO declare here attributes you want/need to init with a default value - pass - - def ini_detector(self, controller=None): - """Detector communication initialization - - Parameters - ---------- - controller: (object) - custom object of a PyMoDAQ plugin (Slave case). None if only one actuator/detector by controller - (Master case) - - Returns - ------- - info: str - initialized: bool - False if initialization failed otherwise True - """ - - raise NotImplementedError # TODO when writing your own plugin remove this line and modify the one below - if self.is_master: - self.controller = PythonWrapperObjectOfYourInstrument() #instantiate you driver with whatever arguments are needed - self.controller.open_communication() # call eventual methods - initialized = self.controller.a_method_or_atttribute_to_check_if_init() # TODO - else: - self.controller = controller - initialized = True - - # TODO for your custom plugin (optional) initialize viewers panel with the future type of data - self.dte_signal_temp.emit(DataToExport(name='myplugin', - data=[DataFromPlugins(name='Mock1', - data=[np.array([0]), np.array([0])], - dim='Data0D', - labels=['Mock1', 'label2'])])) - - info = "Whatever info you want to log" - return info, initialized - - def close(self): - """Terminate the communication protocol""" - ## TODO for your custom plugin - raise NotImplementedError # when writing your own plugin remove this line - # only the master owns the controller (a slave must not close the shared one) and ini_stage/ini_detector may - # have failed before creating it, so close can be called while self.controller is still None - if self.is_master and self.controller is not None: - # self.controller.your_method_to_terminate_the_communication() # when writing your own plugin replace this line - ... - - def grab_data(self, Naverage=1, **kwargs): - """Start a grab from the detector - - Parameters - ---------- - Naverage: int - Number of hardware averaging (if hardware averaging is possible, self.hardware_averaging should be set to - True in class preamble and you should code this implementation) - kwargs: dict - others optionals arguments - """ - ## TODO for your custom plugin: you should choose EITHER the synchrone or the asynchrone version following - - # synchrone version (blocking function) - raise NotImplementedError # when writing your own plugin remove this line - data_tot = self.controller.your_method_to_start_a_grab_snap() - self.dte_signal.emit(DataToExport(name='myplugin', - data=[DataFromPlugins(name='Mock1', data=data_tot, - dim='Data0D', labels=['dat0', 'data1'])])) - ######################################################### - - # asynchrone version (non-blocking function with callback) - raise NotImplementedError # when writing your own plugin remove this line - self.controller.your_method_to_start_a_grab_snap(self.callback) # when writing your own plugin replace this line - ######################################################### - - def callback(self): - """optional asynchrone method called when the detector has finished its acquisition of data""" - data_tot = self.controller.your_method_to_get_data_from_buffer() - self.dte_signal.emit(DataToExport(name='myplugin', - data=[DataFromPlugins(name='Mock1', data=data_tot, - dim='Data0D', labels=['dat0', 'data1'])])) - - def stop(self): - """Stop the current grab hardware wise if necessary""" - ## TODO for your custom plugin - raise NotImplementedError # when writing your own plugin remove this line - self.controller.your_method_to_stop_acquisition() # when writing your own plugin replace this line - self.emit_status(ThreadCommand('Update_Status', ['Some info you want to log'])) - ############################## - return '' - - def commit_settings(self, param: Parameter): - """Apply the consequences of a change of value in the detector settings - - Parameters - ---------- - param: Parameter - A given parameter (within detector_settings) whose value has been changed by the user - """ - ## TODO for your custom plugin - if param.name() == "a_parameter_you've_added_in_self.params": - self.controller.your_method_to_apply_this_param_change() # when writing your own plugin replace this line -# elif ... - ## - - -if __name__ == '__main__': - main(__file__) diff --git a/src/pymodaq_plugins_template/daq_viewer_plugins/plugins_1D/daq_1Dviewer_Template.py b/src/pymodaq_plugins_template/daq_viewer_plugins/plugins_1D/daq_1Dviewer_Template.py deleted file mode 100644 index 0f874f3..0000000 --- a/src/pymodaq_plugins_template/daq_viewer_plugins/plugins_1D/daq_1Dviewer_Template.py +++ /dev/null @@ -1,167 +0,0 @@ -import numpy as np - -from pymodaq_utils.utils import ThreadCommand -from pymodaq_data.data import DataToExport, Axis -from pymodaq_gui.parameter import Parameter - -from pymodaq.control_modules.viewer_utility_classes import DAQ_Viewer_base, comon_parameters, main -from pymodaq.utils.data import DataFromPlugins - -# TODO: -# Replace the following fake import with the import of the real Python wrapper of your instrument. Here we suppose that -# the wrapper is in the hardware directory, but it could come from an external librairy like pylablib or pymeasure. -from pymodaq_plugins_template.hardware.python_wrapper_file_of_your_instrument import PythonWrapperObjectOfYourInstrument - -# TODO: -# (1) change the name of the following class to DAQ_1DViewer_TheNameOfYourChoice -# (2) change the name of this file to daq_1Dviewer_TheNameOfYourChoice ("TheNameOfYourChoice" should be the SAME -# for the class name and the file name.) -# (3) this file should then be put into the right folder, namely IN THE FOLDER OF THE PLUGIN YOU ARE DEVELOPING: -# pymodaq_plugins_my_plugin/daq_viewer_plugins/plugins_1D - - -class DAQ_1DViewer_Template(DAQ_Viewer_base): - """ Instrument plugin class for a 1D viewer. - - This object inherits all functionalities to communicate with PyMoDAQ’s DAQ_Viewer module through inheritance via - DAQ_Viewer_base. It makes a bridge between the DAQ_Viewer module and the Python wrapper of a particular instrument. - - TODO Complete the docstring of your plugin with: - * The set of instruments that should be compatible with this instrument plugin. - * With which instrument it has actually been tested. - * The version of PyMoDAQ during the test. - * The version of the operating system. - * Installation instructions: what manufacturer’s drivers should be installed to make it run? - - Attributes: - ----------- - controller: object - The particular object that allow the communication with the hardware, in general a python wrapper around the - hardware library. - - # TODO add your particular attributes here if any - - """ - params = comon_parameters+[ - ## TODO for your custom plugin - # elements to be added here as dicts in order to control your custom stage - ############ - ] - - def ini_attributes(self): - # TODO declare the type of the wrapper (and assign it to self.controller) you're going to use for easy - # autocompletion - self.controller: PythonWrapperObjectOfYourInstrument = None - - # TODO declare here attributes you want/need to init with a default value - - self.x_axis = None - - def ini_detector(self, controller=None): - """Detector communication initialization - - Parameters - ---------- - controller: (object) - custom object of a PyMoDAQ plugin (Slave case). None if only one actuator/detector by controller - (Master case) - - Returns - ------- - info: str - initialized: bool - False if initialization failed otherwise True - """ - - raise NotImplementedError # TODO when writing your own plugin remove this line and modify the one below - if self.is_master: - self.controller = PythonWrapperObjectOfYourInstrument() #instantiate you driver with whatever arguments are needed - self.controller.open_communication() # call eventual methods - initialized = self.controller.a_method_or_atttribute_to_check_if_init() # TODO - else: - self.controller = controller - initialized = True - - ## TODO for your custom plugin - # get the x_axis (you may want to to this also in the commit settings if x_axis may have changed - data_x_axis = self.controller.your_method_to_get_the_x_axis() # if possible - self.x_axis = Axis(data=data_x_axis, label='', units='', index=0) - - # TODO for your custom plugin. Initialize viewers pannel with the future type of data - self.dte_signal_temp.emit(DataToExport(name='myplugin', - data=[DataFromPlugins(name='Mock1', - data=[np.array([0., 0., ...]), - np.array([0., 0., ...])], - dim='Data1D', labels=['Mock1', 'label2'], - axes=[self.x_axis])])) - - info = "Whatever info you want to log" - return info, initialized - - def close(self): - """Terminate the communication protocol""" - ## TODO for your custom plugin - raise NotImplementedError # when writing your own plugin remove this line - # only the master owns the controller (a slave must not close the shared one) and ini_stage/ini_detector may - # have failed before creating it, so close can be called while self.controller is still None - if self.is_master and self.controller is not None: - # self.controller.your_method_to_terminate_the_communication() # when writing your own plugin replace this line - ... - - def grab_data(self, Naverage=1, **kwargs): - """Start a grab from the detector - - Parameters - ---------- - Naverage: int - Number of hardware averaging (if hardware averaging is possible, self.hardware_averaging should be set to - True in class preamble and you should code this implementation) - kwargs: dict - others optionals arguments - """ - ## TODO for your custom plugin: you should choose EITHER the synchrone or the asynchrone version following - - ##synchrone version (blocking function) - data_tot = self.controller.your_method_to_start_a_grab_snap() - self.dte_signal.emit(DataToExport('myplugin', - data=[DataFromPlugins(name='Mock1', data=data_tot, - dim='Data1D', labels=['dat0', 'data1'], - axes=[self.x_axis])])) - - ##asynchrone version (non-blocking function with callback) - self.controller.your_method_to_start_a_grab_snap(self.callback) - ######################################################### - - def callback(self): - """optional asynchrone method called when the detector has finished its acquisition of data""" - data_tot = self.controller.your_method_to_get_data_from_buffer() - self.dte_signal.emit(DataToExport('myplugin', - data=[DataFromPlugins(name='Mock1', data=data_tot, - dim='Data1D', labels=['dat0', 'data1'])])) - - def stop(self): - """Stop the current grab hardware wise if necessary""" - ## TODO for your custom plugin - raise NotImplementedError # when writing your own plugin remove this line - self.controller.your_method_to_stop_acquisition() # when writing your own plugin replace this line - self.emit_status(ThreadCommand('Update_Status', ['Some info you want to log'])) - ############################## - return '' - - def commit_settings(self, param: Parameter): - """Apply the consequences of a change of value in the detector settings - - Parameters - ---------- - param: Parameter - A given parameter (within detector_settings) whose value has been changed by the user - """ - ## TODO for your custom plugin - if param.name() == "a_parameter_you've_added_in_self.params": - self.controller.your_method_to_apply_this_param_change() -# elif ... - ## - - -if __name__ == '__main__': - main(__file__) diff --git a/src/pymodaq_plugins_template/daq_viewer_plugins/plugins_2D/daq_2Dviewer_Template.py b/src/pymodaq_plugins_template/daq_viewer_plugins/plugins_2D/daq_2Dviewer_Template.py deleted file mode 100644 index 23e4f7f..0000000 --- a/src/pymodaq_plugins_template/daq_viewer_plugins/plugins_2D/daq_2Dviewer_Template.py +++ /dev/null @@ -1,170 +0,0 @@ -import numpy as np - -from pymodaq_utils.utils import ThreadCommand -from pymodaq_data.data import DataToExport, Axis -from pymodaq_gui.parameter import Parameter - -from pymodaq.control_modules.viewer_utility_classes import DAQ_Viewer_base, comon_parameters, main -from pymodaq.utils.data import DataFromPlugins - -# TODO: -# Replace the following fake import with the import of the real Python wrapper of your instrument. Here we suppose that -# the wrapper is in the hardware directory, but it could come from an external librairy like pylablib or pymeasure. -from pymodaq_plugins_template.hardware.python_wrapper_file_of_your_instrument import PythonWrapperObjectOfYourInstrument - -# TODO: -# (1) change the name of the following class to DAQ_2DViewer_TheNameOfYourChoice -# (2) change the name of this file to daq_2Dviewer_TheNameOfYourChoice ("TheNameOfYourChoice" should be the SAME -# for the class name and the file name.) -# (3) this file should then be put into the right folder, namely IN THE FOLDER OF THE PLUGIN YOU ARE DEVELOPING: -# pymodaq_plugins_my_plugin/daq_viewer_plugins/plugins_2D - - -class DAQ_2DViewer_Template(DAQ_Viewer_base): - """ Instrument plugin class for a 2D viewer. - - This object inherits all functionalities to communicate with PyMoDAQ’s DAQ_Viewer module through inheritance via - DAQ_Viewer_base. It makes a bridge between the DAQ_Viewer module and the Python wrapper of a particular instrument. - - TODO Complete the docstring of your plugin with: - * The set of instruments that should be compatible with this instrument plugin. - * With which instrument it has actually been tested. - * The version of PyMoDAQ during the test. - * The version of the operating system. - * Installation instructions: what manufacturer’s drivers should be installed to make it run? - - Attributes: - ----------- - controller: object - The particular object that allow the communication with the hardware, in general a python wrapper around the - hardware library. - - # TODO add your particular attributes here if any - - """ - params = comon_parameters + [ - ## TODO for your custom plugin - # elements to be added here as dicts in order to control your custom stage - ############ - ] - - def ini_attributes(self): - # TODO declare the type of the wrapper (and assign it to self.controller) you're going to use for easy - # autocompletion - self.controller: PythonWrapperObjectOfYourInstrument = None - - # TODO declare here attributes you want/need to init with a default value - - self.x_axis = None - self.y_axis = None - - def ini_detector(self, controller=None): - """Detector communication initialization - - Parameters - ---------- - controller: (object) - custom object of a PyMoDAQ plugin (Slave case). None if only one actuator/detector by controller - (Master case) - - Returns - ------- - info: str - initialized: bool - False if initialization failed otherwise True - """ - raise NotImplementedError # TODO when writing your own plugin remove this line and modify the one below - if self.is_master: - self.controller = PythonWrapperObjectOfYourInstrument() #instantiate you driver with whatever arguments are needed - self.controller.open_communication() # call eventual methods - initialized = self.controller.a_method_or_atttribute_to_check_if_init() # TODO - else: - self.controller = controller - initialized = True - - ## TODO for your custom plugin - # get the x_axis (you may want to to this also in the commit settings if x_axis may have changed - data_x_axis = self.controller.your_method_to_get_the_x_axis() # if possible - self.x_axis = Axis(data=data_x_axis, label='', units='', index=1) - - # get the y_axis (you may want to to this also in the commit settings if y_axis may have changed - data_y_axis = self.controller.your_method_to_get_the_y_axis() # if possible - self.y_axis = Axis(data=data_y_axis, label='', units='', index=0) - - ## TODO for your custom plugin. Initialize viewers pannel with the future type of data - self.dte_signal_temp.emit(DataToExport('myplugin', - data=[DataFromPlugins(name='Mock1', data=["2D numpy array"], - dim='Data2D', labels=['dat0'], - axes=[self.x_axis, self.y_axis]), ])) - - info = "Whatever info you want to log" - return info, initialized - - def close(self): - """Terminate the communication protocol""" - ## TODO for your custom plugin - raise NotImplementedError # when writing your own plugin remove this line - # only the master owns the controller (a slave must not close the shared one) and ini_stage/ini_detector may - # have failed before creating it, so close can be called while self.controller is still None - if self.is_master and self.controller is not None: - # self.controller.your_method_to_terminate_the_communication() # when writing your own plugin replace this line - ... - - def grab_data(self, Naverage=1, **kwargs): - """Start a grab from the detector - - Parameters - ---------- - Naverage: int - Number of hardware averaging (if hardware averaging is possible, self.hardware_averaging should be set to - True in class preamble and you should code this implementation) - kwargs: dict - others optionals arguments - """ - ## TODO for your custom plugin: you should choose EITHER the synchrone or the asynchrone version following - - ##synchrone version (blocking function) - data_tot = self.controller.your_method_to_start_a_grab_snap() - self.dte_signal.emit(DataToExport('myplugin', - data=[DataFromPlugins(name='Mock1', data=data_tot, - dim='Data2D', labels=['label1'], - axes=[self.x_axis, self.y_axis]), ])) - - ##asynchrone version (non-blocking function with callback) - self.controller.your_method_to_start_a_grab_snap(self.callback) - ######################################################### - - def callback(self): - """optional asynchrone method called when the detector has finished its acquisition of data""" - data_tot = self.controller.your_method_to_get_data_from_buffer() - self.dte_signal.emit(DataToExport('myplugin', - data=[DataFromPlugins(name='Mock1', data=data_tot, - dim='Data2D', labels=['label1'], - x_axis=self.x_axis, - y_axis=self.y_axis), ])) - - def stop(self): - """Stop the current grab hardware wise if necessary""" - ## TODO for your custom plugin - raise NotImplementedError # when writing your own plugin remove this line - self.controller.your_method_to_stop_acquisition() # when writing your own plugin replace this line - self.emit_status(ThreadCommand('Update_Status', ['Some info you want to log'])) - ############################## - return '' - - def commit_settings(self, param: Parameter): - """Apply the consequences of a change of value in the detector settings - - Parameters - ---------- - param: Parameter - A given parameter (within detector_settings) whose value has been changed by the user - """ - # TODO for your custom plugin - if param.name() == "a_parameter_you've_added_in_self.params": - self.controller.your_method_to_apply_this_param_change() - #elif ... - - -if __name__ == '__main__': - main(__file__) diff --git a/src/pymodaq_plugins_template/extensions/custom_extension_template.py b/src/pymodaq_plugins_template/extensions/custom_extension_template.py deleted file mode 100644 index bd16dea..0000000 --- a/src/pymodaq_plugins_template/extensions/custom_extension_template.py +++ /dev/null @@ -1,163 +0,0 @@ -"""Template of a Dashboard extension. - -An extension is a ``CustomExt``: a small application living inside the Dashboard. Everything related to the -instruments (the experiment, i.e. the list of actuators and detectors, and its state) is handled by the Dashboard, -the extension only uses it through its ``dashboard`` argument: - -* ``self.modules_manager``: a ModulesManager created for this extension, giving access to the actuators and - detectors of the Dashboard's experiment (never create control modules yourself) -* ``self.experiment_manager`` and ``self.state_manager``: the Dashboard's managers, never create your own - -The only difference with the extensions of the PyMoDAQ core is the presence of the ``EXTENSION_NAME`` and -``CLASS_NAME`` variables below, needed by the Dashboard to recognize your extension (plus the -``pymodaq.extensions`` entry point in pyproject.toml). -""" -from qtpy import QtWidgets - -from pymodaq_gui import utils as gutils -from pymodaq_utils.config import GlobalConfig -from pymodaq_utils.logger import set_logger, get_module_name - -from pymodaq.utils.custom_ext import CustomExt - -logger = set_logger(get_module_name(__file__)) - -# all the configurations (PyMoDAQ's packages and the one of your plugin package) are read from GlobalConfig, for -# instance: config('gui', 'style', 'theme') -config = GlobalConfig() - -# todo: modify this as you wish -EXTENSION_NAME = 'MY_EXTENSION_NAME' # the name that will be displayed in the extension list in the -# dashboard -CLASS_NAME = 'CustomExtensionTemplate' # this should be the name of your class defined below - - -# todo: modify the name of this class to reflect its application and change the name in the main -# method at the end of the script -class CustomExtensionTemplate(CustomExt): - - # todo: if you wish to create custom Parameter and corresponding widgets. These will be - # automatically added as children of self.settings. Morevover, the self.settings_tree will - # render the widgets in a Qtree. If you wish to see it in your app, add is into a Dock - params = [] - - def __init__(self, parent: gutils.DockArea, dashboard): - # also creates self.modules_manager for this extension, and the extension's own toolbar (named after the - # class). Like the PyMoDAQ extensions (scan, sequencer...), no break is added before it - super().__init__(parent, dashboard, add_toolbar_break=False) - - self.setup_ui() # calls, in this order: setup_docks_and_widgets, setup_menus_and_toolbars, - # setup_actions, connect_things and do_things_after_ui_setup - - def setup_docks_and_widgets(self): - """Method to be subclassed to setup the docks layout - - Examples - -------- - >>>self.docks['ADock'] = gutils.Dock('ADock name') - >>>self.dockarea.addDock(self.docks['ADock']) - >>>self.docks['AnotherDock'] = gutils.Dock('AnotherDock name') - >>>self.dockarea.addDock(self.docks['AnotherDock'''], 'bottom', self.docks['ADock']) - - See Also - -------- - pyqtgraph.dockarea.Dock - """ - # todo: create docks and add them here to hold your widgets. Here the settings tree in a dock - self.docks['settings'] = gutils.Dock('Settings') - self.dockarea.addDock(self.docks['settings']) - self.docks['settings'].addWidget(self.settings_tree) - - def setup_menus_and_toolbars(self, menubar: QtWidgets.QMenuBar = None): - """Non mandatory method to be subclassed in order to create menus and toolbars - - Examples - -------- - >>>file_menu = self.add_menu('file', 'File', parent_menu=menubar) - - See Also - -------- - pymodaq.utils.managers.action_manager.ActionManager - """ - # adds a second toolbar, the Dashboard one: show/hide the Dashboard, load an experiment and a state - self.create_dashboard_toolbar(add_break=False) - - def setup_actions(self): - """Method where to create actions to be subclassed - - Examples - -------- - >>> self.add_action('grab', 'Grab', 'camera', "Grab from camera", checkable=True) - - See Also - -------- - ActionManager.add_action - """ - # todo: replace this example action by yours - self.add_action('list_modules', 'List modules', 'add_circle', - tip='Show the actuators and detectors of the current experiment') - - def connect_things(self): - """Connect actions and/or other widgets signal to methods""" - # todo: replace this example by your connections - self.connect_action('list_modules', self.list_modules) - - def list_modules(self): - """Example: use the modules_manager to access the instruments of the Dashboard's experiment""" - self.update_status(f'Actuators: {self.modules_manager.actuators_name}, ' - f'detectors: {self.modules_manager.detectors_name}') - - def do_things_after_experiment_set(self, experiment_name: str, show_dashboard: bool = None): - """Called each time an experiment (the list of instruments) has been set in the Dashboard - - The base class updates self.modules_manager with the new instruments. - """ - super().do_things_after_experiment_set(experiment_name, show_dashboard) - # todo: update your widgets with the new instruments if needed - - def value_changed(self, param): - """ 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 - """ - pass - - def _quit_fun(self) -> bool: - """Called when the extension is closed. Return True to let it quit, False to refuse (for instance while - running). The base class returns None, which would prevent the extension from closing. - """ - return True - - -def main(): - """Run the extension on its own: loads a Dashboard (hidden), then the extension - - The Dashboard command line options apply, for instance ``-x EXPERIMENT_NAME -s STATE_NAME`` - """ - import sys - from pymodaq_gui.qt_utils import mkQApp - from pymodaq.dashboard import load_dashboard_with_arguments - from pymodaq.utils.gui_utils.loader_utils import create_extension - - app = mkQApp('Custom Ext') - - win, dashboard, _ = load_dashboard_with_arguments(show_dashboard=False, - load_extension=False, - ) - win.mainwindow.setVisible(False) - - win_ext, ext = create_extension(dashboard, CustomExtensionTemplate, show_extension=True) - sys.exit(app.exec()) - - -if __name__ == '__main__': - main() diff --git a/src/pymodaq_plugins_template/resources/config_template.toml b/src/pymodaq_plugins_template/resources/config_template.toml deleted file mode 100644 index a2604a3..0000000 --- a/src/pymodaq_plugins_template/resources/config_template.toml +++ /dev/null @@ -1,2 +0,0 @@ -title = 'this is the configuration file of the plugin XXX' - diff --git a/src/pymodaq_plugins_template/__init__.py b/src/pymodaq_plugins_waveform/__init__.py similarity index 100% rename from src/pymodaq_plugins_template/__init__.py rename to src/pymodaq_plugins_waveform/__init__.py diff --git a/src/pymodaq_plugins_template/app/__init__.py b/src/pymodaq_plugins_waveform/app/__init__.py similarity index 100% rename from src/pymodaq_plugins_template/app/__init__.py rename to src/pymodaq_plugins_waveform/app/__init__.py diff --git a/src/pymodaq_plugins_template/daq_move_plugins/__init__.py b/src/pymodaq_plugins_waveform/daq_move_plugins/__init__.py similarity index 100% rename from src/pymodaq_plugins_template/daq_move_plugins/__init__.py rename to src/pymodaq_plugins_waveform/daq_move_plugins/__init__.py diff --git a/src/pymodaq_plugins_template/daq_viewer_plugins/__init__.py b/src/pymodaq_plugins_waveform/daq_viewer_plugins/__init__.py similarity index 100% rename from src/pymodaq_plugins_template/daq_viewer_plugins/__init__.py rename to src/pymodaq_plugins_waveform/daq_viewer_plugins/__init__.py diff --git a/src/pymodaq_plugins_template/daq_viewer_plugins/plugins_0D/__init__.py b/src/pymodaq_plugins_waveform/daq_viewer_plugins/plugins_0D/__init__.py similarity index 100% rename from src/pymodaq_plugins_template/daq_viewer_plugins/plugins_0D/__init__.py rename to src/pymodaq_plugins_waveform/daq_viewer_plugins/plugins_0D/__init__.py diff --git a/src/pymodaq_plugins_template/daq_viewer_plugins/plugins_1D/__init__.py b/src/pymodaq_plugins_waveform/daq_viewer_plugins/plugins_1D/__init__.py similarity index 100% rename from src/pymodaq_plugins_template/daq_viewer_plugins/plugins_1D/__init__.py rename to src/pymodaq_plugins_waveform/daq_viewer_plugins/plugins_1D/__init__.py diff --git a/src/pymodaq_plugins_template/daq_viewer_plugins/plugins_2D/__init__.py b/src/pymodaq_plugins_waveform/daq_viewer_plugins/plugins_2D/__init__.py similarity index 100% rename from src/pymodaq_plugins_template/daq_viewer_plugins/plugins_2D/__init__.py rename to src/pymodaq_plugins_waveform/daq_viewer_plugins/plugins_2D/__init__.py diff --git a/src/pymodaq_plugins_template/daq_viewer_plugins/plugins_ND/__init__.py b/src/pymodaq_plugins_waveform/daq_viewer_plugins/plugins_ND/__init__.py similarity index 100% rename from src/pymodaq_plugins_template/daq_viewer_plugins/plugins_ND/__init__.py rename to src/pymodaq_plugins_waveform/daq_viewer_plugins/plugins_ND/__init__.py diff --git a/src/pymodaq_plugins_template/exporters/__init__.py b/src/pymodaq_plugins_waveform/exporters/__init__.py similarity index 100% rename from src/pymodaq_plugins_template/exporters/__init__.py rename to src/pymodaq_plugins_waveform/exporters/__init__.py diff --git a/src/pymodaq_plugins_template/extensions/__init__.py b/src/pymodaq_plugins_waveform/extensions/__init__.py similarity index 100% rename from src/pymodaq_plugins_template/extensions/__init__.py rename to src/pymodaq_plugins_waveform/extensions/__init__.py diff --git a/src/pymodaq_plugins_template/hardware/__init__.py b/src/pymodaq_plugins_waveform/hardware/__init__.py similarity index 100% rename from src/pymodaq_plugins_template/hardware/__init__.py rename to src/pymodaq_plugins_waveform/hardware/__init__.py diff --git a/src/pymodaq_plugins_template/models/__init__.py b/src/pymodaq_plugins_waveform/models/__init__.py similarity index 100% rename from src/pymodaq_plugins_template/models/__init__.py rename to src/pymodaq_plugins_waveform/models/__init__.py diff --git a/src/pymodaq_plugins_template/resources/__init__.py b/src/pymodaq_plugins_waveform/resources/__init__.py similarity index 100% rename from src/pymodaq_plugins_template/resources/__init__.py rename to src/pymodaq_plugins_waveform/resources/__init__.py diff --git a/src/pymodaq_plugins_waveform/resources/config_template.toml b/src/pymodaq_plugins_waveform/resources/config_template.toml new file mode 100644 index 0000000..c78390c --- /dev/null +++ b/src/pymodaq_plugins_waveform/resources/config_template.toml @@ -0,0 +1,2 @@ +title = 'this is the configuration file of the plugin waveform' + diff --git a/src/pymodaq_plugins_template/scanners/__init__.py b/src/pymodaq_plugins_waveform/scanners/__init__.py similarity index 100% rename from src/pymodaq_plugins_template/scanners/__init__.py rename to src/pymodaq_plugins_waveform/scanners/__init__.py diff --git a/src/pymodaq_plugins_template/utils.py b/src/pymodaq_plugins_waveform/utils.py similarity index 100% rename from src/pymodaq_plugins_template/utils.py rename to src/pymodaq_plugins_waveform/utils.py