;+ ; NAME: ; PSMSLICE ; PURPOSE: ; To create a PostScript plot of selected meridian slices through ; Polar Camera images. ; CATEGORY: ; ; CALLING SEQUENCE: ; PSMSLICE,YEAR,MONTH,DAY,MPFSB ; 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: ; None. ; 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. ;- PRO psmslice,year,month,day,mpfsb IF N_PARAMS() EQ 0 THEN BEGIN doc_library,'psmslice' RETURN ENDIF ; Then open it again for reading. merplotname=STRING(year MOD 100,month,day $ ,FORMAT='(3I2.2,".merslice.ps")') psopen,merplotname,/long OPENR,merunit,'/jasper/cnsr3_data1/tmp/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 ; 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 psclose RETURN END