!---------------------------------------------------------------------- ! PR:P_TOTPOW.NIC ! Input file for GO TOTPOW ! Check for parameter &1 &2 = read scan &1 to &2 !---------------------------------------------------------------------- define character xtext*20 ytext*25 scan1*5 scan2*5 text*20 save_type*6 define integer m n k l nf nl num ns p nx ny chan_tot[NCALPOW] save_last define real posx1 posx2 posy diff amin amax am mean define double ratio x2 y2 dx val ! ! if (ncalpow.eq.3) then let chan_tot 1 17 32 ! January 1998 correspondence of total to ! differential power channels else let chan_tot 1 endif ! let scan1 "&1s" let scan2 "&2s" if scan2.ne."s" then power /scan &1 &2 else if scan1.ne."s" then power /scan &1 else power endif if (.not.exist(totpow)) then say "No total power detector data" return endif if scan2.ne."s" then let scan1 &1 let scan2 &2 else if scan1.ne."s" then let scan1 &1 let scan2 &1 else let scan1 'scan' let scan2 'scan' endif gui\panel "None" None gui\go let command "TOTPOW" let execute "totpow" let change_aspect .false. if (aspect.eq.0) then let change_aspect .true. let aspect 2 endif if (last.gt.3) then let nl 3 else let nl last endif if (first.ne.0.and.last.eq.0) then let nl first endif if (first.gt.last) then let ns first let first last let last ns endif if (first.le.1) then let nf 1 endif if (last.eq.0) then let nl ncalpow endif set blanking -99999.5 1 ! define real xaxis /like totpow[1] let xaxis[i] i compute amax max xaxis let num nint(amax) let xaxis totpow[1] if (xaxis[1].gt.xaxis[num]) then let xaxis xaxis+86400 /where xaxis.lt.totpow[1,1] endif let nx 1 let save_type 'xtype' if xtype.eq."LST" then let xtype "UT" endif if xtype.eq."UT" then let text "vs Time" let xtext "UT (sec)" else if (xtype.eq."EL") let xaxis totpow[2] let text "vs degrees" let xtext "Elevation" endif let xtype 'save_type' let ny nl-nf+1 let text "Total Totpow "'TEXT' ! let save_last last if (last.eq.0.or.last.gt.3) then let last ncalpow endif @ p_header 'TEXT' &1 let last save_last let x2 box_xmax let y2 box_ymax let num nx*ny let n int(sqrt(num+1)) if (n**2.lt.num) then let n n+1 endif if (aspect.ne.0) then let ratio aspect else let ratio 0 endif if ratio.gt.1d0 then ! m > n let m int(sqrt((num)*ratio+1)) let n nint(m|ratio) if (m*n.lt.(num)) then let m m+1 if (m*n.lt.(num)) then let n n+1 endif endif else let n int(sqrt((num)|ratio+1)) let m nint(n*ratio) if (m*n.lt.(num)) then let n n+1 if (m*n.lt.(num)) then let m m+1 endif endif endif let dx (x2-box_xmin)|n|ratio let dx min((y2-box_ymin)|m,dx) set expand max(1|sqrt(x2|dx|ratio),.5) define real yaxis /like totpow lim 1e5 -1e5 1e5 -1e5 for i 2+nf to 2+nl if do_scale.eq."REL" then let ytext "Tot.Pow. Counts (Rel.)" compute amin min totpow[i] compute amax max totpow[i] else let ytext "Tot.Pow. Counts (Abs.)" let amin 0 let amax 0 endif let yaxis[i] totpow[i]-(amax+amin)|2 lim < > < > /var xaxis yaxis[i] next let posx1 (user_xmax-user_xmin)*.05+user_xmin let posy (user_ymax-user_ymin)*.9+user_ymin tick 0 0 0 0 let k nf-1 let l nf let p 1 let q int(num|n) /new int if (q*n.ne.num) then let q q+1 endif if exist(boxes) then del /var boxes endif set mar 20 0 0.04 define real boxes[5,num] /global for j 1 to m for i 1 to n g\set box x2+(i-n-1)*dx*ratio x2+(i-n)*dx*ratio y2-j*dx y2+(1-j)*dx let k k+1 if (p.le.num) then let boxes[1,p] k let boxes[2,p] x2+(i-n-1)*dx*ratio let boxes[3,p] x2+(i-n)*dx*ratio let boxes[4,p] y2-j*dx let boxes[5,p] y2+(1-j)*dx let p p+1 endif if ((k.gt.nl).or.(l.gt.nl)) then g\set expand 1.0 if (change_aspect) then let aspect 0 endif set mar 20 0 0.12 return else if (i.eq.1.and.j.eq.q) then box label 'xtext' /x label 'ytext' /y else box n n endif draw text posx1 posy "TP"'K'" = CH"'chan_tot[k]' 6 /user let m k+2 point xaxis yaxis[m] if (k.eq.nl) then let k nf-1 let l l+1 endif g\set coord box endif next next set mar 20 0 0.12 ! set box 22.2 28.8 7.2 13.8 lim -80 80 -80 80 box set exp .45 for i 1 to nchan ellipse 5.5 /user chan_az_off[i] chan_el_off[i] draw text chan_az_off[i] chan_el_off[i] 'i' 5 /user next set exp .8 label "Nasmith Plane" /x set exp 1. ! if (change_aspect) then let aspect 0 endif let ytype "SIGNAL"