!------------------------------------------------------------------------ ! HEADER.NIC ! Procedure to plot header information ! Variables defined in DEFINE.NIC ! &1 = scan -> MAP ! &2 = Source_Number -> MAP ! &3 = Number of Total-Powet Channels ! Created R.Neri 9-Sep-1994 !------------------------------------------------------------------------ on error return define character text*40 test1*5 test2*5 define logical landscape define real boxs xbox ybox spikes po define integer az1 az2 el1 el2 nf nl num n2 n3 n4 n5 nn define character quote*1 arc*2 var_header*3 var_cali*3 var_flag*3 var_ante*3 define character antenna*12 ! cle who g\set orie 0 let quote "'" let arc 'quote''quote' let landscape page_x.gt.page_y let xbox 5*character_size let ybox 5*character_size lim 1 2 1 2 ! to avoid box n n n plot error tic 5 5 5 5 ! to avoid box n n n plot error if (landscape) then let boxs min(page_x-.1-xbox-5*character_size,page_y-ybox-.1) if (boxs.lt.0) then say "F-HEADER, Page to small - change page or decrease character size" quit all endif g\set box xbox+boxs page_x ybox page_y-.1 else let boxs min(page_x-xbox-.1,page_y-13*character_size-.1) if (boxs.lt.0) then say "F-HEADER, Page to small - change page or decrease character size" quit all endif g\set box xbox xbox+boxs ybox+boxs page_y-.1 endif box n n g\set expand .95 ! let var_header 'exist(source)' let var_cali 'exist(counts_per_jy)' let var_flag 'exist(gaine_flag)' let var_ante 'exist(beam_az)' if (var_ante.eq."NO") then var ante endif if (var_header.eq."NO") then var header endif if (var_cali.eq."NO") then var cali endif if (var_flag.eq."NO") then var flag endif let antenna 'telescope' if (execute.eq."map") then if (aaa%pa.le.-12344.or.scan.lt.0) then let antenna "---" endif endif if (exist(scan_type)) then if (scan_type.eq.1) then let text "ON-OFF" else if (scan_type.eq.2) then let text "ON-THE-FLY" else if (scan_type.eq.3) then let text "SKYDIP" else if (scan_type.eq.4) then let text "POINTING" else if (scan_type.eq.5) then let text "FOCUS" else let text "---" endif if (execute.eq."map") then if (aaa%pa.le.-12344) then let text "MOSAIC" endif endif else let text "UNKNOWN" endif if (first.gt.last) then let last first endif let nf first let nl last if (first.eq.0) then let nf 1 endif if (last.eq.0) then if exist(signal) then let nl nchan else let nl aaa%dim[3] endif endif let num nl-nf+1 if (first.eq.0.and.last.eq.0) then if exist(signal) then let num nchan else let num aaa%dim[3] endif if (execute.eq."totpow") then let num ncalpow endif endif if (execute.eq."map") then dra text .5 -1.00 "\\iSource: &1" 6 /box 7 else if (execute.eq."totpow") then let test1 "s&2" let test2 "s"'scan' if test1.ne."s".and.test2.ne.test1 then dra text .5 -1.00 "\\iSource: List of scans" 6 /box 7 else dra text .5 -1.00 "\\iSource: "'source' 6 /box 7 endif else dra text .5 -1.00 "\\iSource: "'source' 6 /box 7 endif dra text .5 -1.75 "\\iTelescope: "'ANTENNA' 6 /box 7 if execute.eq."totpow".and.test1.ne."s".and.test1.ne.test2 then dra text .5 -2.50 "\\iObserving: List of scans" 6 /box 7 else dra text .5 -2.50 "\\iObserving: "'TEXT' 6 /box 7 endif if (execute.eq."map") then dra text .5 -3.25 "\\iScan: &2 / "'TYPE' 6 /box 7 else if (execute.eq."totpow".and.test1.ne."s".and.test1.ne.test2) then dra text .5 -3.25 "\\iScan: &2 - "'scan' 6 /box 7 else dra text .5 -3.25 "\\iScan: "'scan' 6 /box 7 endif endif if (execute.eq."map") then if (type.eq."CNV") then dra text .5 -4.00 "\\iPlanes: "'NUM'" out of "'AAA%DIM[3]' 6 /box 7 else dra text .5 -4.00 "\\iChannels: "'NUM'" out of "'AAA%DIM[3]' 6 /box 7 endif else if (execute.eq."signal") then dra text .5 -4.00 "\\iChannels: "'NUM'" out of "'nchan' 6 /box 7 else if (execute.eq."totpow") then dra text .5 -4.00 "\\iTotal Power: "'NUM'" out of "'NCALPOW' 6 /box 7 endif if (execute.ne."totpow") then dra text .5 -4.75 "\\iBox marking: Channel Number" 6 /box 7 else dra text .5 -4.75 "\\iBox marking: Total Power Chan" 6 /box 7 endif if (execute.eq."map") then if (beam_az.eq.0.or.beam_el.eq.0) then dra text .5 -5.50 "\\iBeam: (Unknown)" 6 /box 7 else let az1 int(beam_az) let az2 nint((beam_az-az1)*100) let el1 int(beam_el) let el2 nint((beam_el-el1)*100) if (az2.ge.10.and.el2.ge.10) then let text "\\iBeam: "'AZ1'"."'AZ2''ARC'" x "'EL1'"."'EL2''ARC' else if (az2.lt.10.and.el2.lt.10) then let text "\\iBeam: "'AZ1'".0"'AZ2''ARC'" x "'EL1'".0"'EL2''ARC' else if (az2.lt.10) then let text "\\iBeam: "'AZ1'".0"'AZ2''ARC'" x "'EL1'"."'EL2''ARC' else let text "\\iBeam: "'AZ1'"."'AZ2''ARC'" x "'EL1'".0"'EL2''ARC' endif dra text .5 -5.50 'TEXT' 6 /box 7 endif if (execute.eq."map") then let text 'aaa%unit' else let text " Counts" if (spacing.ge.0) then if (levels.eq."ABS") then let text 'text' else let text 'text'" 10%" endif endif endif if (spacing.ge.0) then let n2 int(true_spacing) let n3 int((true_spacing-n2)*10) let n4 int((true_spacing-n2-n3|10)*100) let n5 nint((true_spacing-n2-n3|10-n4|100)*1000) let text "\\iLevel spacing: "'N2'"."'N3''N4''N5''TEXT' dra text .5 -6.25 'TEXT' 6 /box 7 else dra text .5 -6.25 "\\iLevel spacing: USERLIST" 6 /box 7 endif endif let po -7.75 ! if (execute.eq."signal".or.execute.eq."totpow") then dra text .5 -5.50 "\\iUnits: &1" 6 /box 7 let po -6.75 endif if (execute.ne."totpow") then let text "OFF" if (amplifier_flag.eq..true.) then let text "ON" endif if (execute.eq."map") then define header co$de 'name'.'type' read if (co$de%major.gt.0) then let tx$1 nint(co$de%pa) /new int let tx$1 mod(tx$1,4) if (tx$1.lt.2) then let text "OFF" endif if (tx$1.ge.2) then let text "ON" endif else let tx$1 nint(co$de%pa) /new int let tx$1 mod(nint(tx$1-mod(tx$1,10000)),40000) if (tx$1.lt.20000) then let text "OFF" endif if (tx$1.ge.20000) then let text "ON" endif endif del /var co$de tx$1 if (aaa%pa.le.-12344) then let text "---" endif endif dra text .5 po "\\iGain Amplifier: "'TEXT' 6 /box 7 ! let text "OFF" if (gaine_flag) then let text "ON" endif if (execute.eq."map") then define header co$de 'name'.'type' read if (co$de%major.gt.0) then let tx$1 nint(co$de%pa) /new int let tx$1 mod(tx$1,32) if (tx$1.lt.16) then let text "OFF" endif if (tx$1.ge.16) then let text "ON" endif else let tx$1 nint(co$de%pa) /new int let tx$1 mod(nint(tx$1-mod(tx$1,10000)),640000) if (tx$1.lt.320000) then let text "OFF" endif if (tx$1.ge.320000) then let text "ON" endif endif del /var co$de tx$1 if (aaa%pa.le.-12344) then let text "---" endif endif if (scan_type.eq.3) then dra text .5 po-.75 "\\iGain Elevation: "'TEXT'" (Disabled)" 6 /box 7 else dra text .5 po-.75 "\\iGain Elevation: "'TEXT' 6 /box 7 endif ! let text "OFF" if (gainc_flag.eq..true.) then let text "ON" endif if (execute.eq."map") then define header co$de 'name'.'type' read if (co$de%major.gt.0) then let tx$1 nint(co$de%pa) /new int let tx$1 mod(tx$1,8) if (tx$1.lt.4) then let text "OFF" endif if (tx$1.ge.4) then let text "ON" endif else let tx$1 nint(co$de%pa) /new int let tx$1 mod(nint(tx$1-mod(tx$1,10000)),80000) if (tx$1.lt.40000) then let text "OFF" endif if (tx$1.ge.40000) then let text "ON" endif endif del /var co$de tx$1 if (aaa%pa.le.-12344) then let text "---" endif endif dra text .5 po-1.5 "\\iGain Channel: "'TEXT' 6 /box 7 ! let text "OFF" if (noise_flag.eq..true.) then let text "ON" endif if (execute.eq."map") then define header co$de 'name'.'type' read if (co$de%major.gt.0) then let tx$1 nint(co$de%pa) /new int let tx$1 mod(tx$1,16) if (tx$1.lt.8) then let text "OFF" endif if (tx$1.ge.8) then let text "ON" endif else let tx$1 nint(co$de%pa) /new int let tx$1 mod(nint(tx$1-mod(tx$1,10000)),160000) if (tx$1.lt.80000) then let text "OFF" endif if (tx$1.ge.80000) then let text "ON" endif endif del /var co$de tx$1 if (aaa%pa.le.-12344) then let text "---" endif endif dra text .5 po-2.25 "\\iNoise Removal: "'TEXT' 6 /box 7 ! let text "OFF" if (opacity_flag.eq..true.) then if (nint(scan_opacity*100).lt.1) then let text "ON (N.A.)" else let text "ON ("'nint(scan_opacity*100)|100'")" endif endif if (execute.eq."map") then define header co$de 'name'.'type' read if (co$de%major.gt.0) then let tx$1 nint(co$de%minor*100) /new int if (tx$1.eq.1000) then let text "ON (N.A.)" else if (tx$1.eq.0) then let text "OFF" else let text "ON ("'mod(tx$1,1000)|100'")" endif endif else let tx$1 nint(co$de%pa) /new int let tx$1 mod(nint(tx$1-mod(tx$1,10000)),320000) if (tx$1.lt.160000) then let text "OFF" endif if (tx$1.ge.160000) then if (nint(nint(co$de%pa)|640000).lt.1) then let text "ON (N.A.)" else let text "ON ("'nint(nint(co$de%pa)|640000)|100'")" endif endif endif del /var co$de tx$1 if (aaa%pa.le.-12344) then let text "---" endif endif dra text .5 po-3.00 "\\iOpacity Correction: "'TEXT' 6 /box 7 ! let text "NO" if exist(signal) then define real dummy /like despike_flag else let nn aaa%dim[3] define real dummy[nn] endif if (execute.eq."signal") then let dummy despike_flag compute spikes mean dummy if (abs(spikes+1).gt.1e-4) then let dummy 0 /where dummy.eq.-1 compute spikes mean dummy del /var dummy let spikes spikes*nchan ! let text "YES ("'NINT(SPIKES)'")" let text "YES" endif endif if (execute.eq."map") then define header co$de 'name'.'type' read if (co$de%major.gt.0) then let tx$1 nint(co$de%pa) /new int let tx$1 mod(tx$1,2) if (tx$1.lt.1) then let text "NO" endif if (tx$1.ge.1) then let text "YES" endif else let tx$1 nint(co$de%pa) /new int let tx$1 mod(nint(tx$1-mod(tx$1,10000)),20000) if (tx$1.lt.10000) then let text "NO" endif if (tx$1.ge.10000) then let text "YES" endif endif del /var co$de tx$1 if (aaa%pa.le.-12344) then let text "---" endif endif dra text .5 po-3.75 "\\iData Despiked: "'TEXT' 6 /box 7 ! let text "NO" if (execute.eq."map") then define header co$de 'name'.'type' read if (co$de%major.gt.0) then let txt$1 int(co$de%pa|32) /new integer else let txt$1 mod(co$de%pa,10000) /new integer endif if (txt$1.le.0) then if (aaa%pa.le.-12344) then let text "---" endif dra text .5 po-4.50 "\\iConversion factor: "'TEXT' 6 /box 7 else if (aaa%pa.le.-12344) then dra text .5 po-4.50 "\\iConversion factor: --- Cnts/Jy" 6 /box 7 else dra text .5 po-4.50 "\\iConversion factor: "'txt$1'" Cnts/Jy" 6 /box 7 endif endif del /var co$de txt$1 endif if (execute.eq."signal") then if (counts_per_jy.gt.1.and.jansky_flag.eq..true..and.scan_type.ne.3) then dra text .5 po-4.50 "\\iConversion factor: "'COUNTS_PER_JY'" Cnts/Jy" 6 /box 7 else dra text .5 po-4.50 "\\iConversion factor: "'TEXT' 6 /box 7 endif endif endif ! sic\sic date if (landscape) then dra text 0.0 2.0 "'SYS_INFO'" 5 /box 2 dra text 0.0 1.0 "'SYS_DATE'" 5 /box 2 else set orien 90 dra text -1.0 0.0 "'SYS_INFO'" 5 /box 4 dra text -2.0 0.0 "'SYS_DATE'" 5 /box 4 set orien 0 endif ! if (var_header.eq."NO") then var header off endif if (var_header.eq."NO") then var cali off endif if (var_flag.eq."NO") then var flag off endif if (var_ante.eq."NO") then var ante off endif g\set box xbox xbox+boxs ybox ybox+boxs