예제 #1
0
    def __init__(self, conf_path=None):
        super().__init__()

        self.config_path = utils.get_set_local_dir().joinpath('config.toml')
        config = utils.load_config(self.config_path)

        params = [{'title': 'Config path', 'name': 'config_path', 'type': 'str', 'value': str(self.config_path),
                   'readonly': True}]
        params.extend(self.dict_to_param(config))

        self.settings = Parameter.create(title='settings', name='settings', type='group', children=params)
        self.settings_tree = ParameterTree()
        self.settings_tree.setParameters(self.settings, showTop=False)
예제 #2
0
def test_get_set_pid_path():
    local_path = utils.get_set_local_dir()
    pid_path = utils.get_set_pid_path()
    assert Path(pid_path) == Path(local_path).joinpath('pid_configs')
    assert Path(pid_path).is_dir()
예제 #3
0
def test_get_set_log_path():
    local_path = utils.get_set_local_dir()
    log_path = utils.get_set_log_path()
    assert Path(log_path) == Path(local_path).joinpath('log')
    assert Path(log_path).is_dir()
예제 #4
0
def test_get_set_local_dir():
    local_path = utils.get_set_local_dir()
    assert Path(local_path).is_dir()
예제 #5
0
from collections import OrderedDict
import numpy as np
import tables

from pyqtgraph.dockarea import Dock, DockArea
from pyqtgraph.parametertree import Parameter, ParameterTree
from pyqtgraph import HistogramLUTWidget
import pymodaq.daq_utils.custom_parameter_tree as custom_tree  # to be placed after importing Parameter
from pymodaq.daq_utils.plotting.viewer2D.viewer2D_basic import Viewer2DBasic
from pymodaq.daq_utils.plotting.graph_items import ImageItem, TriangulationItem
from pymodaq.daq_utils import daq_utils as utils
from pymodaq.daq_utils.h5modules import H5Saver, browse_data, H5BrowserUtil
from pymodaq.daq_utils import gui_utils as gutils

from pymodaq.daq_utils.daq_utils import get_set_local_dir
local_path = get_set_local_dir()
navigator_path = os.path.join(local_path, 'navigator_temp_files')
if not os.path.isdir(navigator_path):
    os.makedirs(navigator_path)

logger = utils.set_logger(utils.get_module_name(__file__))

Ntick = 128
colors_red = np.array([(int(r), 0, 0) for r in np.linspace(0, 255, Ntick)])
colors_green = np.array([(0, int(g), 0) for g in np.linspace(0, 255, Ntick)])
colors_blue = np.array([(0, 0, int(b)) for b in np.linspace(0, 255, Ntick)])


class Navigator(QObject):
    log_signal = pyqtSignal(str)
    sig_double_clicked = pyqtSignal(float, float)
예제 #6
0
from pymodaq.daq_move.utility_classes import params as daq_move_params
from pathlib import Path

from pyqtgraph.parametertree import Parameter, ParameterTree
from pymodaq.daq_utils.parameter import ioxml
from pymodaq.daq_utils.parameter import utils as putils

# must be imported to register proper custom parameter types
from pymodaq.daq_utils.parameter import pymodaq_ptypes

from pymodaq.daq_utils.daq_utils import ThreadCommand
from easydict import EasyDict as edict
from pymodaq.daq_utils.tcp_server_client import TCPClient
from pymodaq.daq_utils import daq_utils as utils

local_path = utils.get_set_local_dir()
sys.path.append(local_path)

logger = utils.set_logger(utils.get_module_name(__file__))

DAQ_Move_Stage_type = utils.get_plugins('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 managers 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 managers options