def restoreSettings(self):
     s = QSettings(OrganizationName, ProgramName)
     for w in self.settingsWidgets:
         ut.saveWidgetToSettings(s, w)
 def saveSettings(self):
     s = QSettings(OrganizationName, ProgramName)
     for w in self.settingsWidgets:
         ut.restoreWidgetFromSettings(s, w)
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 20 13:10:58 2015

@author: wisp10
"""

from PyQt4 import QtGui
from PyQt4.QtCore import QThread,QSettings,pyqtSignal
import numpy as np
import time
import LabWidgets.Utilities as ut
ut.compileUi('Ni4351_SingleChannelUi')
import Ni4351_SingleChannelUi as ui

try:
    from PyNi435x import Ni435x
except WindowsError, e:
    text = ("Windows was unable to load the NI-DAQ DLL: %s\n"
            "This could be because another program is using it. "
            "It is a single-process DLL therefore only one program may use it at a time.\n"
            "The work-around is to put all programs that need to use it into a single process. "
            "Try running from PyLegacyDaq_Combined.py instead!") % e
    print text
    app = QtGui.QApplication([])
    QtGui.QMessageBox.critical(None, "Unable to load NI-DAQ DLL", text)
    app.exec_()
    import sys
    sys.exit(1)

OrganizationName = 'McCammon X-ray Astro Physics'
Example #4
0
 def saveSettings(self):
     s = QSettings()
     for w in self.SettingsWidgets:
         ut.saveWidgetToSettings(s, w)
Example #5
0
 def restoreSettings(self):
     s = QSettings()
     for w in self.SettingsWidgets:
         ut.restoreWidgetFromSettings(s, w)
Example #6
0
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 24 16:47:13 2016

@author: wisp10
"""

import LabWidgets.Utilities as ut

ut.compileUi('TES_SelfFieldCancellationUi')
import TES_SelfFieldCancellationUi as ui

ProgramName = 'TES_SelfFieldCancellation'
OrganizationName = 'McCammon X-ray Astrophysics'

import PyQt4.QtGui as gui
from PyQt4.QtCore import pyqtSignal, QThread, QSettings
import DAQ.PyDaqMx as daq

import numpy as np
import time


def limit(V):
    return max(min(V, 10), -10)


class MsmThread(QThread):
    measurementAvailable = pyqtSignal(
        float, float, float, float, float, float,
        float)  #(t, Vbias, Vcoil, Vo, Vsq, Ites, Rtes)
Example #7
0
                        if end > l:  # Payload incomplete
                            break
                        pl = str(data[start:end])
                        self.processPayload(pl)
                        k = end
                for i in range(50):
                    self.msleep(100)
                    if self.stopRequested:
                        break

        except Exception, e:
            print "Exception:", e


import LabWidgets.Utilities as ut
ui = ut.compileAndImportUi('ApcUpsWidget')
ProgramName = 'APC UPS'
OrganizationName = 'McCammon X-ray Astrophysics'

import time
import os
import pyqtgraph as pg


class ApcUpsWidget(ui.Ui_Form, QtGui.QWidget):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.setupUi(self)
        self.quitPb.clicked.connect(self.close)
        self.clearData()
        self.plotCombo.currentIndexChanged.connect(self.updatePlot)