Skip to content

Commit

Permalink
modified mono
Browse files Browse the repository at this point in the history
  • Loading branch information
seb5g committed Nov 8, 2023
1 parent 4894689 commit 7cef050
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,15 @@
from pymodaq_plugins_teaching.hardware.spectrometer import Spectrometer


class DAQ_0DViewer_MonoChromator2(DAQ_Viewer_base):
class DAQ_0DViewer_MonoChromator(DAQ_Viewer_base):
"""
"""
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: Spectrometer = None

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

def commit_settings(self, param: Parameter):
"""Apply the consequences of a change of value in the detector settings
Expand All @@ -31,11 +25,7 @@ def commit_settings(self, param: Parameter):
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 ...
##
pass

def ini_detector(self, controller=None):
"""Detector communication initialization
Expand All @@ -56,9 +46,12 @@ def ini_detector(self, controller=None):
self.ini_detector_init(old_controller=controller,
new_controller=Spectrometer())

if self.settings['multiaxes', 'multi_status'] == 'Master':
initialized = self.controller.open_communication()
else:
initialized = True

info = "Whatever info you want to log"
initialized = self.controller.open_communication() # TODO
return info, initialized

def close(self):
Expand All @@ -84,7 +77,6 @@ def grab_data(self, Naverage=1, **kwargs):

def stop(self):
"""Stop the current grab hardware wise if necessary"""
## TODO for your custom plugin
self.controller.stop()
self.emit_status(ThreadCommand('Update_Status', ['Some info you want to log']))
##############################
Expand Down

This file was deleted.

0 comments on commit 7cef050

Please sign in to comment.