;+ ; NAME: ; PSMSLICE ; PURPOSE: ; To create a PostScript plot of selected meridian slices through ; Polar Camera images. ; CATEGORY: ; ; CALLING SEQUENCE: ; PSMSLICE,YEAR,MONTH,DAY,MPFSB,DUMP=dump ; INPUTS: ; YEAR,MONTH,DAY: The year month and day that the images were ; produced. ; MPFSB: The full-scale brightness (in R) for the meridian ; slice plots. ; KEYWORD PARAMETERS: ; /DUMP: Dump an ASCII listing of the brightness slice versus ; elevation angle. ; OUTPUTS: ; None. ; COMMON BLOCKS: ; None. ; SIDE EFFECTS: ; Produces a B/W PostScript file. ; RESTRICTIONS: ; None known. ; PROCEDURE: ; ... ; MODIFICATION HISTORY: ; Written February 1995 by D P Steele. ; Modified November 1995 by D P Steele to add /DUMP keyword. ;- PRO psmslice,year,month,day,mpfsb,dump=dump IF N_PARAMS() EQ 0 THEN BEGIN doc_library,'psmslice' RETURN ENDIF ; Set up OS-specific parameters. @isitdos ; Open a PS file to receive the plots. merplotname=STRING(year MOD 100,month,day $ ,FORMAT='(3I2.2,"ms.ps")') psopen,psroot+dd+merplotname,/long ; If required, open a text file to receive the ASCII dumps of the brightness ; versus elevation. IF KEYWORD_SET(dump) THEN BEGIN merdatafile=STRING(year MOD 100,month,day $ ,FORMAT='(3I2.2,"ms.txt")') OPENW,dmp,tmproot+dd+merdatafile,/GET_LUN ENDIF ; Open the previously-created data file for reading. OPENR,merunit,tmproot+dd+'merdata.tmp',/GET_LUN ; Initialize the variables to be read mhdb=BYTARR(512) maz=0. pkel=maz pkint=maz npts=0L ; Initialize the plot counter and the 'continuity' checkers nplot=-1 oldhr=-1 oldmin=-1 oldsec=-1 oldaz=-1.0 REPEAT BEGIN ; Now read a slice record from the file - first the ; variables of known length READU,merunit,mhdb,maz,pkel,pkint,npts mhd=gethd(mhdb) mhr=mhd.misc.tm.hour mmin=mhd.misc.tm.minute msec=mhd.misc.tm.second mcam=mhd.misc.cam mfilt=mhd.misc.fw mexp=(mhd.misc.exp_scale*mhd.exp.exposure)/1000 ; Then set up and read the actual slice data melev=FLTARR(npts) mslice=melev READU,merunit,melev,mslice IF KEYWORD_SET(dump) THEN BEGIN PRINTF,dmp,STRING(mhr,mmin,msec,mcam,mfilt,mexp,maz,npts $ ,FORMAT='(3(I2.2,":")," c",I1," f",I1," t",I2.2' $ +'," az",I0,I5)') FOR iel=0,npts-1 DO PRINTF,dmp,melev(iel),mslice(iel),FORMAT='(2F6.0)' PRINTF,dmp,FORMAT='()' ENDIF ; Now set up the plot and plot the data new_plot=(mhr NE oldhr) OR (mmin NE oldmin) $ OR (msec NE oldsec) OR (maz NE oldaz) IF new_plot THEN BEGIN nplot=nplot+1 IF (nplot MOD 2) EQ 0 THEN BEGIN ERASE !P.MULTI=[0,0,2,0,0] ENDIF mtitle=ymd2date(year,month,day,format='d$ n$ y$') mtitle=mtitle+' '+strsec((mhr*60L+mmin)*60+msec)+' UT' mtitle=mtitle+' '+STRTRIM(mexp,2)+'-s exposure' mtitle=mtitle+' '+STRING(maz,FORMAT='("Azimuth ",F5.1," deg")') PLOT,[0,1],/NODATA,XRANGE=[20,160],/XSTYLE,XTICKS=4 $ ,XTICKV=(INDGEN(5)+1)*30,XMINOR=6 $ ,XTITLE='!3Elevation Angle (deg)' $ ,YRANGE=[0,mpfsb] $ ,YTITLE='!3Meridian Intensity (R)' $ ,TITLE='!3'+mtitle ch_dev=[[!D.X_SIZE/2,!D.Y_SIZE/2] $ ,[!D.X_SIZE/2+!D.X_CH_SIZE,!D.Y_SIZE/2+!D.Y_CH_SIZE]] ch_data=CONVERT_COORD(ch_dev,/DEVICE,/TO_DATA) x_data=ch_data(0,1)-ch_data(0,0) y_data=ch_data(1,1)-ch_data(1,0) ENDIF ; Now actually plot the present slice of data pn=1-new_plot OPLOT,melev,mslice,LINESTYLE=pn IF pkel+pkint GT 0 THEN BEGIN PLOTS,[pkel,pkel],!Y.CRANGE,LINESTYLE=pn XYOUTS,pkel-0.5*x_data,y_data $ ,STRING(pkel,FORMAT='(F5.1)') $ ,ALIGNMENT=0,ORIENTATION=90 PLOTS,!X.CRANGE,[pkint,pkint],LINESTYLE=pn XYOUTS,!X.CRANGE(1)-2*x_data,pkint-y_data $ ,STRING(pkint,FORMAT='(F5.0)'),ALIGNMENT=1 ENDIF ; Now label the plot with the camera and filter numbers ptop=!Y.CRANGE(1) lht=ptop*REPLICATE(0.95-0.05*pn,2) PLOTS,[25,33],lht,LINESTYLE=pn leg=STRING(mcam,mfilt,FORMAT='("Cam ",I1," Filt ",I1)') XYOUTS,35,ptop*(0.94-0.05*pn),leg ; Update the 'old' slice time oldhr=mhr oldmin=mmin oldsec=msec oldaz=maz ENDREP UNTIL EOF(merunit) FREE_LUN,merunit IF KEYWORD_SET(dump) THEN FREE_LUN,dmp psclose RETURN END