; $Id: diagdump24.pro,v 0.1 2003/01/31 15:00:00 dkelly Exp $ ; ;+ ; NAME: ; DIAGDUMP24_IOC ; ; PURPOSE: ; This routine reads in the binary diagnostic dump data collected ; during a 24um thermal anneal and produces a set of four temperature ; plots and a file listing minimum and maximum temperatures. ; ; CATEGORY: ; MIPS utilities. ; ; CALLING SEQUENCE: ; diagdump24_ioc, filename, ps=ps, ascii=ascii ; ; INPUTS: ; filename: Name of the diagnostic dump file ; (e.g. ce_2003-070T23.28.28.430_0_0_0) ; ; KEYWORD PARAMETERS: ; PS: Writes to the output file filename.ps rather than to X. ; ASCII: Writes the data in engineering units to filename.txt ; ; OUTPUTS: ; Table of temperature minima and maxima: filename.Temps ; Postscript file filename.ps created if ps flag is set. ; ASCII text file filename.txt created if ascii flag is set ; ; OPTIONAL OUTPUTS: ; ; ; MODIFICATION HISTORY: ; Written by: Doug Kelly (April 16, 2003) ; ; This CECOLDIAG command includes ten telemetry items in the following order: ; D24TmpA ; D24TmpB ; D160TmpA ; D24AnnealCur ; D70TmpA ; D160JnctTmp ; D70BaseTmp ; D160BaseTmp ; D160StimTmp ; CSMMTmp ; ;- ; ---------------------------------------------------------------------- ; Attempt to fit the 24um temperature profiles (not very successful) ; FUNCTION tprofile, X, A ; RETURN, [ [A[0] + A[1] - A[1]*exp(A[2]*X)], $ ; [1.0], [1 - exp(A[2]*X)], [-A[1]*X*exp(A[2]*X)] ] ; END PRO diagdump24_ioc,filename,ps=ps,ascii=ascii ; system variables for rainbow+white on a white background !p.background=255 !p.color=0 loadct,39 ; configure to put four plots on one page, 2 columns x 2 rows !p.multi = [0,2,2,0,1] ; read in the data anneal_DN = read_binary(filename,data_start=1100,data_dims=[12,160], $ data_type=12,endian="big") size_cube = size(anneal_DN) anneal_EU = fltarr(size_cube[1],size_cube[2]) ; If desired, set output to postscript file if (keyword_set(ps)) then begin psland, fname=filename+'.ps', wide=10.5, high=7.5 endif ; If desired, write output file if (keyword_set(ascii)) then begin openw,unit1,filename+'.txt',/get_lun printf,unit1,anneal_DN, format='(12(I5,3x))' free_lun,unit1 endif ; interpolate temperatures and plot temperatures ; D24TmpA and D24TmpB in upper left plot D24TmpA_DN = [36227, 36714, 37104, 37705, 38227, 38899, 39807, 40743, $ 41562, 42625, 44066, 45657, 47918, 50370, 53273, 57561] D24TmpA_EU = [26, 22, 19.5, 16.5, 14.5, 12.5, 10.5, 9, 8, 7, 6, 5.2, 4.4, $ 3.8, 3.3, 2.8] D24TmpA_Interp = spl_init (D24TmpA_DN, D24TmpA_EU) anneal_EU[0,*] = spl_interp (D24TmpA_DN, D24TmpA_EU, D24TmpA_Interp, $ anneal_DN[0,*]) MaxT_24A = Max(anneal_EU[0,*], min=MinT_24A) dT_24A = MaxT_24A - MinT_24A ; unsuccessful attempt at fitting the D24TmpA temperature profile ; x = findgen(108) ; A = [5.0,20.0,-0.15] ; PFit = LMFIT(x,anneal_EU[5,32:139],A,/DOUBLE, FUNCTION_NAME='tprofile') ; print, 'Fit parameters: ', A plot, findgen(160), anneal_EU[0,*], yrange=[2,26], xtitle='Time (sec)', $ ytitle='Temperature (K)', title='24um Thermal Anneal:', $ charsize=1.3, color=0,/nodata oplot, findgen(160), anneal_EU[0,*], color=10 ; oplot, x+32, PFit, PSym=6, color=128 xyouts, 15, 24, 'D24TmpA', color=10 D24TmpB_DN = [36002, 36482, 36869, 37473, 38001, 38688, 39627, 40607, $ 41472, 42602, 44153, 45890, 48393, 51148, 54458, 59420] D24TmpB_EU = [26, 22, 19.5, 16.5, 14.5, 12.5, 10.5, 9, 8, 7, 6, 5.2, 4.4, $ 3.8, 3.3, 2.8] D24TmpB_Interp = spl_init (D24TmpB_DN, D24TmpB_EU) anneal_EU[1,*] = spl_interp (D24TmpB_DN, D24TmpB_EU, D24TmpB_Interp, $ anneal_DN[1,*]) MaxT_24B = Max(anneal_EU[1,*], min=MinT_24B) dT_24B = MaxT_24B - MinT_24B oplot, findgen(160), anneal_EU[1,*], color=232 xyouts, 15, 23, 'D24TmpB', color=232 ; D160BaseTmp, D70BaseTmp, D160StimTmp, and CSMMTmp in lower left plot D160BaseTmp_DN = [33266, 33475, 33641, 33876, 34244, 34524, 34785, 35119, $ 35572, 36218, 37206, 38879, 40219, 42200, 45342, 47668] D160BaseTmp_EU = [10, 8, 7, 6, 5, 4.4, 4, 3.6, 3.2, 2.8, 2.4, 2, 1.8, 1.6, $ 1.4, 1.3] D160BaseTmp_Interp = spl_init (D160BaseTmp_DN, D160BaseTmp_EU) anneal_EU[7,*] = spl_interp (D160BaseTmp_DN, D160BaseTmp_EU, $ D160BaseTmp_Interp, anneal_DN[7,*]) MaxT_160Base = Max(anneal_EU[7,*], min=MinT_160Base) dT_160Base = MaxT_160Base - MinT_160Base plot, findgen(160), anneal_EU[7,*], $ yrange=[(MinT_160Base-0.18),(MaxT_160Base+0.05)], $ xtitle='Time (sec)', ytitle='Temperature (K)', $ charsize=1.3, color=0,/nodata oplot, findgen(160), anneal_EU[7,*], color=82 xyouts, 15, (MaxT_160Base+0.03), 'D160BaseTmp', color=82 D70BaseTmp_DN = [33175, 33343, 33475, 33661, 33938, 34179, 34390, 34665, $ 35041, 35582, 36421, 37862, 39031, 40770, 43543, 45600] D70BaseTmp_EU = [10, 8, 7, 6, 5, 4.4, 4, 3.6, 3.2, 2.8, 2.4, 2, 1.8, 1.6, $ 1.4, 1.3] D70BaseTmp_Interp = spl_init (D70BaseTmp_DN, D70BaseTmp_EU) anneal_EU[6,*] = spl_interp (D70BaseTmp_DN, D70BaseTmp_EU, $ D70BaseTmp_Interp, anneal_DN[6,*]) MaxT_70Base = Max(anneal_EU[6,*], min=MinT_70Base) dT_70Base = MaxT_70Base - MinT_70Base oplot, findgen(160), anneal_EU[6,*], color=10 xyouts, 15, (MaxT_160Base+0.01), 'D70BaseTmp', color=10 D160StimTmp_DN = [33337, 33595, 33802, 34098, 34544, 34934, 35279, 35727, $ 36344, 37237, 38641, 41083, 43089, 46116, 51035, 54747] D160StimTmp_EU = [10, 8, 7, 6, 5, 4.4, 4, 3.6, 3.2, 2.8, 2.4, 2, 1.8, 1.6, $ 1.4, 1.3] D160StimTmp_Interp = spl_init (D160StimTmp_DN, D160StimTmp_EU) anneal_EU[8,*] = spl_interp (D160StimTmp_DN, D160StimTmp_EU, $ D160StimTmp_Interp, anneal_DN[8,*]) MaxT_160Stim = Max(anneal_EU[8,*], min=MinT_160Stim) dT_160Stim = MaxT_160Stim - MinT_160Stim oplot, findgen(160), anneal_EU[8,*], color=34 xyouts, 15, (MaxT_160Base-0.01), 'D160StimTmp', color=34 CSMMTmp_DN = [33151, 33339, 33494, 33719, 34063, 34366, 34634, 34985, $ 35469, 36173, 37280, 39218, 40819, 43246, 47207, 50205] CSMMTmp_EU = [10, 8, 7, 6, 5, 4.4, 4, 3.6, 3.2, 2.8, 2.4, 2, 1.8, 1.6, $ 1.4, 1.3] CSMMTmp_Interp = spl_init (CSMMTmp_DN, CSMMTmp_EU) anneal_EU[9,*] = spl_interp (CSMMTmp_DN, CSMMTmp_EU, $ CSMMTmp_Interp, anneal_DN[9,*]) MaxT_CSMM = Max(anneal_EU[9,*], min=MinT_CSMM) dT_CSMM = MaxT_CSMM - MinT_CSMM oplot, findgen(160), anneal_EU[9,*], color=232 xyouts, 15, (MaxT_160Base-0.03), 'CSMMTmp', color=232 ; D160TmpA, D70TmpA, and D160JnctTmp in upper right plot ; Old D160TmpA temperature calibration curve ; D160TmpA_DN = [33110, 33234, 33330, 33463, 33569, 33828, 33977, 34169, $ ; 34427, 34796, 35362, 36327, 37101, 38241, 40030, 41338] D160TmpA_DN = [33384, 33649, 33857, 34151, 34591, 34976, 35315, 35757, $ 36362, 37233, 38576, 40862, 42690, 45366, 49552, 52533] D160TmpA_EU = [10, 8, 7, 6, 5, 4.4, 4, 3.6, 3.2, 2.8, 2.4, 2, 1.8, 1.6, $ 1.4, 1.3] D160TmpA_Interp = spl_init (D160TmpA_DN, D160TmpA_EU) anneal_EU[2,*] = spl_interp (D160TmpA_DN, D160TmpA_EU, D160TmpA_Interp, $ anneal_DN[2,*]) MaxT_160A = Max(anneal_EU[2,*], min=MinT_160A) dT_160A = MaxT_160A - MinT_160A plot, findgen(160), anneal_EU[2,*], $ yrange=[(MinT_160A-0.02),(MaxT_160A+0.06)], $ xtitle='Time (sec)', ytitle='Temperature (K)', $ charsize=1.3, color=0,/nodata oplot, findgen(160), anneal_EU[2,*], color=10 xyouts, 15, (MaxT_160A+0.05), 'D160TmpA', color=10 D70TmpA_DN = [33068, 33187, 33279, 33408, 33599, 33765, 33911, 34100, $ 34357, 34727, 35301, 36287, 37086, 38276, 40180, 41599] D70TmpA_EU = [10, 8, 7, 6, 5, 4.4, 4, 3.6, 3.2, 2.8, 2.4, 2, 1.8, 1.6, $ 1.4, 1.3] D70TmpA_Interp = spl_init (D70TmpA_DN, D70TmpA_EU) anneal_EU[4,*] = spl_interp (D70TmpA_DN, D70TmpA_EU, $ D70TmpA_Interp, anneal_DN[4,*]) MaxT_70A = Max(anneal_EU[4,*], min=MinT_70A) dT_70A = MaxT_70A - MinT_70A oplot, findgen(160), anneal_EU[4,*], color=232 xyouts, 15, (MaxT_160A+0.04), 'D70TmpA', color=232 D160JnctTmp_DN = [32998, 33099, 33184, 33309, 33502, 33671, 33819, 34010, $ 34263, 34617, 35146, 36019, 36703, 37694, 39226, 40334] D160JnctTmp_EU = [10, 8, 7, 6, 5, 4.4, 4, 3.6, 3.2, 2.8, 2.4, 2, 1.8, 1.6, $ 1.4, 1.3] D160JnctTmp_Interp = spl_init (D160JnctTmp_DN, D160JnctTmp_EU) anneal_EU[5,*] = spl_interp (D160JnctTmp_DN, D160JnctTmp_EU, $ D160JnctTmp_Interp, anneal_DN[5,*]) MaxT_160Jnct = Max(anneal_EU[5,*], min=MinT_160Jnct) dT_160Jnct = MaxT_160Jnct - MinT_160Jnct oplot, findgen(160), anneal_EU[5,*], color=82 xyouts, 15, (MaxT_160A+0.03), 'D160JnctTmp', color=82 ; D160TmpB, D70TmpB, and D70JnctTmp not included in this diagnostic ; Old D160TmpB temperature calibration curve ; D160TmpB_DN = [33054, 33172, 33264, 33394, 33589, 33760, 33912, 34111, $ ; 34385, 34784, 35411, 36511, 37418, 38788, 41016, 42696] ; D160TmpB_DN = [33319, 33553, 33737, 33997, 34385, 34723, 35021, 35408, $ ; 35938, 36701, 37881, 39900, 41525, 43928, 47721, 50494] ; D160TmpB_EU = [10, 8, 7, 6, 5, 4.4, 4, 3.6, 3.2, 2.8, 2.4, 2, 1.8, 1.6, $ ; 1.4, 1.3] ; D160TmpB_Interp = spl_init (D160TmpB_DN, D160TmpB_EU) ; anneal_EU[4,*] = spl_interp (D160TmpB_DN, D160TmpB_EU, D160TmpB_Interp, $ ; anneal_DN[4,*]) ; MaxT_160B = Max(anneal_EU[4,*], min=MinT_160B) ; dT_160B = MaxT_160B - MinT_160B ; oplot, findgen(160), anneal_EU[4,*], color=232 ; xyouts, 15, (MaxT_160A+0.04), 'D160TmpB', color=232 ; D70TmpB_DN = [33014, 33104, 33173, 33268, 33407, 33526, 33628, 33758, $ ; 33934, 34182, 34556, 35179, 35670, 36384, 37493, 38299] ; D70TmpB_EU = [10, 8, 7, 6, 5, 4.4, 4, 3.6, 3.2, 2.8, 2.4, 2, 1.8, 1.6, $ ; 1.4, 1.3] ; D70TmpB_Interp = spl_init (D70TmpB_DN, D70TmpB_EU) ; D70JnctTmp_DN = [ 33065, 33188, 33284, 33421, 33626, 33807, 33969, 34181, $ ; 34476, 34908, 35594, 36810, 37824, 39372, 41919, 43861] ; D70JnctTmp_EU = [10, 8, 7, 6, 5, 4.4, 4, 3.6, 3.2, 2.8, 2.4, 2, 1.8, 1.6, $ ; 1.4, 1.3] ; D70JnctTmp_Interp = spl_init (D70JnctTmp_DN, D70JnctTmp_EU) ; D24AnnealCur in lower right plot D24AnnealCur_DN = [0, 32647] D24AnnealCur_EU = [2589., -0.0386] D24AnnealCur_Interp = spl_init (D24AnnealCur_DN, D24AnnealCur_EU) anneal_EU[3,*] = spl_interp (D24AnnealCur_DN, D24AnnealCur_EU, $ D24AnnealCur_Interp, anneal_DN[3,*]) Max_D24AnnealCur = Max(anneal_EU[3,*], min=Min_D24AnnealCur) dI_D24AnnealCur = Max_D24AnnealCur - Min_D24AnnealCur plot, findgen(160), anneal_EU[3,*], yrange=[-20,640], xtitle='Time (sec)', $ ytitle='Anneal Current (uA)', $ charsize=1.3, color=0,/nodata oplot, findgen(160), anneal_EU[3,*], color=10 xyouts, 15, 600, 'D24AnnealCur', color=10 ; D70AnnealCur and D160AnnealCur not included in this diagnostic ; D70AnnealCur_DN = [6, 32766] ; D70AnnealCur_EU = [33.85, -0.06] ; D70AnnealCur_Interp = spl_init (D70AnnealCur_DN, D70AnnealCur_EU) ; D160AnnealCur_DN = [6, 32766] ; D160AnnealCur_EU = [33.85, -0.06] ; D160AnnealCur_Interp = spl_init (D160AnnealCur_DN, D160AnnealCur_EU) if (keyword_set(ps)) then begin device, /close set_plot, 'x' endif ; write minimum and maximum temperatures to filename.Temps openw,unit1,filename+'.Temps',/get_lun printf,unit1,'TempSensor','MinT', 'MaxT', 'dT', format='(A14,3(A12))' printf,unit1, 'D24TmpA ',MinT_24A, MaxT_24A, dT_24A, $ format='(A14,4x,F8.4,3x,F9.4,3x,F9.4)' printf,unit1, 'D24TmpB ',MinT_24B, MaxT_24B, dT_24B, $ format='(A14,4x,F8.4,3x,F9.4,3x,F9.4)' printf,unit1, 'D160TmpA ',MinT_160A, MaxT_160A, dT_160A, $ format='(A14,4x,F8.4,4x,F8.4,4x,F8.4)' printf,unit1, 'D70TmpA ',MinT_70A, MaxT_70A, dT_70A, $ format='(A14,4x,F8.4,4x,F8.4,4x,F8.4)' printf,unit1, 'D160JnctTmp ',MinT_160Jnct, MaxT_160Jnct, dT_160Jnct, $ format='(A14,4x,F8.4,4x,F8.4,4x,F8.4)' printf,unit1, 'D70BaseTmp ',MinT_70Base, MaxT_70Base, dT_70Base, $ format='(A14,4x,F8.4,4x,F8.4,4x,F8.4)' printf,unit1, 'D160BaseTmp ',MinT_160Base, MaxT_160Base, dT_160Base, $ format='(A14,4x,F8.4,4x,F8.4,4x,F8.4)' printf,unit1, 'D160StimTmp ',MinT_160Stim, MaxT_160Stim, dT_160Stim, $ format='(A14,4x,F8.4,4x,F8.4,4x,F8.4)' printf,unit1, 'CSMM_Tmp ',MinT_CSMM, MaxT_CSMM, dT_CSMM, $ format='(A14,4x,F8.4,4x,F8.4,4x,F8.4)' printf,unit1, 'D24AnnealCur(uA) ',Min_D24AnnealCur, Max_D24AnnealCur, $ dI_D24AnnealCur, format='(A16,F10.4,2x,F10.4,2x,F10.4)' free_lun,unit1 END ; ----------------------------------------------------------------------