# This script was used to produce a PNG (.png) image from SU (.su) files produced using "suconvert_stripnavheader". #! /bin/csh ## plotchirp_single echo "Process plotchirp_single usage:" echo " plotchirp_single tmin tmax sufile hbox clip" echo " tmin and tmax (seconds) to define the 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 " enter the % black clip ie, 95 (higher is lighter)" echo " " # get number of traces to be used in plot scale 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 for line $3" set ffidmin = `surange < $3.su | grep fldr | awk ' {print($2)}' ` set ffidmax = `surange < $3.su | grep fldr | awk ' {print($3)}' ` echo "The minimum FFID is "$ffidmin echo "The maximum FFID is "$ffidmax echo " " echo "Setting the sort order (data window), Set gain parameters" suwind key=fldr min=$ffidmin max=$ffidmax itmin=$1 tmin=$1 tmax=$2 verbose=0 < $3.su | \ #suchw key1=delrt a=0 | suchw key1=tracr key2=fldr | \ suchw key1=tstat a=0 | suchw key1=muts a=0 | suchw key1=mute a=0 > $3.tmp #sugain panel=0 tpow=2 gpow=0.9 epow=-50 > $3.tmp #sugain gagc=1 wagc=0.05 > $3.tmp echo "Set scaling for PS plot" # set the plot X size based on the number of traces/inch set wbox = `expr $numtraces / 80` 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 = 10 # set hbox = 12 # set hbox = 18 # set hbox = 20 set hbox = $4 echo "the plot height=" $hbox "inches" # PLOT POSTSCRIPT IMAGE # Change percentile for determining black clip value to adjust plot contrast # Higher bperc gives lighter plot - wclip=0 sets 0 and - amp. to white echo "Making the PostScript plot for line $3" supsimage wbox=$wbox hbox=$hbox \ ybox=0.5 \ x1beg=$1 x1end=$2 \ d1num=0.1 d2num=500 \ d2=1 \ n1tic=10 n2tic=5 \ # bperc=96 wclip=0 \ bperc=$5 wclip=0 \ grid1=dot grid2=dot \ title="2012-005-FA 512i Chirp Line $3 SHOTS $ffidmin-$ffidmax" \ label1="TWT [s]" label2="SHOT" \ < $3.tmp > $3.ps rm $3.tmp # convert PS plot to PNG image echo "Making png for line $3" convert -type grayscale -depth 8 $3.ps $3.png # Save the processing runline history for future processing #echo "plot512i $1 $2 $3 $4 $5" >> Proc.log # Remove the raw raster file #rm ../seisimag/*.raw rm *.ps