559 字
3 分钟
绘图脚本
绘图脚本
1、利用Siesmic Unix 中的psimage 进行绘图
#!/bin/sh## Copyright (c) UPC lgl. All rights reserved.# *************************************************## ** Filename: imagesc.sh **## ** Author:Guolong Li(lgl) **## ** Date:2023.02.28 **## ** E-mail:[email protected] **## ** Aim: use psimage to plot image **## ** Environment: shell (Linux), Seismic Unix **## *************************************************#
psfile=image.dat # binaryfileoutname=image.epsnx=481 # number of samples in 2nd (slow) dimension nx->n2nz=234 # number of samples in 1st (fast) dimension nz->n1dx=10 # sampling interval Xdx=$dz#dz=10 # sampling interval Z
title='' # title of plot#xlabel='Distance(m)' # X轴标签 'Distance(m)' 'Distance(km)'#zlabel='Depth(m)' # Z轴标签 'Time(s)' 'Time(ms)' 'Depth(km)' 'Depth(m)'#legend=1 # 1 显示colorbar 0 不显示#cchar='wrgb=1.0,0,0 grgb=1.0,1.0,1.0 brgb=0,0,1.0'cchar='wrgb=0.6,0,0 grgb=0,0,0.8 brgb=0.376,0.376,0.376'#units='m/s' # unit label for legend
width=6.0 # width in inches of axes box 6.0height=6.0 # height in inches of axes box 8.0 图像大小labelfont=Times-Roman # font name for axes label Times-Roman Helveticalabelsize=18 # font size for axes labels 18titlefont=Helvetica-Bold #font name for titletitlesize=24 #font size for title 24xgrid2=none # grid lines on axis 2 - none, dot, dash, or solidzgrid1=none # grid lines on axis 1 - none, dot, dash, or solid 图 网格lstyle=vertright # vertleft vertright horibottom legend 位置legendfont=times_roman10 # times_roman10 font name for titlebckgr=0.5 # background gray value 0.5perc=99 # percentile used to determine clip 100lwidth=1.2 # colorscale (legend) width in inches 1.2lheight=$height/3 # colorscale (legend) height in inches height/3 legend 大小legendfont=times_roman10 # font name for legend titlelgrid=none # grid lines on legend axis - none, dot, dash, or solid legend 网格lx= # colorscale (legend) x-position in inches legend 位置nxf=0 # first sample in 2nd dimensionnzf=0 # first sample in 1st dimension 坐标轴起始绘制nxs=1.0 # factor by which to scale d2 before imaging Xnzs=1.0 # factor by which to scale d1 before imaging Z 缩放因子
## laplain 滤波
#suaddhead < $psfile n1=151>xx.su#sukfrac <xx.su power=2 phasefac=-1 d1=$dz d2=$dx>xx.bin#sustrip <xx.bin > lap.dat#psfile=lap.datpsimage < $psfile n1=$nz n2=$nx d2=$dx d1=$dz width=$width height=$height \ label1=$zlabel label2=$xlabel labelfont=$labelfont labelsize=$labelsize \ title=$title titlefont=$titlefont titlesize=$titlesize \legend=$legend\ lstyle=$lstyle legendfont=$legendfont $cchar bckgr=$bckgr perc=$perc \ lwidth=$lwith lheight=$lheight units=$units legendfont=$legendfont \ grid2=$xgrid2 grid1=$zgrid1 lgrid=$lgrid lx=$lx f2=$nxf f1=$nzf d1s=$nzs d2s=$nxs > $outname
#Some example colormap settings:# red white blue: wrgb=1.0,0,0 grgb=1.0,1.0,1.0 brgb=0,0,1.0# white red blue: wrgb=1.0,1.0,1.0 grgb=1.0,0.0,0.0 brgb=0,0,1.0# blue red white: wrgb=0.0,0.0,1.0 grgb=1.0,0.0,0.0 brgb=1.0,1.0,1.0# red green blue: wrgb=1.0,0,0 grgb=0,1.0,0 brgb=0,0,1.0# orange light-blue green: wrgb=1.0,.5,0 grgb=0,.7,1.0 brgb=0,1.0,0# red light-blue dark blue: wrgb=0.0,0,1.0 grgb=0,1.0,1.0 brgb=0,0,1.0
######## brgb=0.0,0.0,0.0 red, green, blue values corresponding to black# grgb=1.0,1.0,1.0 red, green, blue values corresponding to grey# wrgb=1.0,1.0,1.0 red, green, blue values corresponding to white# bhls=0.0,0.0,0.0 hue, lightness, saturation corresponding to black# ghls=0.0,1.0,0.0 hue, lightness, saturation corresponding to grey# whls=0.0,1.0,0.0 hue, lightness, saturation corresponding to white
#Legal font names are:# AvantGarde-Book AvantGarde-BookOblique AvantGarde-Demi AvantGarde-DemiOblique# Bookman-Demi Bookman-DemiItalic Bookman-Light Bookman-LightItalic# Courier Courier-Bold Courier-BoldOblique Courier-Oblique# Helvetica Helvetica-Bold Helvetica-BoldOblique Helvetica-Oblique# Helvetica-Narrow Helvetica-Narrow-Bold Helvetica-Narrow-BoldOblique# Helvetica-Narrow-Oblique NewCentrySchlbk-Bold NewCenturySchlbk-BoldItalic# NewCenturySchlbk-Roman Palatino-Bold# Palatino-BoldItalic Palatino-Italics Palatino-Roman# SanSerif-Bold SanSerif-BoldItalic SanSerif-Roman# Symbol Times-Bold Times-BoldItalic# Times-Roman Times-Italic ZapfChancery-MediumItalic