PRO UVSPFORM, struc=struc, data=cexp, maxcyc=maxcyc, cycle=cycle, ih=ih, $ point=point, lastmexe=lastmexe ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; CEXP : The data array as plotted or imaged ; EXPNU : String in the form "Vnnnnn" giving experiment number ; EXPNOP : String in the form "[NODE::]DEVICE:DIRECTORY Vnnnnn.mm;x" ; MAXCYC : Maximum number of pages needed to display all information ; CYCLE : Page number about to be displayed ; IH : Expeiment header information ; POINT : Array of pointing information ; LASTMEXE : The last raster printed of a logical record, for multi raster/rec ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; if cycle gt maxcyc THEN cycle = 1 ; after written all info, start over again erase ; clear active window nlines = 44 ; number of lines per page minus title line smal = .02 ; single line space size larg = .035 ; double line space size flag = 0 & truncated = 0 ; for incomplete records nrec = ih(19) ; # records if maxcyc eq 0 then begin nwrd=ih(97)*ih(98) ; # of words per record nras = nwrd/ (ih(141)*ih(142)) ; # of rasters per record maxcyc = fix(nras*nrec/nlines) + 2 ; round, add exp. header endif ;if not(struc.st4.twodet) then color = !d.n_colors $ ; white letters ; else color = 123 ; white letters color = !p.color ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Header information routine Output header information ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; if cycle eq 1 then begin ; experiment header info output ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Get sun pointing information and output ; Save info so don't need to do calculations every time ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; if n_elements(point) ne 15 then begin ; not done yet, go to point point=fltarr(15) uvsppoint, struc.st6.expnu, ih, point, catplace=struc.st6.cat endif ns = 'N' & if point(10) lt 0.0 then ns = 'S' ew = 'W' & if point(11) lt 0.0 then ew = 'E' ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Experiment header information ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ver = .98 ; y placement for line of text ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; The names of the type of experiment ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; xtyp = ['SPECTROHELIOGRAM','DOPPLERGRAM ','POLARGRAM ', $ 'MAGNETOGRAM ','I-MAX ','I-MIN ', $ 'FLASHWATCH ','RED MAX ','BLUE MAX ', $ 'SPECTROGRAM ','LAMBDA MAX(GBL) ','LAMBDA MAX(LCL) ', $ 'LAMBDA MIN(GBL) ','LAMBDA MIN(LCL) ','SPECIAL ', $ 'PROFILE MATRIX ','MULTI-LINE PRFL.','RASTER-THRU-LINE', $ 'PROF.MATR.(POL) ','PROF.MATR.(P-ML)','RAS-THRU-LINE(P)'] expstat1 = ' ' & expstat2 = ' ' if (ih(4) ne 0) then if(ih(4) eq 2) then expstat2 = ' NO END OF EXP. ' $ else if(ih(4) eq 1) then expstat1 = ' NO START OF EXP.' idoy = ih(9) & iyr = ih(48)-1900 ; can't use ih(6-8) prior to RFVN 11 month = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ' nday = intarr(12) & nday( [0,2,4,6,7,9,11] ) = 31 & nday( [3,5,8,10] ) = 30 ly = float(iyr) / 4. if (ly-fix(ly)) eq 0.0 then nday(1) = 29 else nday(1) = 28 time = strarr(2) for lp = 0,1 do begin ; once w/ doy = ih(9) again w/ doy = ih(13) ; get the day and month from day-of-year and year ndt = 0 & i = 0 for i = 0,11 do begin ndt = ndt + nday(i) if ndt ge idoy then goto, label1 endfor label1: imy = i+1 & idm = idoy-ndt+nday(i) mth = string(imy,format='(i2)') & day = string(idm,format='(i2)') spm = strpos(mth,' ',0) & if spm eq 0 then mth = '0' + strtrim(mth,1) spd = strpos(day,' ',0) & if spd eq 0 then day = '0' + strtrim(day,1) mthday = strmid(month,4*(mth-1),4) + day + ' 19' + strtrim(string(iyr),2) time(lp) = mthday idoy = ih(13) ; for second loop use end DOY endfor xyouts,.04,ver, $ 'Ultraviolet Spectrometer / Polarimeter Experiment ' + struc.st6.expnu $ ,/normal,size=1.30,color=color & ver=ver-larg xyouts,.04,ver, $ 'Start time ' + time(0) + ' ' + string(ih(10),format='(i2.2)') + $ ':' + string(ih(11),format='(i2.2)') + ':' + $ string(ih(12),format='(i2.2)') +' DOY '+ string(ih(9),format='(i3.3)') $ ,/normal,size=1.30,color=color & ver=ver-smal xyouts,.04,ver, $ 'End time ' + time(1) + ' ' + string(ih(14),format='(i2.2)') + $ ':' + string(ih(15),format='(i2.2)') + ':' + $ string(ih(16),format='(i2.2)') +' DOY '+ string(ih(13),format='(i3.3)') $ ,/normal,size=1.30,color=color & ver=ver-larg stmajor = long(ih,68) ; word position * 2 to get byte endmajor = long(ih,74) ; word position * 2 to get byte xyouts,.04,ver, $ 'Start major ' + string((stmajor),format='(i7)') + $ ' Minor ' + string((ih(36)),format='(i3)') + expstat1 $ ,/normal,size=1.30,color=color & ver=ver-smal xyouts,.04,ver, $ 'End major ' + string((endmajor),format='(i7)') + $ ' Minor ' + string((ih(39)),format='(i3)') + expstat2 $ ,/normal,size=1.30,color=color & ver=ver-larg ; this can be converted to IDL and included if anyone ever wants this info. ;itotal = long(ih,56) ;= 'Total data points' + string(itotal,format='(i7)') + $ ; ' Total records ' + string(ih(19),format='(i6)') ; write(3,3) (IH(I),I=159,162) ;3 format (/' PREAMBLE-',4O7) ; ; if (ih(4).ne.0) then ; write(3,111) (ih(i),i=163,171),ih(4),(ih(i),i=172,174) ;111 format(' PAR. BLK-',9O7,30X,I4,' CHAINED EXPERIMENTS' ; * /' POSTAMBLE-',3O7) ; else ; write(3,122) (ih(i),i=163,174) ;122 format(' PAR. BLK-',9O7/' POSTAMBLE-',3O7) ; endif ; ;icaspe = ishft(ih(50),-4) ; raw cas word then encoded ;icasye = ishft(ih(49),-4) ; raw cas word then encoded xyouts,.04,ver, $ 'Experiment type (' + strtrim(string(ih(59),format='(i2)'),2) + $ ') **' + strtrim(xtyp(ih(59)-1),2) + '**' $ ,/normal,size=1.30,color=color & ver=ver-larg iw1 = long(ih,132) ; word position * 2, to get byte position iw2 = long(ih,136) ; word position * 2, to get byte position expnum = long(strmid(struc.st6.expnu,1,5)) slitletter = ['P', 'Q', 'L', 'M', 'D', 'E', 'H', 'I', 'R', 'S', 'A', 'B', $ 'F', 'G', 'C', 'J', 'K', 'N', 'O', 'V', 'T', 'U'] ; access catalog, if available, for slit number. if struc.st6.cat eq 'any location:' then begin ; not assigned yet logtest = getenv('UVSP$CATALOG') ; is this defined if logtest ne 0 then struc.st6.cat=logtest $ ; use defined value else begin ; go find a catalog file = 'CATALOG.CAT' opdev = uvspdevck(file=file) ; error handled below struc.st6.cat = opdev + file endelse endif openr, unit, struc.st6.cat, error=messup, /get_lun ; open catalog if messup eq 0 then begin ; get slit from catalog if possible record = assoc(unit,intarr(64)) ic = record(expnum-1) ; put correct record into IC free_lun,unit ; close catalog islit = ic(15) ; slit from catalog slitletter = slitletter(islit-1) ; assign slit letter bigprob = 0 ; valid slit flag endif else $ ; problem opening the catalog if ih(64) gt 0 and ih(64) lt (23) then begin ; using exp. header islit = ih(64) ; assign slit number slitletter = slitletter(islit-1) ; assign slit letter bigprob = 0 ; valid slit flag endif else begin ; exp. header is wrong islit='error' ; show a problem slitletter = '*' ; show a problem bigprob=1 endelse if not(bigprob) then begin ; must have valid slit number for following uvspwcal,expnum,iw1,islit,ih(137),wave1,abort uvspwcal,expnum,iw2,islit,ih(137),wave2,abort if (abort eq 0) then begin ; first det in interval 1, w/ WL xyouts,.04,ver, $ ' Intvl 1 Det(s):' + string(ih(137),format='(i3)'), $ /normal,size=1.30,color=color xyouts,.50,ver, $ ' WL' + string(wave1,format='(f7.1)') + ' to '+ $ string(wave2,format='(f7.1)'),/normal,size=1.30,color=color ver=ver-smal if (ih(51) eq 2) then begin ; second det in interval 1 uvspwcal,expnum,iw1,islit,ih(138),wave1,abort uvspwcal,expnum,iw2,islit,ih(138),wave2,abort xyouts,.147,ver,' ' + string(ih(138),format='(i3)') $ ,/normal,size=1.30,color=color xyouts,.50,ver, ' WL '+string(wave1,format='(f7.1)') + ' to '+ $ string(wave2,format='(f7.1)'),/normal,size=1.30,color=color ver=ver-smal endif endif else begin ; one det in interval 1, no WL intdet = '' for i=1,ih(51) do intdet = intdet + string(ih(136+i),format='(i2)') xyouts,.04,ver, $ ' Intvl 1 Det(s):' + intdet,/normal,size=1.30,color=color ver=ver-smal endelse if (ih(52) ne 0) then begin ; is a 2nd interval uvspwcal,expnum,iw1,islit,ih(137+ih(51)),wave1,abort uvspwcal,expnum,iw2,islit,ih(137+ih(51)),wave2,abort if (abort eq 0) then begin ; first det in interval 2, w/ WL xyouts,.04,ver, $ ' Intvl 2 Det(s):' + string(ih(137+ih(51)),format='(i3)') $ ,/normal,size=1.30,color=color xyouts,.50,ver, $ ' WL' + string(wave1,format='(f7.1)') + ' to ' + $ string(wave2,format='(f7.1)') $ ,/normal,size=1.30,color=color & ver=ver-smal if (ih(52) eq 2) then begin ; second det in interval 2 uvspwcal,expnum,iw1,islit,ih(137+ih(51)+1),wave1,abort uvspwcal,expnum,iw2,islit,ih(137+ih(51)+1),wave2,abort xyouts,.147,ver, $ ' ' + string(ih(137+ih(51)+1),format='(i3)'), $ /normal,size=1.3,color=color xyouts,.50,ver,' WL' + string(wave1,format='(f7.1)') + ' to '+ $ string(wave2,format='(f7.1)'),/normal,size=1.30,color=color ver=ver-smal endif endif else begin ; one det in interval 2, no WL intdet = '' for i=1,ih(52) do $ intdet = intdet + string(ih(136+ih(51)+i),format='(i2)') xyouts,.04,ver, $ ' Intvl 2 Det(s):' + intdet,/normal,size=1.30,color=color ver=ver-smal endelse endif endif ver = ver - 0.016 ; no matter what previous conditions xyouts,.04,ver, $ 'Slit ' + strtrim(string(islit),2) + ' (' + slitletter + ')' + $ ' Reformatter version' + string(ih(1),format='(i3)') $ ,/normal,size=1.30,color=color & ver=ver-larg pxyw = ['P', 'X', 'Y', 'W'] loop = strarr(5) & loop(4) = 'S' & for j=1,4 do loop(ih(54+j))=pxyw(j-1) if(ih(143) gt 0) then begin ; calibration on loop if (ih(89) gt -1) then ii = ih(89) else ii = 4 ; by 'n' WLD steps xyouts,.04,ver, $ 'Calibrate on ' + strtrim(string(loop(ii)),2) + $ '-LOOP every' + string(ih(143)+1,format='(i4)') + '-th time' $ ,/normal,size=1.30,color=color & ver=ver-smal xyouts,.500,ver, $ ' by' + string(ih(87),format='(i4)') + ' WLD steps' $ ,/normal,size=1.30,color=color & ver=ver-smal endif ; MAYBE SOMEDAY SOMEONE WILL WANT THIS INFO ; sequence control ; ipb=intarr(16) & for i=0,15 do ipb(i)=ih(158+i) ; start of exp. data ; lc=intarr(4) & lc(0)=ipb(4) and 3 ; lc - array used for scratch ; for i=1,3 do begin iq=-3*i & lc(i)=ishft(ipb(4),iq) and 3 & endfor ; sequence control display ; loops=intarr(5) & leach=lonarr(5) & lcnts=lonarr(5) ; nx=long(ih(141)) & ny=long(ih(142)) & nw=long(ih(77)) & np=long(ih(83)) ; for i=0,3 do begin j=0 & while ((lc(j) ne i) and (j lt 4)) do j=j+1 ; loops(i)=j+1 & endfor ; ltype=loops(0) ; if (ltype eq 1) then lcnts(0)=nw+1 & if (ltype eq 2) then lcnts(0)=ny ; if (ltype eq 3) then lcnts(0)=nx & if (ltype eq 4) then lcnts(0)=np+1 ; ; figure out loop count ; for i=0,2 do begin & jq=loops(i+1) ; if (jq eq 1) then leach(i)=nw+1 & if (jq eq 2) then leach(i)=ny ; if (jq eq 3) then leach(i)=nx & if (jq eq 4) then leach(i)=np+1 ; endfor ; for i=1,3 do lcnts(i)=leach(i-1)*lcnts(i-1) ; lcnts(4)=lcnts(3) & nr=ih(82) & leach(4)=min([nr,8192]) & leach(3)=1 ; i=0 & while ((leach(i) le 1 ) and (i le 1)) do begin ; leach(i)=leach(i+1) & i=i+1 & endwhile ; if (lcnts(3) le 1) then leach([0,1,2,3])=0 & if (nr eq 1) then leach(4)=0 ; ='Loop counts' ; for i=0,4 do exph(20)=strtrim(exph(20),2)+string(lcnts(i),format='(i7)') ; exph(21)='Record size'+string(ih(20),format='(i7)') xyouts,.04,ver, $ 'Wavelength: Step # ' + strtrim(string(iw1),2) + ' to # ' + $ strtrim(string(iw2),2) $ ,/normal,size=1.30,color=color & ver=ver-smal wty =['ABS WL=','GBL WO=','LCL WO='] if (ih(174) ne 1) then iq4 = long(ih(165)) else iq4 = iw1 xyouts,.245,ver, 'NW',/normal,size=1.30,color=color xyouts,.315,ver, strtrim(ih(77),2) ,/normal,size=1.30,color=color xyouts,.470,ver, 'DW' ,/normal,size=1.30,color=color xyouts,.540,ver, strtrim(ih(78),2) ,/normal,size=1.30,color=color xyouts,.695,ver, wty(ih(174)-1) + strtrim(string(iq4),2) $ ,/normal,size=1.30,color=color & ver=ver-smal PLR =['OUT ', 'A-IN', 'B-IN'] xyouts,.04,ver,'Polarimeter:',/normal,size=1.30,color=color xyouts,.245,ver, 'NP ',/normal,size=1.30,color=color xyouts,.315,ver, strtrim(ih(83),2),/normal,size=1.30,color=color xyouts,.470,ver, 'DP',/normal,size=1.30,color=color xyouts,.540,ver, strtrim(ih(84),2),/normal,size=1.30,color=color xyouts,.695,ver, plr(ih(63)),/normal,size=1.30,color=color ver=ver-smal xyouts,.04,ver, 'Raster:' ,/normal,size=1.30 ,color=color xyouts,.245,ver, 'NX ' ,/normal,size=1.30 ,color=color xyouts,.315,ver, strtrim(ih(141),2),/normal,size=1.30 ,color=color xyouts,.470,ver, 'DX' ,/normal,size=1.30 ,color=color xyouts,.540,ver, strtrim(ih(74),2) ,/normal,size=1.30 ,color=color xyouts,.695,ver, 'X-center ' +strtrim(ih(26),2),/normal,size=1.30,color=color ver=ver-smal xyouts,.245,ver, 'NY ' ,/normal,size=1.30 ,color=color xyouts,.315,ver, strtrim(ih(142),2),/normal,size=1.30 ,color=color xyouts,.470,ver, 'DY' ,/normal,size=1.30 ,color=color xyouts,.540,ver, strtrim(ih(75),2) ,/normal,size=1.30 ,color=color xyouts,.695,ver, 'Y-center ' +strtrim(ih(27),2),/normal,size=1.30,color=color ver=ver-smal gatt = conv_vax_unix(float(ih,144)) lup = '-' & for i=0,3 do lup = lup + loop(i) + '-' xyouts,.245,ver, 'NR ' ,/normal,size=1.30 ,color=color xyouts,.315,ver, strtrim(ih(81),2),/normal,size=1.30 ,color=color xyouts,.460,ver, lup ,/normal,size=1.30 ,color=color xyouts,.695,ver, 'Gate' + string(gatt,format='(f8.3)'), /normal, size=1.30, $ color=color ver=ver-larg xyouts,.04,ver,'DMA information:',/normal,size=1.30,color=color ver=ver-smal xyouts,.15,ver,'threshold' + string(ih(85),format='(i6)') $ ,/normal,size=1.30,color=color & ver=ver-smal ; skip wld at i-max for early versions if(((ih(5) eq 2)and((ih(1) gt 7) or ((ih(1) eq 7)and(expnum ge 15830)))) or $ ((ih(5) eq 1)and((ih(1) gt 5) or ((ih(1) eq 5)and(expnum ge 13307))))) $ then begin lmaxl = ' WLD = ' + strtrim(string(long(ih,208)),2) ioldvn = 0 endif else begin lmaxl = '' & ioldvn = 1 & endelse xyouts,.15,ver, $ 'max value' + string((ih(147)*2),format='(i6)') + ' at (' + $ string(ih(148),format='(i3)') + ',' + $ string(ih(149),format='(i3)') + ')' + lmaxl $ ,/normal,size=1.30,color=color & ver=ver-smal xyouts,.15,ver, $ 'min value' + string((ih(144)*2),format='(i6)') + ' at (' + $ string(ih(145),format='(i3)') + ',' + $ string(ih(146),format='(i3)') + ')' $ ,/normal,size=1.30 ,color=color & ver=ver-smal xyouts,.15,ver, $ 'blue max: vel = ' + string(ih(150),format='(i3)') + $ ' int = ' + string(ih(151),format='(i3)') + ' at (' + $ string(ih(152),format='(i3)') + ',' + $ string(ih(153),format='(i3)') + ')' $ ,/normal,size=1.30,color=color & ver=ver-smal xyouts,.15,ver, $ 'red max : vel = ' + string(ih(154),format='(i3)') + $ ' int = ' + string(ih(155),format='(i3)') + ' at (' + $ string(ih(156),format='(i3)') + $ ',' + string(ih(157),format='(i3)') + ')' $ ,/normal,size=1.30 ,color=color & ver=ver-smal xyouts,.15,ver, $ 'current flarX = ' + string(ih(133),format='(i3)') + $ ' flarY = ' + string(ih(134),format='(i3)') $ ,/normal,size=1.30,color=color & ver=ver-larg ; MAYBE SOMEDAY SOMEONE WILL WANT THIS INFO ; get error info from header ; ierr=intarr(15) & lerr=intarr(5) ; if (ioldvn ne 0) then for i=0,14 do ierr(i)=ih(102+i) $ ; else for i=0,14 do ierr(i)=ih(106+i) ; for i=0,4 do lerr(i)=ierr(8+i) ; ; if before version 8, assume its a PB because 1980 was re-reformatted ; if (ih(5) eq 2) then begin ;FD ; exph(38) = 'Error summary: Minors missing ' + strtrim(ierr(0),2) ; exph(39) = ' quality flag ' + strtrim(ierr(1),2) ; exph(40) = ' read parity ' + strtrim(ierr(2),2) ; endif else begin ;PB ; exph(38) = 'Error summary: Minors missing ' + strtrim(ierr(0),2) ; exph(39) = ' bad polys ' + strtrim(ierr(1),2) ; exph(40) = ' bad synchs ' + strtrim(ierr(2),2) ; endelse ; exph(41) = 'Bad loop counts:' + ' ' + loop(0) + ' ' + $ ; loop(1) + ' ' + loop(2) + ' ' + loop(3) + ' R' ; exph(42) = string(' ',format='(11x,a1)') + string(lerr(0),format='(i7)') + $ ; string(lerr(1),format='(i7)') + string(lerr(2),format='(i7)') + $ ; string(lerr(3),format='(i7)') + string(lerr(4),format='(i7)') ; exph(43) = 'Errors outside rec. loop' + string(ierr(13),format='(i6)') ; exph(44) = 'Glitches ' + string(ierr(14),format='(i6)') ; exph(45) = 'WLD errors ' + string(ierr(3),format='(i6)') + $ ; ' +' + string(ierr(4),format='(i6)') ; exph(46) = 'Pol. errors ' + string(ierr(5),format='(i6)') + $ ; ' +' + string(ierr(6),format='(i6)') ; exph(47) = 'JR monitor errors ' + string(ierr(7),format='(i6)') ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; The point information is output now. ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; xyouts,.04,ver,'Pointing information :',/normal,size=1.30,color=color ver=ver-smal codear = [' S/C','COAL','STAR','HOLE','FILA','LIMB','BRPT','PROM', $ 'CLOS','NITE','POLE','PLAG','QSUN','S/CT','FULL','SURV'] if point(12) gt 16 then xyouts,.07,ver, $ 'NOAA active region : ' + string(point(12),format='(i4)') $ ,/normal,size=1.30,color=color $ else if point(12) ge 1 then $ xyouts,.07,ver, $ 'NOAA active region : ' + codear(point(12)-1) $ ,/normal,size=1.30,color=color $ else xyouts,.07,ver, $ 'NOAA active region : ' + 'none' $ ,/normal,size=1.30,color=color ver=ver-smal xyouts,.07,ver,'Helio. Latitude and Longitude : ' + $ string(point(10),format='(f7.1)') + '(' + ns + ')' + $ ', ' + string(point(11),format='(f7.1)') + '(' + ew + ')' $ ,/normal,size=1.30,color=color & ver=ver-smal xyouts,.07,ver, $ 'B0: ' + string(point(4),format='(f7.1)') + ' degrees ' + $ ' P: ' + string(point(6),format='(f7.1)') + ' degrees ' $ ,/normal,size=1.30,color=color & ver=ver-larg roll = ih(24)/100.D xyouts,.07,ver, $ 'Spacecraft roll : ' + string(roll,format='(f7.1)') + $ ' degrees' $ ,/normal,size=1.30,color=color & ver=ver-smal xyouts,.07,ver, $ 'Spacecraft Pitch ' + string(point(13),format='(f7.1)') + $ ' Yaw ' + string(point(14),format='(f7.1)') + ' arcsec ' $ ,/normal,size=1.30,color=color & ver=ver-smal xyouts,.07,ver, $ 'Pitch and Yaw corresponding to UVSP X-cen Y-cen :' $ ,/normal,size=1.30,color=color & ver=ver-smal xyouts,.15,ver, $ 'Pitch ' + string(point(2),format='(f7.1)') + ' arcsec ' $ ,/normal,size=1.30,color=color & ver=ver-smal xyouts,.15,ver, $ 'Yaw ' + string(point(3),format='(f7.1)') + ' arcsec ' $ ,/normal,size=1.30,color=color & ver=ver-larg xyouts,.07,ver, $ 'X boresight : ' + string(point(0),format='(f7.1)') $ ,/normal,size=1.30,color=color & ver=ver-smal xyouts,.07,ver, $ 'Y boresight : ' + string(point(1),format='(f7.1)') $ ,/normal,size=1.30,color=color & ver=ver-larg xyouts,.07,ver,'Theta',/normal,size=1.30,color=color xyouts,.20,ver, $ ': ' + string(point(9),format='(f7.1)') + ' deg.' $ ,/normal,size=1.30,color=color & ver=ver-smal xyouts,.07,ver,'R',/normal,size=1.30,color=color xyouts,.20,ver, $ ': ' + string(point(7),format='(f7.1)') + ' arcsec' $ ,/normal,size=1.30,color=color & ver=ver-smal xyouts,.07,ver,'Rsun',/normal,size=1.30 ,color=color xyouts,.20,ver, $ ': ' + string(point(5),format='(f7.1)') + ' arcsec' $ ,/normal,size=1.30,color=color & ver=ver-smal xyouts,.07,ver,'R/Rsun',/normal,size=1.30 ,color=color xyouts,.20,ver, $ ': ' + string(point(8),format='(f7.3)') $ ,/normal,size=1.30,color=color & ver=ver-smal ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; solar long,lat ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; grid=15. ; helio,point,ih,grid,roll ; by Dr. D. Zarro endif ; done with header information ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; Read record header information for desired range determined by cycle ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; if cycle ne 1 then begin ; record header info output ver = .98 xyouts,.04,ver, $ 'Ultraviolet Spectrometer / Polarimeter Experiment ' + struc.st6.expnu $ ,/normal,size=1.30,color=color & ver=ver-larg xyouts,.04,ver, $ '# Start Time Det Min Max Mean' $ ,/normal,size=1.30,color=color & ver=ver-smal det = intarr(6) & det(ih(137)) = 0 & det(ih(138)) = 1 det(ih(139)) = 2 & det(ih(140)) = 3 ; "UVSPRD" doesn't get record headers, open experiment directly openr, recunit, struc.st6.expno, /get_lun file = assoc(recunit,intarr(256)) ; read in record header nwrd=ih(97)*ih(98) ; # of words per record nras = nwrd/ (ih(141)*ih(142)) ; # of rasters per record nb = ((nwrd -1)/256+1) +1 ; # blocks in logical record ntot = nras * nrec - 1 ; total # of rasters logrec = (cycle-2) * nlines / nras ; current logical record (start at 0) J = logrec * nb + 1 ; start record this output page if nras eq 1 then begin page = j + (nlines*nb) - 1 K = min([page,ntot*nb/nras]) ; end raster this output page endif else begin page = fix(((cycle-1)*nlines) / float(nras) * nb ) K = min([page,ntot*nb/nras])+1 ; end raster this output page endelse iras = nlines*(cycle - 2) ; 1st raster number this output page room = nlines ; # lines available on this page for block= j,k,nb do begin ; for each needed logical record ir = file(block) ; record header info nd = ir(6) ; det for this logical record time = string(ir(24),'(i2.2)') + ':' + string(ir(25),'(i2.2)') + ':' $ + string(ir(26),'(i2.2)') + '.' + string(ir(27),'(i3.3)') D = det(nd) ; which detector, from record header if nras eq 1 then begin ; only one raster per record mexe = 0 & mexe2 = 0 ; print only one line of information endif else begin ; multi rasters per record mexe = lastmexe ; starting where left off printing ; # of rasters to end logical record endras = nras*(logrec+1) - ((cycle-2)*nlines) + lastmexe if fix((logrec+1.)/ih(60)+.5) lt nrec/ih(60) then begin ; not last rec. mexe2 = mexe + min([room,endras]) - 1 endif else begin ; may be truncated rec. siz = size(cexp) & maxras = 1 ; size and reset for i = 3,siz(0) do maxras = maxras * siz(i) ; UVSPRD max # rasters truncated = ((ntot-maxras)/(ih(60)*(ih(78)+1))) smallest = min([room,endras,endras-truncated-1]) if flag then iras = iras + truncated + 1 if endras-truncated-1 ne smallest then flag=0 else flag=1 mexe2 = mexe + smallest - 1 endelse lastmexe = mexe2 endelse for i = mexe, mexe2 do begin ; rasters in record ; don't need polarimeter, because those types are rejected before now. W = iras/ih(60) mod (ih(77)+1) ; which of ih(77)+1 wavelengths if nras le 1 then $ ; if one raster per record R = iras / ih(60) / (ih(77)+1) $ ; which repeat, alternating det. else R = ((iras) mod nras) + (nras*(logrec/ih(60))) ; multi rasters /record date = time + ' ' + string(nd,'(i1)') + ' ' $ + string(min(cexp(*,*,W,*,R,D)),'(f7.0)') + ' ' $ + string(max(cexp(*,*,W,*,R,D)),'(f10.0)') + ' ' $ + string(total(cexp(*,*,W,*,R,D)/ $ n_elements(cexp(*,*,W,*,R,D))),'(f8.2)') iras = iras + 1 ; increment raster count on this page numb = ' ' & strput,numb,strtrim(string(iras,'(i4)'),1) xyouts,.04,ver,numb + ' ' + date,/normal,size=1.30,color=color ver = ver-smal time = ' ' endfor if nras ne 1 then begin ; multi exp. per record are a pain if (iras mod nlines) eq 0 then begin ; no more room on this page room = nlines ; full area for next page lastmexe = 0 ; start of full page endif else begin ; more room on this page ; need and iras ne nras ; true end of rasters to be printed room = nlines - i ; page lines left after rec change lastmexe = i ; # of rasters printed on partial page logrec = logrec + 1 ; need next logical record endelse endif endfor free_lun,recunit ; close the associated file if iras ge ntot-truncated then begin ; have gotten to the final raster xyouts,.04,ver,'Det Min Max',/normal,size=1.30,color=color ver=ver-smal for i = 0,ih(60)-1 do begin xyouts,.04,ver, $ string(ih(137+i),'(i1)') + string(min(cexp(*,*,*,*,*,i)),'(f11.0)') + $ string(max(cexp(*,*,*,*,*,i)),'(f11.0)') $ ,/normal,size=1.30,color=color & ver=ver-smal endfor cycle = 0 ; back to info page endif endif ; end of selected record information cycle = cycle + 1 return ; from FORM to LIGHT routine or RASTER routine end ; end of routine form