; $Id: diagdumpge_ioc.pro,v 0.1 2003/01/31 15:00:00 dkelly Exp $ ; ;+ ; NAME: ; DIAGDUMPGE_IOC ; ; PURPOSE: ; This routine reads in the binary diagnostic dump data collected ; during 70um and 160um thermal anneal and produces a set of four ; temperature plots and a file listing minimum and maximum temperatures. ; It also reads in the master Ge anneal profile and calculates ; and plots residuals relative to the master anneal. ; ; CATEGORY: ; MIPS utilities. ; ; CALLING SEQUENCE: ; diagdumpge_ioc, filename, ps=ps, ascii=ascii ; ; INPUTS: ; filename: Name of the diagnostic dump file ; (e.g. ce_2003-071T10.06.01.644_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 22, 2003) ; ; This CECOLDIAG command includes ten telemetry items in the following order: ; 0x00b01942 D70TmpA ; 0x00b01940 D70TmpB ; 0x00b01944 D160TmpA ; 0x00b01948 D160TmpB ; 0x00b01938 D70JnctTmp ; 0x00b0193a D160JnctTmp ; 0x00b0194a CSMMTmp ; 0x00b01934 D24TmpA ; 0x00446964 D70AnnealCur ; 0x00446968 D160AnnealCur ; ;- ; ---------------------------------------------------------------------- PRO diagdumpge_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,80], $ data_type=12,endian="big") READCOL,'/home/dkelly/data/master/ge/master.temps', $ f = 'f,f,f,f,f,f,f,f,f,f,f,f',D70TmpA_master,D70TmpB_master, $ D160TmpA_master,D160TmpB_master,D70JnctTmp_master,D160JnctTmp_master, $ CSMM_Tmp_master,D24TmpA_master,D70AnnealCur_master,D160AnnealCur_master, $ dummy1,dummy2,delimiter=' ' 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 ; interpolate temperatures and plot temperatures ; D70TmpA and D70TmpB in upper left plot 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[0,*] = spl_interp (D70TmpA_DN, D70TmpA_EU, $ D70TmpA_Interp, anneal_DN[0,*]) MaxT_70A = Max(anneal_EU[0,*], min=MinT_70A) dT_70A = MaxT_70A - MinT_70A plot, findgen(80), anneal_EU[0,*], yrange=[(MinT_70A-0.1),(MaxT_70A+0.1)], $ xtitle='Time (sec)', ytitle='Temperature (K)', $ title='70um and 160um Thermal Anneals:', $ subtitle = filename, charsize=1.3, color=0,/nodata oplot, findgen(80), anneal_EU[0,*], color=10 xyouts, 15, (MaxT_70A+0.06), 'D70TmpA', color=10 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) anneal_EU[1,*] = spl_interp (D70TmpB_DN, D70TmpB_EU, $ D70TmpB_Interp, anneal_DN[1,*]) MaxT_70B = Max(anneal_EU[1,*], min=MinT_70B) dT_70B = MaxT_70B - MinT_70B oplot, findgen(80), anneal_EU[1,*], color=232 xyouts, 15, (MaxT_70A+0.03), 'D70TmpB', color=232 ; D160TmpA and D160TmpB in lower left 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(80), anneal_EU[2,*], yrange=[(MinT_160A-0.1),(MaxT_160A+0.1)], $ xtitle='Time (sec)', ytitle='Temperature (K)', $ title='160um Thermal Anneal:', charsize=1.3, color=0,/nodata oplot, findgen(80), anneal_EU[2,*], color=10 xyouts, 15, (MaxT_160A-0.04), 'D160TmpA', color=10 ; 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[3,*] = spl_interp (D160TmpB_DN, D160TmpB_EU, D160TmpB_Interp, $ anneal_DN[3,*]) MaxT_160B = Max(anneal_EU[3,*], min=MinT_160B) dT_160B = MaxT_160B - MinT_160B oplot, findgen(80), anneal_EU[3,*], color=232 xyouts, 15, (MaxT_160A-0.1), 'D160TmpB', color=232 ; D70JnctTmp, D160JnctTmp, and CSMMTmp in upper right plot 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) anneal_EU[4,*] = spl_interp (D70JnctTmp_DN, D70JnctTmp_EU, $ D70JnctTmp_Interp, anneal_DN[4,*]) MaxT_70Jnct = Max(anneal_EU[4,*], min=MinT_70Jnct) dT_70Jnct = MaxT_70Jnct - MinT_70Jnct plot, findgen(80), anneal_EU[4,*], $ yrange=[(MaxT_70Jnct-0.5),(MaxT_70Jnct+0.3)], $ xtitle='Time (sec)', ytitle='Temperature (K)', $ charsize=1.3, color=0,/nodata oplot, findgen(80), anneal_EU[4,*], color=10 xyouts, 15, (MaxT_70Jnct+0.2), 'D70JnctTmp', color=10 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(80), anneal_EU[5,*], color=232 xyouts, 15, (MaxT_70Jnct+0.15), 'D160JnctTmp', color=232 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[6,*] = spl_interp (CSMMTmp_DN, CSMMTmp_EU, $ CSMMTmp_Interp, anneal_DN[6,*]) MaxT_CSMM = Max(anneal_EU[6,*], min=MinT_CSMM) dT_CSMM = MaxT_CSMM - MinT_CSMM oplot, findgen(80), anneal_EU[6,*], color=58 xyouts, 15, (MaxT_70Jnct+0.1), 'CSMMTmp', color=58 ; D160StimTmp, D70BaseTmp, and D160BaseTmp not included in this diagnostic ; 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[0,*] = spl_interp (D160StimTmp_DN, D160StimTmp_EU, $ ; D160StimTmp_Interp, anneal_DN[0,*]) ; MaxT_160Stim = Max(anneal_EU[0,*], min=MinT_160Stim) ; dT_160Stim = MaxT_160Stim - MinT_160Stim ; oplot, findgen(80), anneal_EU[0,*], color=34 ; xyouts, 15, 4.88, 'D160StimTmp', color=34 ; 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[5,*] = spl_interp (D70BaseTmp_DN, D70BaseTmp_EU, $ ; D70BaseTmp_Interp, anneal_DN[5,*]) ; MaxT_70Base = Max(anneal_EU[5,*], min=MinT_70Base) ; dT_70Base = MaxT_70Base - MinT_70Base ; oplot, findgen(80), anneal_EU[5,*], color=232 ; xyouts, 15, (MaxT_70Jnct+0.15), 'D70BaseTmp', color=232 ; 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[0,*] = spl_interp (D160BaseTmp_DN, D160BaseTmp_EU, $ ; D160BaseTmp_Interp, anneal_DN[0,*]) ; MaxT_160Base = Max(anneal_EU[0,*], min=MinT_160Base) ; dT_160Base = MaxT_160Base - MinT_160Base ; oplot, findgen(80), anneal_EU[0,*], color=82 ; xyouts, 15, (MaxT_70Jnct+0.1), 'D160BaseTmp', color=82 ; D24TmpA not currently being plotted 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[7,*] = spl_interp (D24TmpA_DN, D24TmpA_EU, D24TmpA_Interp, $ anneal_DN[7,*]) MaxT_24A = Max(anneal_EU[7,*], 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(80), anneal_EU[7,*], $ ; yrange=[(MinT_24A-0.01),(MaxT_24A+0.01)], $ ; xtitle='Time (sec)', ytitle='Temperature (K)', $ ; charsize=1.3, color=0,/nodata ; oplot, findgen(80), anneal_EU[7,*], color=10 ; oplot, x+32, PFit, PSym=6, color=128 ; xyouts, 15, (MaxT_24A+0.005), 'D24TmpA', color=10 ; D24TmpB is not included in this diagnostic ; 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[6,*] = spl_interp (D24TmpB_DN, D24TmpB_EU, D24TmpB_Interp, $ ; anneal_DN[6,*]) ; MaxT_24B = Max(anneal_EU[6,*], min=MinT_24B) ; dT_24B = MaxT_24B - MinT_24B ; oplot, findgen(80), anneal_EU[6,*], color=232 ; xyouts, 15, 23, 'D24TmpB', color=232 ; D70AnnealCur in lower right plot D70AnnealCur_DN = [6, 32766] D70AnnealCur_EU = [33.85, -0.06] D70AnnealCur_Interp = spl_init (D70AnnealCur_DN, D70AnnealCur_EU) anneal_EU[8,*] = spl_interp (D70AnnealCur_DN, D70AnnealCur_EU, $ D70AnnealCur_Interp, anneal_DN[8,*]) Max_D70AnnealCur = Max(anneal_EU[8,*], min=Min_D70AnnealCur) dI_D70AnnealCur = Max_D70AnnealCur - Min_D70AnnealCur plot, findgen(80), anneal_EU[8,*], yrange=[-1,16], xtitle='Time (sec)', $ ytitle='Anneal Current (uA)', $ charsize=1.3, color=0,/nodata oplot, findgen(80), anneal_EU[8,*], color=10 xyouts, 50, 14, 'D70AnnealCur', color=10 D160AnnealCur_DN = [6, 32766] D160AnnealCur_EU = [33.85, -0.06] D160AnnealCur_Interp = spl_init (D160AnnealCur_DN, D160AnnealCur_EU) anneal_EU[9,*] = spl_interp (D160AnnealCur_DN, D160AnnealCur_EU, $ D160AnnealCur_Interp, anneal_DN[9,*]) Max_D160AnnealCur = Max(anneal_EU[9,*], min=Min_D160AnnealCur) dI_D160AnnealCur = Max_D160AnnealCur - Min_D160AnnealCur oplot, findgen(80), anneal_EU[9,*], color=232 xyouts, 50, 13, 'D160AnnealCur', color=232 ; D24AnnealCur not included in this diagnostic ; D24AnnealCur_DN = [6, 32766] ; D24AnnealCur_EU = [33.85, -0.06] ; D24AnnealCur_Interp = spl_init (D24AnnealCur_DN, D24AnnealCur_EU) ; plot the residuals, anneal-master plot, findgen(80), (anneal_EU[0,*]-D70TmpA_master), yrange=[-0.04,0.04], $ xtitle='Time (sec)', ytitle='Temperature (K)', $ title='70um and 160um Thermal Anneals: Residuals', $ subtitle = filename, charsize=1.3, color=0,/nodata oplot, findgen(80), (anneal_EU[0,*]-D70TmpA_master), color=10 xyouts, 25, 0.03, 'D70TmpA', color=10 oplot, findgen(80), (anneal_EU[1,*]-D70TmpB_master), color=232 xyouts, 25, 0.025, 'D70TmpB', color=232 plot, findgen(80), (anneal_EU[2,*]-D160TmpA_master), yrange=[-0.1,0.1], $ xtitle='Time (sec)', ytitle='Temperature (K)', $ charsize=1.3, color=0,/nodata oplot, findgen(80), (anneal_EU[2,*]-D160TmpA_master), color=10 xyouts, 25, 0.08, 'D160TmpA', color=10 oplot, findgen(80), (anneal_EU[3,*]-D160TmpB_master), color=232 xyouts, 25, 0.07, 'D160TmpB', color=232 plot, findgen(80), (anneal_EU[4,*]-D70JnctTmp_master), yrange=[-0.05,0.05], $ xtitle='Time (sec)', ytitle='Temperature (K)', $ charsize=1.3, color=0,/nodata oplot, findgen(80), (anneal_EU[4,*]-D70JnctTmp_master), color=10 xyouts, 25, 0.04, 'D70JnctTmp', color=10 oplot, findgen(80), (anneal_EU[5,*]-D160JnctTmp_master), color=232 xyouts, 25, 0.034, 'D160JnctTmp', color=232 oplot, findgen(80), (anneal_EU[6,*]-CSMM_Tmp_master), color=58 xyouts, 25, 0.028, 'CSMMTmp', color=58 oplot, findgen(80), (anneal_EU[7,*]-D24TmpA_master), color=82 xyouts, 25, 0.022, 'D24TmpA', color=82 plot, findgen(80), (anneal_EU[8,*]-D70AnnealCur_master), yrange=[-0.2,0.2], $ xtitle='Time (sec)', ytitle='Anneal Current (uA)', $ charsize=1.3, color=0,/nodata oplot, findgen(80), (anneal_EU[8,*]-D70AnnealCur_master), color=10 xyouts, 25, 0.16, 'D70AnnealCur', color=10 oplot, findgen(80), (anneal_EU[9,*]-D160AnnealCur_master), color=232 xyouts, 25, 0.14, 'D160AnnealCur', color=232 if (keyword_set(ps)) then begin device, /close set_plot, 'x' endif ; If desired, write output file if (keyword_set(ascii)) then begin openw,unit1,filename+'.txt',/get_lun printf,unit1,anneal_EU, format='(12(F8.4,3x))' free_lun,unit1 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, 'D70TmpA ',MinT_70A, MaxT_70A, dT_70A, $ format='(A14,4x,F8.4,3x,F9.4,3x,F9.4)' printf,unit1, 'D70TmpB ',MinT_70B, MaxT_70B, dT_70B, $ 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, 'D160TmpB ',MinT_160B, MaxT_160B, dT_160B, $ format='(A14,4x,F8.4,4x,F8.4,4x,F8.4)' printf,unit1, 'D70JnctTmp ',MinT_70Jnct, MaxT_70Jnct, dT_70Jnct, $ 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, 'CSMM_Tmp ',MinT_CSMM, MaxT_CSMM, dT_CSMM, $ format='(A14,4x,F8.4,4x,F8.4,4x,F8.4)' printf,unit1, 'D24TmpA ',MinT_24A, MaxT_24A, dT_24A, $ format='(A14,4x,F8.4,3x,F9.4,3x,F9.4)' printf,unit1, 'D70AnnealCur(uA) ',Min_D70AnnealCur, Max_D70AnnealCur, $ dI_D70AnnealCur, format='(A16,F10.4,2x,F10.4,2x,F10.4)' printf,unit1, 'D160AnnealCur(uA) ',Min_D160AnnealCur, Max_D160AnnealCur, $ dI_D160AnnealCur, format='(A16,F10.4,2x,F10.4,2x,F10.4)' free_lun,unit1 END ; ----------------------------------------------------------------------