#!/bin/tcsh -f
# interface for plotting elastic-Property vs. Theta and Phi curves as Pm3d plot (Heat Map plot) HeatMap_lapw
# data is generated with Package provided by Morteza Jamal(2024)"
#
unalias rm
alias BTcolor 'tput setab 0;tput setaf 11'	#i define it for Background and Text Color
alias BTcolor2 'tput setab 0;tput setaf 15'	#i define it for Background and Text Color

tty -s < /dev/stdout
set cpvc = $status  #check program value for color#
if ( $cpvc == 0 ) then
BTcolor
endif

echo ""
echo ""
echo "######################################################################################"
IRelakit.tmpHeat
echo "######################################################################################"
echo ""
sleep 5
set tmp  = tmp
set tmp2 = tmp2
set print = print.png
set file    = `pwd`
set file    = $file:t
unset help
set rgbc = 'set palette rgb 7,5,15  #default'
set splmax = ''
set splmin = ''
set multi = 'set multiplot layout 1,1'
set orig = ''
set orig2 = ''
set orig3 = ''
set title = ''
set tit = ''
set tit2 = 'set title "" '
set tit3 = 'set title "" '
set size = ''
set size2 = ''
set size3 = ''
set size3p = 'set size 0.333 ,1.1'
set fosi = "'Verdana,10'"
set pname2 = ''
set pname3 = ''
unset you
unset lin
unset bul
unset shr
unset poi
unset dir
unset ppm
unset pfm
unset psm
unset ppfs
unset gpm
unset gfm
unset gsm
unset gpfs
unset all
unset sho
unset dd
set i = 0
set hardcopy = y

alias SB 'shift; breaksw'	#i define it for using in switch
alias GM 'goto makegnu'
alias GM2Dcut 'goto makegnu2Dcut'
alias RgnuQcop 'gnuplot $tmp; echo ""; echo -n " Do you want a hardcopy? (y/N)";'\
     'set hardcopy = ($<)'

#------------------check program gnuplot-------------------------------
set fexe = `echo "gnuplot"`
which $fexe >& /dev/null
set cpv = $status  #check program value#
if ( $cpv == 0 ) then
echo ""
echo " gnuplot program found..."
echo ""
else
goto errorEXE
endif
if ( $cpvc == 0 ) then
BTcolor2
endif

#----------------------------------------------------------------

