Beispiel #1
0
from collections import OrderedDict
from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot, QEvent, QBuffer, QIODevice, QLocale, Qt, QVariant, QModelIndex
from PyQt5 import QtGui, QtWidgets, QtCore
import numpy as np
from pathlib import Path
from pyqtgraph.dockarea.DockArea import DockArea, TempAreaWindow

from pymodaq.daq_utils import daq_utils as utils

from pyqtgraph.parametertree import Parameter

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

dashboard_submodules_params = [
    {
        'title': 'Save 2D datas and above:',
        'name': 'save_2D',
        'type': 'bool',
        'value': True
    },
    {
        'title':
        'Save raw datas only:',
        'name':
        'save_raw_only',
        'type':
        'bool',
        'value':
        True,
        'tooltip':
        'if True, will not save extracted ROIs used to do live plotting, only raw datas will be saved'
from pymodaq.daq_utils.plotting.qled import QLED
from pymodaq.daq_utils.managers.preset_manager import PresetManager
from pyqtgraph.dockarea import Dock

from pymodaq.daq_utils.daq_utils import ThreadCommand, set_param_from_param, getLineInfo, set_logger, get_module_name, get_set_pid_path
import importlib
from simple_pid import PID
import time
import datetime
from pymodaq.daq_viewer.daq_viewer_main import DAQ_Viewer
from pymodaq.daq_move.daq_move_main import DAQ_Move
import numpy as np
from collections import OrderedDict
from pymodaq.daq_utils.pid.pid_params import params

logger = set_logger(get_module_name(__file__), __name__ == '__main__')

class DAQ_PID(QObject):
    """
    """
    log_signal = pyqtSignal(str)
    #look for eventual model files
    command_pid = pyqtSignal(ThreadCommand)
    command_stage = pyqtSignal(ThreadCommand)
    move_done_signal = pyqtSignal(str, float)

    models = []
    try:
        model_mod = importlib.import_module('pymodaq_pid_models')
        for ind_file, entry in enumerate(os.scandir(os.path.join(model_mod.__path__[0], 'models'))):
            if not entry.is_dir() and entry.name != '__init__.py':
Beispiel #3
0
import numpy
import numpy as np
from PyQt5 import QtWidgets, QtGui
from PyQt5.QtCore import QObject, pyqtSignal
from pyqtgraph import LinearRegionItem

from pymodaq.daq_utils.daq_utils import ftAxis_time, ft, find_index, gauss1D, ift, set_logger, get_module_name
from pymodaq.daq_utils.plotting.viewer1D.viewer1Dbasic import Viewer1DBasic

logger = set_logger(get_module_name(__file__))


class FourierFilterer(QObject):
    filter_changed = pyqtSignal(dict)

    def __init__(self, parent=None):
        super(FourierFilterer, self).__init__()
        if parent is None:
            parent = QtWidgets.QWidget()

        self.parent = parent

        self.raw_data = None
        self.data = None
        self.data_fft = None
        self.filter = None
        self.xaxis = None
        self.yaxis = None
        self.xaxisft = None
        self.yaxisft = None
Beispiel #4
0
 def test_get_module_name(self):
     config_path = pymodaq.daq_utils.config.get_set_config_path()
     assert utils.get_module_name(config_path) == 'config'