Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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,10 +6,8 @@
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 this fake import with the import of the real python wrapper of your instrument
from pymodaq_plugins_template.hardware.PythonWrapperFileOfYourInstrument import PythonWrapperObjectOfYourInstrument
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe say the import is not exclusive from hardware but could be from another package: pymeasure, pylablib...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the file (module) write it in lowercase with underscore

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


# TODO:
# (1) change the name of the following class to DAQ_Move_TheNameOfYourChoice
Expand Down Expand Up @@ -56,7 +54,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 +131,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,8 @@
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 this fake import with the import of the real python wrapper of your instrument
from pymodaq_plugins_template.hardware.PythonWrapperFileOfYourInstrument import PythonWrapperObjectOfYourInstrument

# TODO:
# (1) change the name of the following class to DAQ_0DViewer_TheNameOfYourChoice
Expand Down Expand Up @@ -47,7 +46,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 +83,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,8 @@
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 this fake import with the import of the real python wrapper of your instrument
from pymodaq_plugins_template.hardware.PythonWrapperFileOfYourInstrument import PythonWrapperObjectOfYourInstrument

# TODO:
# (1) change the name of the following class to DAQ_1DViewer_TheNameOfYourChoice
Expand Down Expand Up @@ -51,7 +49,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 +87,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,9 +6,9 @@

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 this fake import with the import of the real python wrapper of your instrument
from pymodaq_plugins_template.hardware.PythonWrapperFileOfYourInstrument import PythonWrapperObjectOfYourInstrument
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


# TODO:
# (1) change the name of the following class to DAQ_2DViewer_TheNameOfYourChoice
Expand Down Expand Up @@ -47,7 +47,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 +84,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