if __name__ == '__main__': import matplotlib.pyplot as mpl cooldown = 'G5C' path = 'D:\\Users\\Runs\\{0}\\Pulses\\'.format(cooldown) fileName = path + 'TES1_Pulses_20180301_121547.h5' #fileName = path+'TES1_Pulses_20180301_133923.h5' pulses = PulseImporter(fileName) print(pulses.tes) print(pulses.acquisition) print('Number of traces:', len(pulses)) print('Sample rate (decimated): {0} kS/s'.format(1E-3 * pulses.sampleRate)) print('Decimation: {0}'.format(pulses.acquisition.decimation)) tesId = pulses.tes.tesId from Analysis.G4C.MeasurementDatabase import obtainTes tes = obtainTes(cooldown, tesId) Rfb = 10E3 # This should be in the file, but currently isn't Rsq = tes.Rsquid(Rfb) pulses.iv.analyze(Rsq=Rsq, Rb=tes.Rbias, Rs=tes.Rshunt) print('TES bias point: Rtes=%.3f mOhm, Ites=%.3f uA, Ptes=%.3f pW' % (pulses.iv.RtesFinal * 1E3, pulses.iv.ItesFinal * 1E6, pulses.iv.PtesFinal * 1E12)) if False: fig, ax = mpl.subplots(3, 1, sharex=True) titles = ['Baseline', 'Template pulses', 'Test pulses'] for i, pulseSet in enumerate( [pulses.iBaseline, pulses.iTemplate, pulses.iTest]): for j in pulseSet[0:1]: trace = pulses[j] ax[i].plot(trace.t, trace.Vsquid, '-', label=str(trace))
tLast = timeStampFromString('20180226_115013') #Tmin = 0.062 tFirst = timeStampFromString('20180228_232115') tLast = timeStampFromString('20180228_232125') #fileName = 'TES1_IV_20180228_232117.h5' Tmin = 0.058 elif deviceId == 'TES2': tFirst = timeStampFromString('20171031_184923') tLast = timeStampFromString('20171101_095334') Tmin = 0.078 outputFile = '%s_AlphaMapsVsB.h5' % deviceId # fileNames = glob.glob(dataPath+'%s_IVvsT_*.h5' % deviceId) fileNames = glob.glob(dataPath + '%s_IV_*.h5' % deviceId) tes = obtainTes(cooldown, deviceId) deltaTmin = 3E-3 Istep = 0.5E-6 Vstep = 0.5E-9 Imin = 5E-6 Imax = 110E-6 nI = 1 + int((Imax - Imin) / Istep) Vmin = 1E-9 Vmax = 125E-9 nV = 1 + int((Vmax - Vmin) / Vstep) Vcoils = [] for fileName in fileNames: t = timeStampFromPath(fileName) if t < tFirst or t > tLast:
# -*- coding: utf-8 -*- """ Created on Wed Nov 01 17:36:06 2017 @author: wisp10 """ import h5py as hdf import matplotlib.pyplot as mpl from Analysis.Tes_IVMaps import AlphaMap from Analysis.G4C.MeasurementDatabase import obtainTes import numpy as np if __name__ == '__main__': deviceId = 'TES1' tes = obtainTes('G5C', deviceId) Rn = tes.Rnormal Rs = np.asarray([0.05, 0.15]) * Rn Ps = np.asarray([1E-12, 2E-12, 3E-12, 3.5E-12]) fileName = '%s_AlphaMapsVsB.h5' % deviceId #fileName = 'TES2_AlphaMapVcoil-0.450_2.h5' with hdf.File(fileName, 'r') as f: for key in f.keys(): g = f[key] Vcoil = g.attrs['Vcoil'] coilString = 'Vcoil=%+6.4f V' % Vcoil print(coilString) alphaMap = AlphaMap.fromHdf(g)