github代码:https://github.com/agile-geoscience/seisplot
下载code到本地,进入文件目录cmd.
python seisplot.py --demo 如果出现错误 >>>>
首先安装好需要用的包
- matplotlib
- numpy
- obspy
- pillow
- pyyaml
如: pip install matplotlib
然后点击运行seisplot.py 文件,如果出现错误
cannot import name 'makeMappingArray' from 'matplotlib.colors'
这代表你的matplotlib 版本过高
点击终端,输入命令:
pip install matplotlib==3.2.2
继续点击运行seisplot.py 文件,如果出现错误
UnicodeDecodeError: 'gbk' codec can't decode byte 0x99 in position 2003: illegal multibyte sequence
找到文件config.yml,双击进去,将82-84行所有单引号删除,删除后代码为:
# Interpolate variable density display. Acceptable values are none, nearest, # bilinear, bicubic, spline16, spline36, hanning, hamming, hermite, # kaiser, quadric, catrom, gaussian, bessel, mitchell, sinc, lanczos. interpolation: 'bicubic'
继续点击运行seisplot.py 文件,如果出现错误
UnboundLocalError: local variable 'segyio' referenced before assignment
运行
pip install segyio
继续点击运行seisplot.py 文件,如果成功运行
在终端运行demo文件,输入
python seisplot.py --demo
运行结果为:
F:Anaconda3libsite-packagesmatplotlibbackendsbackend_agg.py:183: RuntimeWarning: Glyph 28431 missing from current font. font.set_text(s, 0, flags=flags) ?[94moutput file ./data31_81_PR.png?[0m ?[92mSaved output in 1.3 s?[0m ?[95m ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ DONE?[0m
运行结果存入data文件夹,结果为png的图.
双击点开
接下来,你就可以运行自己的数据啦!
将你的segy数据(mysegy.sgy)存入data文件中
格式是这个样子的
python seisplot.py --datamysegy.sgy
成功运行,结果还是存入data中的,如果在pycharm没看到(没刷新),直接从我的电脑进去找到这个文件夹得地方就看到了.
Anaconda 运行虚拟环境也是一样的操作


