diff --git a/README.rst b/README.rst index 7d0aff9..a3b951c 100644 --- a/README.rst +++ b/README.rst @@ -19,6 +19,8 @@ Authors ======= * Sébastien. J. Weber +* Tilly Guyot + Instruments =========== @@ -27,24 +29,21 @@ Below is the list of instruments included in this plugin Actuators +++++++++ -* **Shamrock**: Shamrock series of spectrometer used as a monochromator +* **ShamrockPll**: Shamrock series of spectrometer used as a monochromator through the pylablib driver Viewer1D ++++++++ -* **ShamrockCCDLegacy**: Shamrock series of spectrometer using the Andor CCD cameras (built using double inheritance), this - is a legacy plugin don't use it anymore -* **ShamrockSCMOSLegacy**: Shamrock series of spectrometer using the Andor SCMOS cameras (Not tested) - (built using double inheritance), this is a legacy plugin don't use it anymore -* **ShamrockCCD**: Shamrock series of spectrometer using the Andor CCD cameras - (built using CCD camera inheritance and Shamrock composition) +* **ShamrockCCDPll**: Shamrock series of spectrometer using the Andor CCD cameras * **ShamrockSCMOS**: Shamrock series of spectrometer using the Andor SCMOS cameras (Not tested) (built using SCMOS camera inheritance and Shamrock composition) +* **ShamrockSCMOSLegacy**: Shamrock series of spectrometer using the Andor SCMOS cameras (Not tested) + (built using double inheritance), this is a legacy plugin don't use it anymore Viewer2D ++++++++ -* **AndorCCD**: Andor CCD camera using the SDK2 +* **AndorCCDPll**: Andor CCD camera using the SDK2 through the pylablib driver * **AndorSCMOS**: Andor CCD camera using the SDK3 * **AndorSCMOSPll**: Andor CCD camera using the SDK3 through the pylablib driver (experimental but already in use, subject to changes) diff --git a/pyproject.toml b/pyproject.toml index 17770e0..79e15fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,16 +19,15 @@ dependencies = [ "pylablib", "opencv-python", "pymodaq-plugins-utils" - #todo: list here all dependencies your package may have ] authors = [ {name = "Weber Sébastien", email = 'sebastien.weber@cemes.fr'}, - #todo: list here all authors of your plugin + {name = "Guyot Tilly", email = 'tilly.guyot@umontpellier.fr'}, ] maintainers = [ {name = "Weber Sébastien", email = 'sebastien.weber@cemes.fr'}, - #todo: list here all maintainers of your plugin + {name = "Guyot Tilly", email = 'tilly.guyot@umontpellier.fr'}, ] # nottodo: leave everything below as is! diff --git a/src/pymodaq_plugins_andor/daq_move_plugins/daq_move_ShamrockPll.py b/src/pymodaq_plugins_andor/daq_move_plugins/daq_move_ShamrockPll.py index f21ff50..566c091 100644 --- a/src/pymodaq_plugins_andor/daq_move_plugins/daq_move_ShamrockPll.py +++ b/src/pymodaq_plugins_andor/daq_move_plugins/daq_move_ShamrockPll.py @@ -22,7 +22,7 @@ class DAQ_Move_ShamrockPll(DAQ_Move_base): is_multiaxes = False _axis_names: Union[List[str], Dict[str, int]] = ['Wavelength'] _controller_units: Union[str, List[str]] = ['nm'] - _epsilon: Union[float, List[float]] = 0.1 + _epsilons: Union[float, List[float]] = 0.1 data_actuator_type = DataActuatorType.DataActuator SPEC_NAMES = get_spectrometers() @@ -49,7 +49,7 @@ class DAQ_Move_ShamrockPll(DAQ_Move_base): {'title': 'Go to zero order:', 'name': 'zero_order', 'type': 'bool'}, ]}, ] - params = comon_parameters_fun(is_multiaxes, axis_names=_axis_names, epsilon=_epsilon) + spectro_params + params = comon_parameters_fun(is_multiaxes, axis_names=_axis_names, epsilon=_epsilons) + spectro_params def ini_attributes(self): @@ -175,8 +175,8 @@ def move_rel(self, value: DataActuator): ---------- value: (float) value of the relative target positioning """ - value = self.check_bound(self.current_position + value) - self.current_position - self.target_value = value + self.current_position + value = self.check_bound(self.current_value + value) - self.current_value + self.target_value = value + self.current_value target_value = self.set_position_relative_with_scaling(self.target_value) self.controller.set_wavelength(target_value.value('m')) diff --git a/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_1D/daq_1Dviewer_ShamrockCCDPll.py b/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_1D/daq_1Dviewer_ShamrockCCDPll.py index 9823fd8..bf6ef4b 100644 --- a/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_1D/daq_1Dviewer_ShamrockCCDPll.py +++ b/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_1D/daq_1Dviewer_ShamrockCCDPll.py @@ -201,7 +201,6 @@ def emit_data(self, frame: np.ndarray=None): if self.n_frames > 1: pass - # todo handle chunks of frames in ND data else: out_frames = out_frames[0, ...] diff --git a/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_1D/daq_1Dviewer_ShamrockSCMOSLegacy.py b/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_1D/daq_1Dviewer_ShamrockSCMOSLegacy.py index 9b9f2c5..426ef0a 100644 --- a/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_1D/daq_1Dviewer_ShamrockSCMOSLegacy.py +++ b/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_1D/daq_1Dviewer_ShamrockSCMOSLegacy.py @@ -10,6 +10,7 @@ from pymodaq_gui.parameter import utils as putils from pymodaq.utils.data import Axis, DataFromPlugins +from pymodaq.control_modules.viewer_utility_classes import main from ..plugins_2D.daq_2Dviewer_AndorSCMOS import DAQ_2DViewer_AndorSCMOS from pymodaq_plugins_andor.legacy.daq_move_Shamrock import DAQ_Move_Shamrock @@ -249,3 +250,5 @@ def emit_data(self, buffer_pointer): logger.exception(str(e)) +if __name__ == '__main__': + main(__file__, True) \ No newline at end of file diff --git a/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_2D/daq_2Dviewer_AndorCCDPll.py b/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_2D/daq_2Dviewer_AndorCCDPll.py index e6f11a0..a5c7b56 100644 --- a/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_2D/daq_2Dviewer_AndorCCDPll.py +++ b/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_2D/daq_2Dviewer_AndorCCDPll.py @@ -72,6 +72,7 @@ def names(cls): {'title': 'Current value:', 'name': 'current_value', 'type': 'float', 'value': 0, 'default': 0, 'readonly': True}, {'title': 'Status:', 'name': 'status', 'type': 'str', 'limits': [], 'readonly': True}, + {'title': 'Fan mode:', 'name': 'fan_mode', 'type': 'list', 'limits': ['full', 'low', 'off'], 'value': 'full'}, ]}, ] ) @@ -130,6 +131,9 @@ def commit_settings(self, param): if param.name() == 'set_point': self.controller.set_temperature(param.value()) + elif param.name() == 'fan_mode': + self.controller.set_fan_mode(param.value()) + elif param.name() == 'readout' or param.name() in iter_children( self.settings.child('readout_settings')): self.update_read_mode() @@ -280,10 +284,10 @@ def setup_temperature(self): self.settings.child('temperature_settings', 'set_point').setLimits((temp[0], temp[1])) enable = self.settings['temperature_settings', 'enable_cooling'] self.controller.set_temperature(self.settings['temperature_settings', 'set_point'], enable) + self.controller.set_fan_mode(self.settings['temperature_settings', 'fan_mode']) if not self.temperature_timer.isActive(): self.temperature_timer.start(2000) # Timer event fired every 2s - self.update_temperature() def update_temperature(self): diff --git a/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_2D/daq_2Dviewer_AndorSCMOS.py b/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_2D/daq_2Dviewer_AndorSCMOS.py index 59bbc7a..87fae64 100644 --- a/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_2D/daq_2Dviewer_AndorSCMOS.py +++ b/src/pymodaq_plugins_andor/daq_viewer_plugins/plugins_2D/daq_2Dviewer_AndorSCMOS.py @@ -53,6 +53,7 @@ class DAQ_2DViewer_AndorSCMOS(DAQ_Viewer_base): -------- utility_classes.DAQ_Viewer_base """ + supported_platforms = ('win32',) # the Andor SDK3 is loaded with ctypes.windll start_waitloop = QtCore.Signal(int, int) stop_waitloop = QtCore.Signal() @@ -396,9 +397,11 @@ def ini_detector(self, controller=None): daq_utils.ThreadCommand, hardware1D.DAQ_1DViewer_Picoscope.update_pico_settings """ model = self.settings.child('camera_settings', 'camera_model') - self.camera_controller = self.ini_detector_init(old_controller=controller, - new_controller=api.AndorCamera( - model.opts['limits'].index(model.value()))) + + if self.is_master: + self.camera_controller = api.AndorCamera(model.opts['limits'].index(model.value())) + else: + self.camera_controller = controller self.ini_camera() diff --git a/src/pymodaq_plugins_andor/hardware/andor_sdk3/sdk3.py b/src/pymodaq_plugins_andor/hardware/andor_sdk3/sdk3.py index d06eb97..7a32395 100644 --- a/src/pymodaq_plugins_andor/hardware/andor_sdk3/sdk3.py +++ b/src/pymodaq_plugins_andor/hardware/andor_sdk3/sdk3.py @@ -29,7 +29,7 @@ In Windows this is accomplished through Control Panel / System / Advanced System Settings / Environment Variables / System Variables and add to path: -C:\Program Files\Andor Driver Pack 3 +C:\\Program Files\\Andor Driver Pack 3 """ import sys import ctypes diff --git a/src/pymodaq_plugins_andor/hardware/andor_sdk2/__init__.py b/src/pymodaq_plugins_andor/legacy/__init__.py similarity index 100% rename from src/pymodaq_plugins_andor/hardware/andor_sdk2/__init__.py rename to src/pymodaq_plugins_andor/legacy/__init__.py diff --git a/src/pymodaq_plugins_andor/legacy/hardware/__init__.py b/src/pymodaq_plugins_andor/legacy/hardware/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/pymodaq_plugins_andor/legacy/hardware/andor_sdk2/__init__.py b/src/pymodaq_plugins_andor/legacy/hardware/andor_sdk2/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/pymodaq_plugins_andor/hardware/andor_sdk2/sdk2.py b/src/pymodaq_plugins_andor/legacy/hardware/andor_sdk2/sdk2.py similarity index 100% rename from src/pymodaq_plugins_andor/hardware/andor_sdk2/sdk2.py rename to src/pymodaq_plugins_andor/legacy/hardware/andor_sdk2/sdk2.py diff --git a/src/pymodaq_plugins_andor/hardware/shamrock_sdk.py b/src/pymodaq_plugins_andor/legacy/hardware/shamrock_sdk.py similarity index 100% rename from src/pymodaq_plugins_andor/hardware/shamrock_sdk.py rename to src/pymodaq_plugins_andor/legacy/hardware/shamrock_sdk.py