hdfFile.attrs['aiChannel'] = str(aiChannel.physicalChannel) hdfFile.attrs['Ts'] = baseTs hkGroup = hdfFile.require_group('HK') hkSub = HousekeepingSubscriber() hkSub.start() hkLogger = HkLogger(hkGroup, hkSub) osr = OpenSquidRemote(port=7894, origin=origin) squid = Pfl102Remote(osr, device) squid.setFeedbackR(100E3) squid.setFeedbackC(1.5E-9) x = tuneStage1OutputToZero(squid, aiChannel) adr = Adr(app) from DAQ.AiSpectrumAnalyzerRemote import AiSpectrumAnalyzerRemote sa = AiSpectrumAnalyzerRemote('test') sa.setSampleRate(2E6) sa.setMaxCount(300) sa.setRefreshTime(0.1) for baseTindex, baseT in enumerate(baseTs): print('Ramping to %fK' % baseT) rampRate = min(10, max(0.3, 1E3 * abs(adr.T - baseT) / 1.5)) print('Ramp rate:', rampRate) adr.setRampRate(rampRate) adr.rampTo(baseT) adr.stabilizeTemperature(baseT)
import numpy as np from PyQt4.QtCore import QCoreApplication from TES import IvCurveDaqRemote from Adr import Adr Thigh = 0.085 Tlow = 0.060 #Vcoils = np.asarray([-0.4,-0.3,-0.2,-0.1,0.1]) #Vcoils = np.asarray([-1.0, -0.9, -0.8, -0.7, -0.6, -0.5]) Vstep = 0.05 Vcoils = np.arange(3.35, 4.+Vstep, Vstep) rampRateDown = -0.5 # Slow rampRateUp = +4.0 # Fast app = QCoreApplication([]) adr = Adr(app) ivRemote = IvCurveDaqRemote.IvCurveDaqRemote('TesIvVsTramp_Bstep') print(ivRemote.auxAoVoltage()) for Vcoil in Vcoils: print('Now going for Vcoil=', Vcoil) adr.setRampRate(rampRateUp) adr.rampTo(Thigh) print('Ramping up...') adr.stabilizeTemperature(Thigh) print('Stable.') time.sleep(30) adr.setRampRate(rampRateDown) ivRemote.setAuxAoVoltage(Vcoil) print('Starting measurement.') ivRemote.start()
origin = 'Tes_MapTransferAndNoise' biasChannel = daq.AoChannel('USB6361/%s' % 'ao0', -5, +5) acBiasChannel = daq.AoChannel('USB6361/%s' % 'ao1', -5, +5) pflChannel = daq.AiChannel('USB6361/%s' % pflChannelId, -5, +5) tes = obtainTes(cooldown, deviceId) tesDev = Tes(tes.Rbias, biasChannel, fieldChannel=None, pflChannel=pflChannel) tesDev.setBias(0) IbiasNormal = 4.5 / tes.Rbias coil = FieldCoil() app = QApplication([]) adr = Adr(app) ivRemote = IvCurveDaqRemote('TesIcVsB') osr = OpenSquidRemote(port=7894, origin=origin) squid = Pfl102Remote(osr, deviceId) with hdf.File(outputFileName, mode='a') as f: a = f.attrs a['program'] = 'Tes_MapTransferAndNoise.py' a['time'] = time.time() a['localTime'] = startTimeString a['biasPointFileName'] = biasPointFileName a['TbaseGoal'] = df.Tbase.values a['VbiasGoal'] = df.Vbias.values a['PTesGoal'] = df.Ptes.values a['doBeta'] = df.betaSweep.values
#logger.addHandler(ch) app = QApplication([]) aiChannel = daq.AiChannel('USB6361/ai7', -10, +10) osr = OpenSquidRemote(port=7894, origin='NoiseVsBiasAndTemperature') device = 'TES2' squid = Pfl102Remote(osr, device) squid.setFeedbackR(100E3) squid.setFeedbackC(15E-9) x = tuneStage1OutputToZero(squid, aiChannel) print(x) print(squid.report()) print(squid.stage1OffsetCurrent()) adr = Adr(app) #Rbias = 1697.5 # TES 1 Rbias = 1601.7 # TES 2 tes = Tes(Rbias, biasChannel=daq.AoChannel('USB6361/ao0', -5, +5)) Vcoil = -0.167 # For TES2 coilChannel = daq.AoChannel('USB6361/ao1', -5, +5) taskCoil = daq.AoTask('coilTask') taskCoil.addChannel(coilChannel) logger.info('Applying Vcoil=%.5f V' % Vcoil) taskCoil.writeData([Vcoil], autoStart=True) taskCoil.stop() taskCoil.clear()
# tes.setBias(100E-6) time.sleep(5) # tes.rampBias(0) #time.sleep(5) #tes.rampBias(100E-6) #coil = FieldCoil() #print('Vout=', coil.Vout) #print('Measured:', coil.measureOutput(1000)) # coil.rampBias(-5) #print('Measured:', coil.measureOutput(1000)) #coil.rampBias(-0.05) if False: # Testing code for beta-sweep from Adr import Adr app = QApplication([]) adr = Adr(app) aiChannelId = 'AI2' aoChannelId = 'AO0' biasChannel = daq.AoChannel('USB6361/%s' % aoChannelId, -5,+5) pflChannel = daq.AiChannel('USB6361/%s' % aiChannelId, -5,+5) pflChannel.setTerminalConfiguration(daq.AiChannel.TerminalConfiguration.DIFF) tes = Tes(6.0E3, biasChannel, fieldChannel = None, pflChannel = pflChannel) #tes.setBias(0) time.sleep(5) #tes.rampBias(100E-6) # adr.setRampRate(0.5) # app.processEvents() # Tmid = 0.078 # fileName = 'testRamp.txt'
@author: wisp10 """ from __future__ import print_function import time import numpy as np from PyQt4.QtCore import QCoreApplication from TES.IvCurveDaqRemote import IvCurveDaqRemote from Adr import Adr import logging logging.basicConfig(level=logging.WARN) app = QCoreApplication([]) adr = Adr(app) ivRemote = IvCurveDaqRemote('TesIcVsB') print(ivRemote.auxAoVoltage()) #Vcoils = np.hstack([np.arange(-5, -1, 0.05), np.arange(-1,1, 0.01), np.arange(1, 5, 0.05)]) #stepSize=0.01 #Vcoils = np.arange(-2, +2+stepSize, stepSize) #stepSize=0.1 #Vcoils = np.arange(-2,7+stepSize, stepSize) center = 3.5 centerSpan = 2. centerStep = 0.02 fullStep = 0.1 fullSpan = 5.
from PyQt4.QtCore import QCoreApplication from OpenSQUID.OpenSquidRemote import OpenSquidRemote, Pfl102Remote from TES import IvCurveDaqRemote from Adr import Adr device = 'TES2' Rb = 6.8735E3 Ibiases = np.asarray([150E-6, -150E-6, 200E-6, -200E-6]) #Ibiases = np.asarray([-400E-6]) Vbiases = Ibiases * Rb Thigh = 0.085 Tlow = 0.065 app = QCoreApplication([]) adr = Adr(app) ivRemote = IvCurveDaqRemote.IvCurveDaqRemote('TesIcVsB') print(ivRemote.auxAoVoltage()) osr = OpenSquidRemote(port=7894) pfl = Pfl102Remote(osr, device) def waitForSweeps(remote, n=1): count = ivRemote.sweepCount() newCount = 0 while newCount < count + n: time.sleep(1) app.processEvents() newCount = ivRemote.sweepCount()
sa = AiSpectrumAnalyzerRemote(origin) sa.setSampleRate(2E6) sa.setMaxCount(400) sa.setRefreshTime(0.1) sa.setAiChannel(pflChannelId) ssd = SineSweepDaqRemote(origin) ssd.setSampleName(deviceId) ivRemote = IvCurveDaqRemote(origin) osr = OpenSquidRemote(port=7894, origin=origin) squid = Pfl102Remote(osr, deviceId) app = QApplication([]) adr = Adr(app) coil = FieldCoil() coil.rampBias(-5) def collectIvSweeps(count): ivRemote.start() print('Recording IV curve', end='') wait(10) while True: wait(1) print('.', end='') if ivRemote.sweepCount() >= count: print('Enough sweeps.') break