# -*- 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'
# -*- 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)