#!/bin/csh -bf # # gp.amb # # Script to resolve ambiguities. # N.E. King # January 1994 # Modifications: # March 1995 Modified to run GIPSY R3 on swave. # 1995/10/17 whp Adapted to gp processing. # 1996/04/26 jls Replace bais cutoff value in ambigon.nml # with the value found in ProcessFlags. # CHECK NUMBER OF ARGUMENTS # ------------------------- echo " " if ($#argv != 0) then echo Usage: gp.amb exit 1 endif # BAIL OUT IF THERE IS NO SMOOTH.NIO FILE # --------------------------------------- if (! -e smooth.nio) then echo gp.amb: no smooth.nio file. exit 2 endif if (-e APVALSOUT) then rm APVALSOUT endif # MAKE AMBIGON NAMELIST; DELETE GOLD AND VNDP # ------------------------------------------- if (! -e ambigon.nml) then echo " " echo "gp.amb: Running AMB_NML2" amb_nml rgfile > ambigon.nml endif # Retrieve bias cutoff value from ProcessFlag # file. Replace the value in ambigon.nml. # ------------------------------------------- set BiasCutoff = `grep BiasCutoff ProcessFlags | awk '{print $2}'` replace BIASCUTOFF $BiasCutoff ambigon.nml grep bmax ambigon.nml # RUN AMBIGON # ----------- echo " " echo "gp.amb: Running AMBIGON2" rm uinv.nio ambigon.txt >& /dev/null ambigon2 ambigon.nml rgfile \ accume.nio smooth.nio \ uinv.nio ambigon.txt \ >& ambigon.out # Report bias fixing statistics # ----------------------------- echo "------------------------------------" set BiasCount = `grep " FIXED" ambigon.out | wc -l` echo "gp.amb: WideLanes fixed = $BiasCount" set BiasCount = `grep "NOT FIXED" ambigon.out | wc -l` echo "gp.amb: WideLanes not fixed = $BiasCount" set BiasCount = `grep FIX$ ambigon.out | wc -l` echo "gp.amb: NarrowLanes fixed = $BiasCount" set BiasCount = `grep LEAVE ambigon.out | wc -l` echo "gp.amb: NarrowLanes not fixed = $BiasCount" set BiasCount = `grep "bad widelane" ambigon.out | wc -l` echo "gp.amb: NarrowLanes not tried = $BiasCount" rm oafilternio.* APVALSOUT >& /dev/null echo " " echo "gp.amb: Running SMAPPER" rm smcov_amb.nio smsig_amb.nio smsol_amb.nio >& /dev/null smapper wash.nml oi.nio \ accume.nio smooth.nio \ uinv.nio smsol_amb.nio \ smcov_amb.nio smsig_amb.nio \ >& smapper_amb.log