Example #1
0
import pyqtgraph.parametertree.parameterTypes as pTypes
from pyqtgraph.parametertree import Parameter, ParameterTree
import pymodaq.daq_utils.custom_parameter_tree as custom_tree  # to be placed after importing Parameter
from pyqtgraph.parametertree.Parameter import registerParameterType

from pymodaq.daq_move.daq_move_main import DAQ_Move
from pymodaq_plugins import daq_move_plugins as movehardware
from pymodaq.daq_viewer.daq_viewer_main import DAQ_Viewer
from pymodaq_plugins.daq_viewer_plugins import plugins_2D, plugins_1D, plugins_0D
from pymodaq.daq_utils.daq_utils import get_set_pid_path, select_file, make_enum
from pymodaq.daq_utils.h5saver import H5Saver
import importlib
from pymodaq.daq_utils.pid.pid_params import params as pid_params

DAQ_Move_Stage_type = make_enum('daq_move')
DAQ_0DViewer_Det_type = make_enum('daq_0Dviewer')
DAQ_1DViewer_Det_type = make_enum('daq_1Dviewer')
DAQ_2DViewer_Det_type = make_enum('daq_2Dviewer')


class PresetScalableGroupMove(pTypes.GroupParameter):
    """
        |

        ================ =============
        **Attributes**    **Type**
        *opts*            dictionnary
        ================ =============

        See Also
Example #2
0
import os
from pyqtgraph.parametertree import Parameter
from PyQt5 import QtWidgets
from PyQt5.QtCore import pyqtSignal, QThread, QTimer, pyqtSlot
from pyqtgraph.dockarea import Dock
from pymodaq.daq_utils.daq_utils import ThreadCommand, make_enum, linspace_step, get_set_pid_path
from ..utils import PIDModelGeneric, check_modules
from pymodaq.daq_utils.plotting.viewer1D.viewer1D_main import Viewer1D
from pymodaq.daq_utils.math_utils import LSqEllipse
import time
import numpy as np
from collections import OrderedDict
from scipy.optimize import curve_fit
DAQ_Viewer_Det_type=make_enum('daq_0Dviewer')
DAQ_Move_Stage_type=make_enum('daq_move')

class PIDModelMichelsonDemo(PIDModelGeneric):
    params = [
        {'title': 'Stabilization', 'name': 'stabilization', 'type': 'group', 'children': [
            {'title': 'Set as zero:', 'name': 'set_zero', 'type': 'bool', 'value': False},
            {'title': 'Laser wavelength (nm):', 'name': 'laser_wl', 'type': 'float', 'value': 632.0},
            {'title': 'Interfero phase (deg):', 'name': 'interfero_phase', 'type': 'float', 'value': 0},
            {'title': 'Interfero position (nm):', 'name': 'interfero_position', 'type': 'float', 'value': 0},
            {'title': 'phase sign:', 'name': 'phase_sign', 'type': 'int', 'value': 1, 'min': -1, 'max': 1, 'step': 2},
            {'title': 'Offsets', 'name': 'offsets', 'type': 'group', 'children': [
                {'title': 'Phase offset (deg):', 'name': 'phase_offset', 'type': 'float', 'value': 0},
                {'title': 'Interfero (nm):', 'name': 'interfero_offset', 'type': 'float', 'value': 0},
                {'title': 'Piezo (nm):', 'name': 'piezo_offset', 'type': 'float', 'value': 0},
            ]},
        ]},
        {'title': 'Calibration', 'name': 'calibration', 'type': 'group', 'expanded': True, 'visible': True, 'children': [
Example #3
0
def test_make_enum(mod_type):
    enum_names = utils.make_enum(mod_type).names(mod_type)
    assert 'Mock' in enum_names
Example #4
0
from pymodaq.daq_move import utility_classes
#check for plugins to be added to the DAQ_Move_Stage_type enum
#must be loaded to register proper custom parameter types
from pyqtgraph.parametertree import Parameter, ParameterTree
import pyqtgraph.parametertree.parameterTypes as pTypes
import pymodaq.daq_utils.custom_parameter_tree as custom_tree
from pymodaq.daq_utils.daq_utils import ThreadCommand, make_enum, getLineInfo
from easydict import EasyDict as edict
from pymodaq.daq_utils.tcp_server_client import TCPClient
from pymodaq.daq_utils.daq_utils import get_set_local_dir

local_path = get_set_local_dir()
sys.path.append(local_path)
import pymodaq_plugins.daq_move_plugins as plugins

DAQ_Move_Stage_type = make_enum('daq_move')


class DAQ_Move(Ui_Form, QObject):
    """
        | DAQ_Move object is a module used to control one motor from a specified list.
        |
        | Preset is an optional list of dicts used to preset programatically settings such as the name of the controller from the list of possible controllers, COM address...
        |
        | Init is a boolean to tell the programm to initialize the controller at the start of the programm given the preset options

        ========================= =================================================
        **Attributes**             **Type**
        *command_stage*            instance of pyqtSignal
        *move_done_signal*         instance of pyqtSignal
        *update_settings_signal*   instance of pyqtSignal
Example #5
0
from pymodaq.daq_utils.plotting.viewer1D.viewer1D_main import Viewer1D
from pymodaq.daq_utils.plotting.viewer2D.viewer2D_main import Viewer2D
from pymodaq.daq_utils.plotting.viewerND.viewerND_main import ViewerND
from pymodaq.daq_utils.scanner import Scanner
from pymodaq.daq_utils.plotting.navigator import Navigator
from pymodaq.daq_utils.tcp_server_client import TCPClient
from pymodaq.daq_utils.plotting.lcd import LCD
import pymodaq.daq_utils.daq_utils as daq_utils
from pymodaq.daq_utils.h5browser import browse_data
from pymodaq.daq_utils.daq_utils import ThreadCommand, make_enum, getLineInfo

from pymodaq_plugins.daq_viewer_plugins import plugins_0D
from pymodaq_plugins.daq_viewer_plugins import plugins_1D
from pymodaq_plugins.daq_viewer_plugins import plugins_2D

DAQ_0DViewer_Det_type = make_enum('daq_0Dviewer')
DAQ_1DViewer_Det_type = make_enum('daq_1Dviewer')
DAQ_2DViewer_Det_type = make_enum('daq_2Dviewer')

from collections import OrderedDict
import numpy as np

from pyqtgraph.parametertree import Parameter, ParameterTree
import pyqtgraph.parametertree.parameterTypes as pTypes
import pymodaq.daq_utils.custom_parameter_tree as custom_tree
import os
from easydict import EasyDict as edict

from pymodaq.daq_utils.daq_utils import DockArea
from pyqtgraph.dockarea import Dock
import pickle