예제 #1
0
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui, uic
import numpy as np
import sys
import os

from TOFAcqDigitizer import TOFAcqDigitizer as TAQD

from ctypes import *

from datetime import datetime
## Define main window class from template
#path = os.path.dirname(os.path.abspath(__file__))
#uiFile = os.path.join(path, 'designerExample.ui')
#WindowTemplate, TemplateBaseClass = pg.Qt.loadUiType(uiFile)
Ui_MainWindow, QtBaseClass = uic.loadUiType('TAQD_GUI.ui')

## Make the layout
dt = datetime
thislogfilename='%i%s%s_%s%s%s.log' % (dt.today().year,str(dt.today().month).zfill(2),str(dt.today().day).zfill(2), \
                                        str(dt.today().hour).zfill(2), \
                                        str(dt.today().minute).zfill(2), \
                                        str(dt.today().second).zfill(2))

f = open(thislogfilename, 'w')


class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
    def __init__(self):

        # Load an instance of the Digitizer control object
예제 #2
0
        }[typ]
        self.addChild(dict(name="w%d" % (len(self.childs)+1), type=typ, value=val, removable=True, renamable=True))


registerParameterType('weight_group', WeightParamGroup, override = True)


def generate_arr(array):
    sign, nelem = array
    a = np.empty(nelem)
    a.fill(sign)
    return a



mainViewBase, mainViewForm = uic.loadUiType("RTS_main_view.ui")
class RTSmainView(mainViewBase,mainViewForm):
    def __init__(self, parent = None):
        super().__init__()
        self.params_filename = "params.dat"
        self.loaded_data = None
        self.parameters = None
        self.setupUi()
        self.setupParameterTree()
        #self.timetrace_filename = ""
        settings = QtCore.QSettings("foo","foo")
        self.timetrace_filename = settings.value('filename', type=str)#.toString()
        if self.timetrace_filename:
            self.load_data(self.timetrace_filename)

    def setupUi(self):
예제 #3
0
import pylsl
from stream_receiver import StreamReceiver
import q_common as qc

# CNBI Loop
#import pylpttrigger
#import BCI

# DEBUG
#counter= 0

# path = "/usr/share/eeg_scope/"
path = "./"

# Load GUI. Designed with QT Creator, feel free to change stuff
form_class = uic.loadUiType(path + "mainwindow.ui")[0]


class Scope(QtGui.QMainWindow, form_class):
    def __init__(self, amp_name, amp_serial):
        super(Scope, self).__init__()
        self.amp_name = amp_name
        self.amp_serial = amp_serial
        self.init_scope()

    #
    # 	Main init function
    #
    def init_scope(self):

        # pg.setConfigOption('background', 'w')
예제 #4
0
from pyqtgraph.Qt import QtGui, QtCore, uic
#from PyQt4 import uic
import numpy as np 
import pyqtgraph as pg 
import sys
import serial
qtCreatorFile = "osciloscopio.ui" #Importo el archivo de designer

Ui_MainWindow, QtBaseClass = uic.loadUiType(qtCreatorFile)

	
s = serial.Serial('COM8')
s.baudrate = 115200
s.set_buffer_size(rx_size = 12800)

def serial():	
	channel1 = []
	channel2 = []
	channeld1 = []
	channeld2 = []
	ndatos = 200
	i = 0

	byte1 = s.read(1) #Lee un byte
	while byte1 > b'\x80': #Si el byte comienza por 0, vuelve a leer
		byte1 = s.read(1) 
	datos = s.read(799) #Si comienza por 1, lee el resto de los datos
	
	channel1.append(((ord(byte1) << 6)|(datos[0] & 63))/1024)

	for i in range(200): #Decodificacion
예제 #5
0
import traceback
import subprocess
import numpy as np
import pyqtgraph as pg
import pycnbi
import pycnbi.utils.q_common as qc
import pycnbi.utils.pycnbi_utils as pu
from scipy.signal import butter, lfilter, lfiltic, buttord
from pycnbi.stream_receiver.stream_receiver import StreamReceiver
from pycnbi import logger
from pyqtgraph.Qt import QtCore, QtGui, uic
from configparser import RawConfigParser
from builtins import input

# Load GUI. Designed with QT Creator, feel free to change stuff
form_class = uic.loadUiType("./mainwindow.ui")[0]


class Scope(QtGui.QMainWindow, form_class):
    def __init__(self, amp_name, amp_serial):
        super(Scope, self).__init__()
        self.amp_name = amp_name
        self.amp_serial = amp_serial
        self.init_scope()

    #
    # 	Main init function
    #
    def init_scope(self):

        # pg.setConfigOption('background', 'w')
예제 #6
0
#!/usr/local/bin/python3.7
import sys
import numpy as np
import pyqtgraph as pg
# import pyqtgraph.opengl as gl
from pyqtgraph.Qt import QtCore, QtGui ,QtWidgets, uic
from Graphs.Surface3D_Graph import Surface3D_Graph
from queue import Queue
uifilename = 'main_window.ui'
form_class = uic.loadUiType(uifilename)[0] #dirty reading of the ui file. better to convert it to a '.py'

# from lms_test import *
from lms3d import *

from ptz import *

from object_recognize import *
import pcl

# import asyncio
# from quamash import QEventLoop

# from pymodbus.server.asyncio import StartTcpServer
from pymodbus.server.asynchronous import StartTcpServer
from pymodbus.server.asyncio import StartUdpServer
from pymodbus.server.asyncio import StartSerialServer

from pymodbus.device import ModbusDeviceIdentification
from pymodbus.datastore import ModbusSequentialDataBlock, ModbusSparseDataBlock
from pymodbus.datastore import ModbusSlaveContext, ModbusServerContext
예제 #7
0
import os

#from VMIAcqFramegrabber import VMIAcqFramegrabber as VAQD

from ctypes import *
import VMIcrtl_ext

sys.path.append('../../VMIAccumulation')
from VMITraceProcessing import VMITraceProcessing

from datetime import datetime
## Define main window class from template
#path = os.path.dirname(os.path.abspath(__file__))
#uiFile = os.path.join(path, 'designerExample.ui')
#WindowTemplate, TemplateBaseClass = pg.Qt.loadUiType(uiFile)
Ui_MainWindow, QtBaseClass = uic.loadUiType('VAQFG_GUI.ui')

## Make the layout
dt=datetime
thislogfilename='%i%s%s_%s%s%s.log' % (dt.today().year,str(dt.today().month).zfill(2),str(dt.today().day).zfill(2), \
                                        str(dt.today().hour).zfill(2), \
                                        str(dt.today().minute).zfill(2), \
                                        str(dt.today().second).zfill(2))

f=open(thislogfilename,'w')


class MainWindow(QtGui.QMainWindow, Ui_MainWindow):

#%%
    def __init__(self):