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:1712343961@qq.com **#
# ** Aim: use psimage to plot image **#
# ** Environment: shell (Linux), Seismic Unix **#
# *************************************************#
psfile=image.dat # binaryfile
outname=image.eps
nx=481 # number of samples in 2nd (slow) dimension nx->n2
nz=234 # number of samples in 1st (fast) dimension nz->n1
dx=10 # sampling interval X
dx=$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.0
height=6.0 # height in inches of axes box 8.0 图像大小
labelfont=Times-Roman # font name for axes label Times-Roman Helvetica
labelsize=18 # font size for axes labels 18
titlefont=Helvetica-Bold #font name for title
titlesize=24 #font size for title 24
xgrid2=none # grid lines on axis 2 - none, dot, dash, or solid
zgrid1=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 title
bckgr=0.5 # background gray value 0.5
perc=99 # percentile used to determine clip 100
lwidth=1.2 # colorscale (legend) width in inches 1.2
lheight=$height/3 # colorscale (legend) height in inches height/3 legend 大小
legendfont=times_roman10 # font name for legend title
lgrid=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 dimension
nzf=0 # first sample in 1st dimension 坐标轴起始绘制
nxs=1.0 # factor by which to scale d2 before imaging X
nzs=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.dat
psimage < $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
绘图脚本
https://tuoyuangui.github.io/website/posts/typora/seismicunix/绘图脚本/
作者
椭圆规/tuoyuangui
发布于
2023-05-18
许可协议
CC BY-NC-SA 4.0