DEFINE CHARACTER CODE*12 DEFINE REAL HOURMIN HOURMAX bl[nbas] loss[nbas] seeing[2] bb bbmax degradation DEFINE INTEGER BASIS[10] LET BASIS 12 13 23 14 24 34 15 25 35 45 define character plotps*40 ! IF (OLD_FILE.NE.FILE_NAME) THEN SAY "Please use ""LIST"" option before" RETURN ENDIF ! define integer ir nr let nr 0 for kr 1 to 2 if irec[kr].gt.0 then let ir irec[kr] let nr nr+1 endif next exa nr ! ! Edit the LaTeX report ! sic prec single sic output calib.begin SAY "\documentstyle[rl,11pt,psfig]{article}" SAY "\sloppy" SAY "\title {Project "'PROJECT'" Data File "'FILE_NAME'"\\" say "Observed on "'date_observed'" configuration "'telescope'- " ("'configuration'")}" SAY "\author{Automatic Summary by CLIC @ x\_show}" SAY "\begin{document}" SAY "\maketitle" SAY "\section{Summary}" SAY "\subsection{Calibrators:}" if (nr.eq.2) then if n_cals.gt.0 then say "\begin{center}\begin{tabular}{lrlrl}" say "&\multicolumn{2}{c}{" frghz[1] - " GHz "'CAL_BAND[1]'"}&\multicolumn{2}{c}{" - frghz[2] " GHz "'CAL_BAND[2]'"}\\[2mm]" /FORMAT a f5.1 a f5.1 a say "Fluxes (Jy): & ~~~~read & & ~~~~read & \\" FOR I 1 TO N_CALS let code " " if CAL_SOURCE[I].eq.BAND_SOURCE then let code "{\em Fixed}" endif if (CAL_SOURCE[I].eq."CRL618").or.(CAL_SOURCE[I].eq."MWC349") then let code "{\em Model}" endif SAY "\verb|"'CAL_SOURCE[I]' "| &" rdi_FLUX[I,1] "&"'code'"&" - rdi_FLUX[I,2] "&"'code'" \\" - /format a a f6.2 a f6.2 a next say "\end{tabular}\end{center}" else say "{\em No calibrators}" endif else if (nr.eq.1) then if N_CALS.gt.0 then say "\begin{center}\begin{tabular}{lrl}" say " &" frghz[ir] "& GHz \\[2mm]" /FORMAT a f5.1 a say "Fluxes (Jy): & ~~~~read \\" FOR I 1 TO N_CALS let code " " if CAL_SOURCE[I].eq.BAND_SOURCE then let code "{\em Fixed}" endif if (CAL_SOURCE[I].eq."CRL618").or.(CAL_SOURCE[I].eq."MWC349") then let code "{\em Model}" endif SAY "\verb|"'CAL_SOURCE[I]' "|&" rdi_FLUX[I,1] "&"'code'" \\" /format a a f6.2 a next say "\end{tabular}\end{center}" else say "{\em No calibrators}" endif endif ! ! SAY "\subsection{Observed Source(s):} " FIND /PROC CORR /TYPE O if (found.gt.0) then LIST /SOURCE say "\begin{center}\begin{tabular}{lllll}" FOR I 1 TO N_SOURCE FIND /SOURCE 'C_SOURCE[I]' /PROC CORR /TYP O IF (C_SOURCE[I].NE."W3OH".OR.FOUND.GT.10) THEN GET FIRST /header LET HOURMIN 12*HOUR_ANGLE|PI GET CX_NUM[FOUND] /header LET HOURMAX 12*HOUR_ANGLE|PI SAY "\verb|"'C_SOURCE[I]'"| & observed for Hour Angles &" - HOURMIN "&to& " HOURMAX "\\" /FORMAT A F6.1 a F6.1 a ENDIF NEXT say "\end{tabular}\end{center}" else say "{\em No project source observed}" endif SAY "\newpage" SAY "\subsection{Meteorological data:}" let plotps "show-meteo.ps" if file(plotps) then SAY "\psfig{file="'plotps'",width=16.0cm}" else SAY "{\em Missing plot file}\\" endif SAY "\newpage" ! SAY "\subsection{Pointing and Focus corrections:}" let plotps "show-point.ps" if file(plotps) then SAY "\psfig{file="'plotps'",width=16.0cm}" else SAY "{\em Missing plot file}\\" endif SAY "\newpage" ! for kr 1 to 2 if irec[kr].gt.0 then let ir irec[kr] SAY "\section{Receiver "'ir'"}" let plotps "show-when-"'ir'".list" if file(plotps) then SAY "\subsection{Observing List}" SAY "\begin{verbatim}" sic output sic output calib.'ir' SAY "\end{verbatim}" SAY "\newpage" endif let plotps "show-total-"'ir'".ps" if file(plotps) then SAY "\subsection{Total Power}" SAY "\psfig{file="'plotps'",width=16.0cm}" endif let plotps "show-cable-"'ir'".ps" if file(plotps) then SAY "\subsection{Cable Phase}" SAY "\psfig{file="'plotps'",width=16.0cm}" endif let plotps "show-tsys-"'ir'".ps" if file(plotps) then SAY "\subsection{System Temperature}" SAY "\psfig{file="'plotps'",width=16.0cm}" endif let plotps "show-water-"'ir'".ps" if file(plotps) then SAY "\subsection{Water Vapor}" SAY "\psfig{file="'plotps'",width=16.0cm}" endif endif next SAY "\end{document}" sic output ! ! Concatenate files if SIC$VERSION.EQ."HPUX".or.SIC$VERSION.EQ."Generic Unix" then SIC\SYSTEM "cp calib.begin calib.tex" for kr 1 to 2 let ir irec[kr] let plotps "calib."'ir' if file(plotps) then SIC\SYSTEM "cat show-when-"'ir'".list >> calib.tex" SIC\SYSTEM "cat calib."'ir'">> calib.tex" SIC\SYSTEM "rm calib."'ir' endif next ! ! save output with a meaningful name ! SYSTEM "rm renamecalib.dat" sic\sic out renamecalib.cmd SIC\SAY "export f="'in_file' SIC\SAY "fs=${f%.*}" SIC\SAY "fs=${fs##/*/}" sic\say "latex calib.tex" ! " > renamecalib.log" sic\say "dvips -o calib.ps calib" ! " >> renamecalib.log " sic\say "mv calib.ps show-$fs.ps" sic\say "chmod g+w calib*.*" sic\say "echo I-PRINT, Postcript report is show-$fs.ps" sic\sic out sic\system "chmod +x renamecalib.cmd" sic\system "./renamecalib.cmd" else say "... not yet available for "'SIC$VERSION' endif