Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
from pymodaq_utils.utils import ThreadCommand # object used to send info back to the main thread
from pymodaq_gui.parameter import Parameter


class PythonWrapperOfYourInstrument:
# TODO Replace this fake class with the import of the real python wrapper of your instrument
pass
# 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.

Expand Down Expand Up @@ -56,7 +58,7 @@ class DAQ_Move_Template(DAQ_Move_base):
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: PythonWrapperOfYourInstrument = None
self.controller: PythonWrapperObjectOfYourInstrument = None

#TODO declare here attributes you want/need to init with a default value
pass
Expand Down Expand Up @@ -133,7 +135,7 @@ def ini_stage(self, controller=None):
"""
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 = PythonWrapperOfYourInstrument(arg1, arg2, ...) # arguments for instantiation!)
self.controller = PythonWrapperObjectOfYourInstrument(arg1, arg2, ...) # arguments for 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
from pymodaq.control_modules.viewer_utility_classes import DAQ_Viewer_base, comon_parameters, main
from pymodaq.utils.data import DataFromPlugins

class PythonWrapperOfYourInstrument:
# TODO Replace this fake class with the import of the real python wrapper of your instrument
pass
# 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
Expand All @@ -18,6 +19,7 @@ class PythonWrapperOfYourInstrument:
# (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.

Expand Down Expand Up @@ -47,7 +49,7 @@ class DAQ_0DViewer_Template(DAQ_Viewer_base):
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: PythonWrapperOfYourInstrument = None
self.controller: PythonWrapperObjectOfYourInstrument = None

#TODO declare here attributes you want/need to init with a default value
pass
Expand Down Expand Up @@ -84,7 +86,7 @@ def ini_detector(self, controller=None):

raise NotImplementedError # TODO when writing your own plugin remove this line and modify the one below
if self.is_master:
self.controller = PythonWrapperOfYourInstrument() #instantiate you driver with whatever arguments are needed
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
from pymodaq.control_modules.viewer_utility_classes import DAQ_Viewer_base, comon_parameters, main
from pymodaq.utils.data import DataFromPlugins


class PythonWrapperOfYourInstrument:
# TODO Replace this fake class with the import of the real python wrapper of your instrument
pass
# 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
Expand Down Expand Up @@ -51,7 +51,7 @@ class DAQ_1DViewer_Template(DAQ_Viewer_base):
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: PythonWrapperOfYourInstrument = None
self.controller: PythonWrapperObjectOfYourInstrument = None

# TODO declare here attributes you want/need to init with a default value

Expand Down Expand Up @@ -89,7 +89,7 @@ def ini_detector(self, controller=None):

raise NotImplementedError # TODO when writing your own plugin remove this line and modify the one below
if self.is_master:
self.controller = PythonWrapperOfYourInstrument() #instantiate you driver with whatever arguments are needed
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@

from pymodaq.control_modules.viewer_utility_classes import DAQ_Viewer_base, comon_parameters, main
from pymodaq.utils.data import DataFromPlugins
class PythonWrapperOfYourInstrument:
# TODO Replace this fake class with the import of the real python wrapper of your instrument
pass

# 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.

Expand Down Expand Up @@ -47,7 +51,7 @@ class DAQ_2DViewer_Template(DAQ_Viewer_base):
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: PythonWrapperOfYourInstrument = None
self.controller: PythonWrapperObjectOfYourInstrument = None

# TODO declare here attributes you want/need to init with a default value

Expand Down Expand Up @@ -84,7 +88,7 @@ def ini_detector(self, controller=None):
"""
raise NotImplementedError # TODO when writing your own plugin remove this line and modify the one below
if self.is_master:
self.controller = PythonWrapperOfYourInstrument() #instantiate you driver with whatever arguments are needed
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:
Expand Down
Loading