if (.not.exist(continuum)) then define char category*10 number*4 observing*20 continuum*20 /global define char cali1*40 source_name*100 mosaic_ra*200 mosaic_dec*200/global define character cali_1*32 cali_2*32 /global define character unit1*20 unit2*20 rec1*40 rec2*40 pointing*1 /glob define integer spec1 spec2 spec3 spec4 spec5 spec6 k[6]/global define character mosaic_tim*200 twocal*20 stability*40/global define real lo31 lo32 lo33 lo34 lo35 lo36 /glo define integer freq spec error mosaic_step all1 all2/global define integer low_limit n_dumps n_scans n_subsc /global define integer k1 k2 k3 /global define logical broad /global ! let cali_1 "Undefined" let cali_2 "Undefined" let mosaic_ra "Undefined" let mosaic_dec "Undefined" let low_limit 15 let n_dumps 15 let n_scans 20 let n_subsc 60 let rec1 "CO(10) 115.271197 USB LOW 350" let rec2 "CO(21) 230.537984 LSB LOW 350" let unit1 "1 2 3" let unit2 "4 5 6" let spec1 160 let spec2 160 let spec3 160 let spec4 160 let spec5 160 let spec6 160 let lo31 210 let lo32 350 let lo33 490 let lo34 210 let lo35 350 let lo36 490 let number " " let category "Dual Freq." let twocal "OBSERVE-BIS" let observing "Mapping" let continuum "Continuum" let pointing "1" let source_name "MY_OBJECT EQ 2000 --:--:--.-- ---:--:--.- LSR ---" let freq 0 let spec 0 let broad .false. let stability "2-3 (Average)" endif gui\panel "SETUP AN OBSERVING PROCEDURE" none let number 'number' /prompt "Proposal Number" let category 'category'/prompt "Proposal Category"- /choice "1.3mm" "3mm" "Dual Freq." "Special" let continuum 'continuum' /prompt "Proposal type"- /choice "Continuum Only" "Lines" let pointing 'pointing' /prompt "Pointing Receiver"- /choice "1" "2" let twocal 'twocal' /prompt "Observing mode"- /choice "OBSERVE" "OBSERVE-BIS" if (mosaic_ra.eq."Undefined".or.mosaic_dec.eq."Undefined") then let mosaic_ra "Undefined" let mosaic_dec "Undefined" let observing "Mapping" else if (observing.eq."Mosaic") then let k1 0 let k2 0 let k3 0 sym dummy 'mosaic_ra' for i 'dummy' 123456 if (i.ne.123456) then let k1 k1+1 endif next del /sym dummy sym dummy 'mosaic_dec' for i 'dummy' 123456 if (i.ne.123456) then let k2 k2+1 endif next del /sym dummy sym dummy 'mosaic_tim' for i 'dummy' 123456 if (i.ne.123456) then let k3 k3+1 endif next del /sym dummy if (k1.ne.k2.or.k2.ne.k3.or.k1.lt.2) let error 5 else let mosaic_step k1 endif endif endif let observing 'observing' /prompt "Observing Type"- /choice "Mapping" "Detection" "Size Measure" "Snapshot" "Mosaic" let source_name 'source_name'/prompt "Object" if (error.eq.1) then say " " say " -----> PLEASE ENTER PROJECT NUMBER <-----" say " " endif if (error.eq.2) then say " " say " -----> PLEASE ENTER RECEIVER FREQUENCIES <-----" say " " endif if (error.eq.4) then say " " say " -----> PLEASE ENTER OBJECT NAME, POSITION AND VELOCITY <-----" say " " endif if (error.eq.5) then say " " say " -----> PLEASE DEFINE FIELD OFFSETS (MOSAIC) <-----" say " " endif if (error.eq.6) then say " " say " -----> PLEASE DEFINE BACKEND CONFIGURATION <-----" say " " endif if (freq.eq.1.and.error.eq.0) then say " " say "Receiver #1: "'rec1' say "Receiver #2: "'rec2' say " " endif if (freq.eq.1.and.spec.eq.1.and.error.eq.0) then sym loop1 'unit1' for i 'loop1' 123456 if (i.ne.123456) then let k[i] 1 endif next sym loop2 'unit2' for i 'loop2' 123456 if (i.ne.123456) then let k[i] 2 endif next del /sym loop1 loop2 say "Unit #1: " lo31 spec1 " /rec #" k[1] " Unit #2: " lo32 spec2 " /rec #" k[2]/for a11 f8.3 i6 a7 i1 a15 f8.3 i6 a7 i1 say "Unit #3: " lo33 spec3 " /rec #" k[3] " Unit #4: " lo34 spec4 " /rec #" k[4]/for a11 f8.3 i6 a7 i1 a15 f8.3 i6 a7 i1 say "Unit #5: " lo35 spec5 " /rec #" k[5] " Unit #6: " lo36 spec6 " /rec #" k[6]/for a11 f8.3 i6 a7 i1 a15 f8.3 i6 a7 i1 say " " endif if (error.eq.0.and.cali_1.ne."Undefined") then say "Calibrator #1: " 'cali_1' /format a17 a12 say "Calibrator #2: " 'cali_2' /format a17 a12 endif if (error.eq.0.and.mosaic_ra.ne."Undefined".and.mosaic_dec.ne."Undefined") then say " " sym mr 'mosaic_ra' say "Mosaic (RA): " 'mr' /format a15 f7.2 f7.2 f7.2 f7.2 f7.2 f7.2 f7.2 f7.2 f7.2 f7.2 f7.2 f7.2 sym mr 'mosaic_dec' say "Mosaic (DEC): " 'mr' /format a15 f7.2 f7.2 f7.2 f7.2 f7.2 f7.2 f7.2 f7.2 f7.2 f7.2 f7.2 f7.2 endif gui\button "@ setobs_freq.greg" FREQUENCY ! Frequency Selection gui\button "@ setobs_back.greg" BACKEND ! Spectral Selection gui\button "@ setobs_cali.greg" CALIBRATE ! Calibrator Selection gui\button "@ setobs_mosa.greg" MOSAIC ! Mosaic Selection gui\button "@ setobs_spec.greg" SPECIAL ! Special Selection gui\button "@ setobs_writ.greg" WRITE ! Write Procedure let error 0 gui\go