while ($#argv)
 set label = `echo "$1" | tr "A-Z" "a-z"`
  switch ($label)
  case -h:
    set help
    goto help
    SB
  case -you:
    set you
    @ i = $i + 1
    SB
  case -lin:
    set lin
    @ i = $i + 1
    SB
  case -dir:
    set dir
    @ i = $i + 1
    SB
  case -bul:
    set bul
    @ i = $i + 1
    SB
  case -shr:
    set shr
    @ i = $i + 1
    SB
  case -poi:
    set poi
    @ i = $i + 1
    SB

  case -ppm:
    set ppm
    @ i = $i + 1
    SB
  case -pfm:
    set pfm
    @ i = $i + 1
    SB
  case -psm:
    set psm
    @ i = $i + 1
    SB
  case -ppfs:
    set ppfs
    @ i = $i + 1
    SB

  case -gpm:
    set gpm
    @ i = $i + 1
    SB
  case -gfm:
    set gfm
    @ i = $i + 1
    SB
  case -gsm:
    set gsm
    @ i = $i + 1
    SB
  case -gpfs:
    set gpfs
    @ i = $i + 1
    SB
  case -all:
    set all
    set you
    set lin
    set bul
    set dir
    set poi
    set shr
    set ppm
    set pfm
    set psm
    set ppfs
    set gpm
    set gfm
    set gsm
    set gpfs
    set i = 14
    SB

  case -sho:
    set sho
    SB
  case -2d:
    set dd
    SB

  case -cdef:
    set rgbc = 'set palette rgb 7,5,15  #default'
    SB

  case -coce:
    set rgbc = 'set palette rgb 23,28,3 #ocean (green-blue-white)'
    SB

  case -ccub:
    set rgbc = 'set palette cubehelix'
    SB
    
   case -cpog:
    set rgbc = 'set palette rgb 30,31,32 #color printable on gray (black-blue-violet-yellow-white)'
    SB

   case -chot:
    set rgbc = 'set palette rgb 21,22,23 #hot'
    SB

  default:
    echo " Your Parameter not found..."
    echo " see         HeatMap_lapw -h"
    SB
  endsw

end #while

set j = 1

if ($?dd) then
   goto HM2Dcut
endif


set out = "HM.png"
set cof = 1
while ( $j <= $i )
set puls2 = 0
  if ($?gpfs) then
    set puls2 = 3
    set pname = Group
    set c3 = '$16'
    set cof = 1000
    set tit = 'set title "Group-Velocity P-Mode (Km/s)"'

    set cmax = '$17'
    set tit2 = 'set title "Group-Velocity F-Mode (Km/s)"'

    set cmin = '$18'
    set tit3 = 'set title "Group-Velocity S-Mode (Km/s)"'
    unset gpfs
    GM
  endif

  if ($?ppfs) then
    set puls2 = 3
    set pname = Phase
    set c3 = '$13'
    set cof = 1000

    set tit = 'set title "Phase-Velocity P-Mode (Km/s)"'

    set cmax = '$14'
    set tit2 = 'set title "Phase-Velocity F-Mode (Km/s)"'

    set cmin = '$15'
    set tit3 = 'set title "Phase-Velocity S-Mode (Km/s)"'
    unset ppfs
    GM
  endif


 if ($?shr) then
    set puls2 = 3
    set pname = Shear-Rati
    set c3 = '$6'
    set tit = 'set title "{Shear modulus}_{ave} (GPa)"'

    set cmax = '$7'
    set tit2 = 'set title "{Shear modulus}_{max} (GPa)"'

    set cmin = '$8'
    set tit3 = 'set title "{Shear modulus}_{min} (GPa)"'
    unset shr
    GM
 endif

  if ($?poi) then
    set puls2 = 3
    set pname = Poisson-Rati
    set c3 = '$9'
    set tit = 'set title "{Poissons ratio}_{ave}"'

    set cmax = '$10'
    set tit2 = 'set title "{Poissons ratio}_{max}"'

    set cmin = '$11'
    set tit3 = 'set title "{Poissons ratio}_{min}"'
    unset poi
    GM
 endif
    
  if ($?you) then
    set pname = Young-Modu
    set c3 = '$3'
    set tit = 'set title "Young modulus (GPa)"'
    unset you
    GM
  endif
    
  if ($?lin) then
    set pname = Linear-Comp
    set c3 = '$4'
    set tit = 'set title "Linear compressibility (TPa-1)"'
    unset lin
    GM
  endif

  if ($?dir) then
    set pname = Direc-Bulk
    set c3 = '$5'
    set tit = 'set title "Directional Bulk modulus (TPa)"'
    unset dir
    GM
  endif

  if ($?bul) then
    set pname = Bulk-Modu
    set c3 = '$12'
    set tit = 'set title "Volume Bulk modulus (GPa)"'
    unset bul
    GM
 endif

  if ($?ppm) then 
    set pname = Phase-Prim
    set c3 = '$13'
    set cof = 1000
    set tit = 'set title "Phase-Velocity P-Mode (Km/s)"'
    unset ppm
    GM
    endif
    
  if ($?pfm) then
    set pname = Phase-Fast
    set c3 = '$14'
    set cof = 1000
    set tit = 'set title "Phase-Velocity F-Mode (Km/s)"'
    unset pfm
    GM
  endif
    
    
  if ($?psm) then
    set pname = Phase-Slow
    set c3 = '$15'
    set cof = 1000
    set tit = 'set title "Phase-Velocity S-Mode (Km/s)"'
    set fosi = "'Verdana,10'"
    unset psm
    GM
  endif
    
  if ($?gpm) then
    set pname = Group-Prim
    set c3 = '$16'
    set cof = 1000
    set tit = 'set title "Group-Velocity P-Mode (Km/s)"'
    unset gpm
    GM
  endif
    
  if ($?gfm) then
    set pname = Group-Fast
    set c3 = '$17'
    set cof = 1000
    set tit = 'set title "Group-Velocity F-Mode (Km/s)"'
    unset gfm
    GM
  endif
    
  if ($?gsm) then
    set pname = Group-Slow
    set c3 = '$18'
    set cof = 1000
    set tit = 'set title "Group-Velocity S-Mode (Km/s)"'
    unset gsm
    GM
  endif


makegnu:
#---------------------check input file----------
if !(-e "ThPhCalP.dat") then
  set filer = "ThPhCalP.dat"
  goto error
endif
#-----------------------------------------------
set c1 = '$1'
set c2 = '$2'
set print = "$pname$out"
set spl = "sp 'ThPhCalP.dat' u ($c1):($c2):($c3/$cof) w  pm3d notitle"

#if ($?shr || $?poi || $?gpfs || $?ppfs) then
if ($puls2 == 3) then
set splmax = "sp 'ThPhCalP.dat' u ($c1):($c2):($cmax/$cof) w  pm3d notitle"
set splmin = "sp 'ThPhCalP.dat' u ($c1):($c2):($cmin/$cof) w  pm3d notitle"
    set multi = 'set multiplot layout 1,3'
    set orig = 'set origin 0.0,-0.03'
    set orig2 = 'set origin 0.33,-0.03'
    set orig3 = 'set origin 0.66,-0.03'
    set size = "$size3p"
    set size2 = "$size3p"
    set size3 = "$size3p"
set fosi = "'Verdana,23' size 2700,900"
endif


@ j = $j + 1

rm -f $tmp

#if ($?terminal) then
#endif

  if ($?all) goto down

if ($?sho) then

cat <<EOF >$tmp
#Gunplot file for plotting Elastic Properties Vs Theta and Phi as Pm3d
reset
#set terminal pngcairo enhanced font $fosi
$multi
set format z "%11.4e"
set xlabel "{/Symbol q} (Degree)"  
set ylabel "{/Symbol f} (Degree)" 
set xrange [0:180]
set yrange [0:180]
set view map
$rgbc

#unset ztics

set xtics format "%3.0f"
set xtics 30 
set mxtics 3

set ytics format  "%3.0f" 
set ytics 30  
set mytics 3

$size
$orig
$tit
$spl

unset ylabel
$size2
$orig2
$tit2
$splmax

$size3
$orig3
$tit3
$splmin

unset multiplot
reset
pause -1 "  Press <enter> to continue..."
EOF

RgnuQcop
endif   #sho

down:

if ($hardcopy == y || $hardcopy == Y ) then

cat <<EOF >$tmp
#Gunplot file for plotting Elastic Properties Vs Theta and Phi as Pm3d
reset
set terminal pngcairo enhanced font $fosi
set output  "$print"
$multi
set format z "%11.4e"
set xlabel "{/Symbol q} (Degree)"  
set ylabel "{/Symbol f} (Degree)" 
set xrange [0:180]
set yrange [0:180]
set view map
$rgbc

#unset ztics

set xtics format "%3.0f"
set xtics 30 
set mxtics 3

set ytics format  "%3.0f" 
set ytics 30  
set mytics 3

$size
$orig
$tit
$spl

unset ylabel
$size2
$orig2
$tit2
$splmax

$size3
$orig3
$tit3
$splmin


unset multiplot
unset output
reset
EOF

gnuplot $tmp >& /dev/null 
echo " $print was generated... "
echo ""

endif

set splmax = ''
set splmin = ''
set multi = 'set multiplot layout 1,1'
set orig = ''
set orig2 = ''
set orig3 = ''
set title = ''
set tit = ''
set tit2 = 'set title "" '
set tit3 = 'set title "" '
set size = ''
set size2 = ''
set size3 = ''
set size3p = 'set size 0.333 ,1.1'
set fosi = "'Verdana,10'"


end  #while


exit

------------------------Heat Map of 2D-cut----------------------
HM2Dcut:
set gnuV = `gnuplot -V | awk '{print int($2)}'`
if ($gnuV >= 6) then
echo "gnuplot supports polar gridding"
sleep 4
else
echo ""
echo "The version of gnuplot does not support polar gridding"
echo "Can not run      HeatMap_lapw -all -2d "
echo "                   or                  "
echo "                 HeatMap_lapw -2d ...."
echo ""
sleep 4
goto errorgnuV
endif

set c3 = '$3'
set c4 = '$4'
set hm = "HM2DC.png"  #2DC=2D-CUT
set db = "2DB.dat"
set fosi = "'Verdana,10'"

while ( $j <= $i )
set cof = 1
set puls = 0
set puls2 = 0

  if ($?gpfs) then
    set puls = 2
    set puls2 = 3
    set cof = 1000 
    set pname = 'Group-Prim'
    set pname2 = 'Group-Fast'
    set pname3 = 'Group-Slow'

    set tit = 'set title "Group-Velocity P-Mode (Km/s)"'

    set tit2 = 'set title "Group-Velocity F-Mode (Km/s)"'

    set tit3 = 'set title "Group-Velocity S-Mode (Km/s)"'

    unset gpfs
    GM2Dcut
  endif

  if ($?ppfs) then
    set puls = 1
    set puls2 = 3
    set cof = 1000 
    set pname = 'Phase-Prim'
    set pname2 = 'Phase-Fast'
    set pname3 = 'Phase-Slow'

    set tit = 'set title "Phase-Velocity P-Mode (Km/s)"'

    set tit2 = 'set title "Phase-Velocity F-Mode (Km/s)"'

    set tit3 = 'set title "Phase-Velocity S-Mode (Km/s)"'

    unset ppfs
    GM2Dcut
  endif

 if ($?shr) then
    set puls2 = 3
    set pname = 'Shear-Rati'
    set tit = 'set title "{Shear modulus}_{ave} (GPa)"'

    set pname2 = 'Shear-Maxi'
    set tit2 = 'set title "{Shear modulus}_{max} (GPa)"'

    set pname3 = 'Shear-Mini'
    set tit3 = 'set title "{Shear modulus}_{min} (GPa)"'
    unset shr
    GM2Dcut
 endif

  if ($?poi) then
    set puls2 = 3
    set pname = 'Poisson-Rati'
    set pname2 = 'Poisson-Maxi'
    set pname3 = 'Poisson-Mini'

    set tit = 'set title "{Poissons ratio}_{ave}"'
    set tit2 = 'set title "{Poissons ratio}_{max}"'
    set tit3 = 'set title "{Poissons ratio}_{min}"'
    unset poi
    GM2Dcut
 endif


  if ($?you) then
    set pname = 'Young-Modu'
    set tit = 'set title "Young modulus (GPa)"'
    unset you
    GM2Dcut
  endif
    
  if ($?lin) then
    set pname = 'Linear-Comp'
    set tit = 'set title "Linear compressibility (TPa-1)"'
    unset lin
    GM2Dcut
  endif

  if ($?dir) then
    set pname = 'Direc-Bulk'
    set tit = 'set title "Directional Bulk modulus (TPa)"'
    unset dir
    GM2Dcut
  endif

  if ($?bul) then
    set pname = 'Bulk-Modu'
    set tit = 'set title "Volume Bulk modulus (GPa)"'
    unset bul
    GM2Dcut
 endif

  if ($?ppm) then
    set cof = 1000 
    set pname = 'Phase-Prim'
    set tit = 'set title "Phase-Velocity P-Mode (Km/s)"'
    unset ppm
    GM2Dcut
    endif
    
  if ($?pfm) then
    set cof = 1000 
    set pname = 'Phase-Fast'
    set tit = 'set title "Phase-Velocity F-Mode (Km/s)"'
    unset pfm
    GM2Dcut
  endif
    
    
  if ($?psm) then
    set cof = 1000 
    set pname = 'Phase-Slow'
    set tit = 'set title "Phase-Velocity S-Mode (Km/s)"'
    unset psm
    GM2Dcut
  endif
    
  if ($?gpm) then
    set cof = 1000 
    set pname = 'Group-Prim'
    set tit = 'set title "Group-Velocity P-Mode (Km/s)"'
    unset gpm
    GM2Dcut
  endif
    
  if ($?gfm) then
    set cof = 1000 
    set pname = 'Group-Fast'
    set tit = 'set title "Group-Velocity F-Mode (Km/s)"'
    unset gfm
    GM2Dcut
  endif
    
  if ($?gsm) then
    set cof = 1000 
    set pname = 'Group-Slow'
    set tit = 'set title "Group-Velocity S-Mode (Km/s)"'
    unset gsm
    GM2Dcut
  endif


makegnu2Dcut:
#---------------------check input file----------
if !(-e "$pname$db") then
  set filer = "$pname$db"
  goto error
endif

if ($puls2 == 3) then
  if !(-e "$pname2$db") then
   set filer = "$pname2$db"
   goto error
  endif
  if !(-e "$pname3$db") then
   set filer = "$pname3$db"
   goto error
  endif
 
endif 
#-----------------------------------------------

set splmax = ""
set splmin = ""
set stat2 = ""
set stat3 = ""
set stateq2 = ""
set stateq3 = ""
set rtic2 = ""
set rtic3 = ""
set keyrm2 = ""
set polgrid2 = ""
set polgrid3 = ""
set colbox = 'set colorbox user origin 0.8, 0.15 size 0.04, 0.6'
set colbox2 = ""
set colbox3 = ""
set spl = "plot '$pname$db' using ($c3):($c4/$cof):0 with surface title 'qnorm 1','' using ($c3):($c4/$cof):0 with points pt 7 lc 'green' title 'with points'"
set stat = "stats '$pname$db' using 4 nooutput"
set stateq = "sta1= STATS_max"

#if ($?shr || $?poi || $?gpfs || $?ppfs) then
if ($puls2 == 3) then
set multi = 'set multiplot layout 1,3'
set colbox = 'set colorbox user origin 0.295, 0.3 size 0.01, 0.4'

set splmax = "plot '$pname2$db' using ($c3):($c4/$cof):0 with surface title 'qnorm 1','' using ($c3):($c4/$cof):0 with points pt 7 lc 'green' title 'with points'"
set splmin = "plot '$pname3$db' using ($c3):($c4/$cof):0 with surface title 'qnorm 1','' using ($c3):($c4/$cof):0 with points pt 7 lc 'green' title 'with points'"
set stat2 = "stats '$pname2$db' using 4 nooutput"
set stateq2 = "sta2= STATS_max"
set rtic2 = 'set rtics (sta2/(2*cof))'
set keyrm2 = 'set key rmargin vertical top title ""'
set polgrid2 = 'set polar grid theta [0:360] r [(0.9*(sta2))/cof:(sta2)/cof]'
set colbox2 = 'set colorbox user origin 0.625, 0.3 size 0.01, 0.4'

set stat3 = "stats '$pname3$db' using 4 nooutput"
set stateq3 = "sta3= STATS_max"
set rtic3 = 'set rtics (sta3/(2*cof))'
set polgrid3 = 'set polar grid theta [0:360] r [(0.9*(sta3))/cof:(sta3)/cof]'
set colbox3 = 'set colorbox user origin 0.955, 0.3 size 0.01, 0.4'

    set orig = 'set origin 0.0,-0.03'
    set orig2 = 'set origin 0.33,-0.03'
    set orig3 = 'set origin 0.66,-0.03'
    set size = "$size3p"
    set size2 = "$size3p"
    set size3 = "$size3p"
set fosi = "'Verdana,23' size 2700,900"
endif

@ j = $j + 1

rm -f $tmp

#if ($?terminal) then
#endif

  if ($?all) goto down2Dcut

if ($?sho) then

cat <<EOF >$tmp
#Gunplot file for plotting Elastic Properties Vs Angle

if (!strstrt(GPVAL_COMPILE_OPTIONS, "+POLARGRID")) {
    print "This copy of gnuplot does not support polar gridding"
    exit  # return to caller
}
$multi
$stat
$stateq
$stat2
$stateq2
$stat3
$stateq3
cof=$cof
print 'Maximum:',sta1
set key rmargin vertical top title "Polar gridded" font ":Bold"
#set key samplen 0.5
#set lmargin 5
#set rmargin screen 0.7

set ang degree
set polar
set rrange [*:*] noextend
#set isotropic
set tics front

unset xtics
unset ytics
set rtics (sta1/(2*cof))
set ttics 0,30,330
set border 0 polar
#unset colorbox

#set polar grid 360, 50 theta [0:360] gauss kdensity scale 30
set polar grid theta [0:360] r [(0.9*(sta1))/cof:(sta1)/cof]
 set grid front
#set palette cubehelix negative
#set palette cubehelix 
#set palette rgb 30,31,32 #color printable on gray (black-blue-violet-yellow-white)
#set palette rgb 23,28,3 #ocean (green-blue-white)
#set theta top clockwise
$rgbc
$colbox 

set size ratio -1
$size
$orig
$tit
$spl

unset ylabel
#set key rmargin vertical top title ""
$size2
$orig2
$keyrm2
$rtic2
$tit2
$colbox2 
$polgrid2
$splmax



#set key rmargin vertical top title ""
$size3
$orig3
$rtic3
$tit3
$colbox3 
$polgrid3
$splmin

show polar
show theta
unset multiplot
reset
pause -1 "  Press <enter> to continue..."
EOF

RgnuQcop
endif   #sho

down2Dcut:

if ($hardcopy == y || $hardcopy == Y ) then
set print = $pname$hm
if ($puls == 1 ) set print = "Phase$hm"
if ($puls == 2 ) set print = "Group$hm"


cat <<EOF >$tmp
#Gunplot file for plotting Elastic Properties Vs Theta and Phi as Pm3d
reset
if (!strstrt(GPVAL_COMPILE_OPTIONS, "+POLARGRID")) {
    print "This copy of gnuplot does not support polar gridding"
    exit  # return to caller
}

set terminal pngcairo enhanced font $fosi
set output  "$print"
$multi
$stat
cof=$cof
print 'Maximum:',STATS_max
set key rmargin vertical top title "Polar gridded surface" font ":Bold"
#set key samplen 0.5
#set lmargin 5
#set rmargin screen 0.7

set ang degree
set polar
set rrange [*:*] noextend
#set isotropic
set tics front

unset xtics
unset ytics
set rtics (STATS_max/(2*cof))
set ttics 0,30,330
set border 0 polar
#unset colorbox

#set polar grid 360, 50 theta [0:360] gauss kdensity scale 30
set polar grid theta [0:360] r [(0.9*(STATS_max))/cof:(STATS_max)/cof]
 set grid front
#set palette cubehelix negative
#set palette cubehelix 
#set palette rgb 30,31,32 #color printable on gray (black-blue-violet-yellow-white)
#set palette rgb 23,28,3 #ocean (green-blue-white)
#set theta top clockwise
$rgbc

set colorbox user origin 0.8, 0.15 size 0.04, 0.6

set size ratio -1
$size
$orig
$tit
$spl

unset ylabel
$size2
$orig2
$tit2
$stat2
$splmax

$size3
$orig3
$tit3
$stat3
$splmin

show polar
show theta
unset multiplot

unset multiplot
unset output
reset
EOF

gnuplot $tmp >& /dev/null 
echo " $print was generated... "
echo ""

endif

set splmax = ''
set splmin = ''
set multi = 'set multiplot layout 1,1'
set orig = ''
set orig2 = ''
set orig3 = ''
set title = ''
set tit = ''
set tit2 = 'set title "" '
set tit3 = 'set title "" '
set size = ''
set size2 = ''
set size3 = ''
set size3p = 'set size 0.333 ,1.1'
set fosi = "'Verdana,10'"

end  #while

errorgnuV:
exit
------------------------End Heat Map 0f 2D-cut-----------------


#---------------------------------------------------------------

errorEXE:					#error exit	
printf "\n   stop error: Required program $fexe not found\n" 
printf "\n" 
exit(1)
#---------------------------------------------------------------
#---------------------------------------------------------------
error:
echo ">>>"
echo ">>> ERROR: $filer not found\!"
echo ">>> ERROR:"
echo ">>>"
exit(2)
#---------------------------------------------------------------

help:

cat <<EOF
       PROGRAM: HeatMap_lapw

             A plotting interface to creat heat maps. The choice of which style to use is
             dictated by the type of data. it plots elastic properties vs. Theta and phi as 
             pm3d curves in three-dimensional data set or elastic properties vs. Theta in 
             two-dimensional data set (for 2D-CUT and in polar coordinates,'-2d' option).

       PURPOSE: plot heat map of elastic constants properties for 3D(spherical coordinates)
                /2D(polar coordinates) data set as png format.
      
       USAGE:   HeatMap_lapw [OPTIONS] [FLAGS]
       FLAGS:   -h/-H ---->  help

                 
       OPTIONS:
       -you ---> 2D plot(heat map) of Young Modulus
       -lin:     2D plot(heat map) of Linear Compressibility
       -shr ---> 2D plot(heat map) of Shear Ratio
       -poi:     2D plot(heat map) of Poisson's Ratio 
       -dir ---> 2D plot(heat map) of Directional Bulk Modulus
       -bul:     2D plot(heat map) of Bulk Modulus
       -ppm ---> 2D plot(heat map) of Phase Velocity: P-Mode
       -psm:     2D plot(heat map) of Phase Velocity: S-Mode
       -pfm ---> 2D plot(heat map) of Phase Velocity: F-Mode
       -gpm:     2D plot(heat map) of Group Velocity: P-Mode
       -gsm ---> 2D plot(heat map) of Group Velocity: S-Mode
       -gfm:     2D plot(heat map) of Group Velocity: F-Mode
      -ppfs:---> 2D plot(heat map) of Phase Velocity: P,F,S Mode
      -gpfs:     2D plot(heat map) of Group Velocity: P,F,S Mode
      -all :---> 2D plot(heat map) of all properties
      -2d  :     Generate a 2D polar heat map in range of theta and r(for 2D-CUT)
                 if gnuplot supports polar gridding
      -sho :---> Show and then generates heat map plots (excluding "-all")
 
       HEAT MAP COLOR OPTIONS:
       -cdef:     #DEFault
       -coce:     #OCEean (green-blue-white)
       -ccub:     #CUBehelix
       -cpog:     #color Printable On Gray (black-blue-violet-yellow-white)
       -chot:     #HOT
 
EOF
