#! /bin/csh # proc_chirp echo "Process chirp usage:" echo " chirp tmin tmax sufile hbox" echo " tmin and tmax (seconds) determine vertical plot window" echo " ie, 0 0.25 (window 0 to 250 ms)" echo " the SU input file excluding the .su extension" echo " hbox is the vertical plot size in inches" echo " edit the chirp script to set the clipping parameter" echo " " #get number of traces echo "getting the total number of traces" set numtraces = `surange < $3.su | grep traces | awk ' {print($1)}' ` echo "number of traces = "$numtraces # get ffid range for input echo "getting the range of FFID's" set ffidmin = `surange < $3.su | grep fldr | sed 's/fldr=//; s/(//g; s/)//g' | awk ' {print($3)}' | awk -F , ' {print($1)}' ` set ffidmax = `surange < $3.su | grep fldr | sed 's/fldr=//; s/(//g; s/)//g' | awk ' {print($3)}' | awk -F , ' {print($2)}' ` echo "The minimum FFID is "$ffidmin echo "The maximum FFID is "$ffidmax echo " " echo "Making the PostScript plot" # select data window and gain suwind key=fldr min=$ffidmin max=$ffidmax itmin=0 tmin=$1 tmax=$2 verbose=0 < $3.su | \ suchw key1=delrt a=0 | \ sugain panel=0 scale=1 tpow=1.5 > $3.tmp # set the plot X size based on the number of traces/inch set wbox = `expr $numtraces / 100` echo "the plot length =" $wbox "inches" echo # set the plot Y size (hbox) in inches set tmin = $1 echo "tmin ="$tmin set tmax = $2 echo "tmax ="$tmax # set hbox = echo $1 $1 | awk ' {print($2)}' # set hbox = 12 # set hbox = 18 # set hbox = 20 set hbox = $4 echo "the plot hieght=" $hbox "inches" # PLOT POSTSCRIPT IMAGE # d1 is the sample interval (SR) in seconds that should be read from the header # If the vertical scale is not correct - most likely the SR is not correct # d1=0.000122 d2=1 \ # Change percentile for determining black clip value to adjust plot contrast # Higher bperc gives lighter plot - wclip=0 sets 0 and - amp. to white supsimage wbox=$wbox hbox=$hbox \ ybox=0.5 \ x1beg=$1 x1end=$2 \ d1num=0.02 d2num=500 \ n1tic=10 n2tic=10 \ bperc=99 wclip=0 \ brgb=0.0,0.0,0.0 wrgb=1.0,1.0,1.0 bps=12 \ bhls=0.0,1.0,0.0 whls=0.0,1.0,0.0 \ grid1=dot grid2=dot \ title="FERR98029 SIS 1000 Chirp $3 SHOTS $ffidmin-$ffidmax" \ label1="TWT [s]" label2="traces = ffid/2" \ < $3.tmp > $3.ps rm $3.tmp # view the PS with GhostView #gv -portrait $3.ps # convert PS plot to raster for Raytheon TDU printer #tduseismic $3 # convert PS plot to GIF image make_gif $3