numpy地震查看器
项目描述
EasyQC
使用pyqtgraph的numpy数组地震查看器。
使用说明
目标是提供一个交互式地震查看器。注意:如果您使用ipython
,请在之前使用%gui qt
魔术命令!
键盘快捷键
- ctrl + A: 显示增益增加+3dB
- ctrl + Z: 显示增益减少+3dB
- ctrl + P: 将截图复制到剪贴板
- ctrl + P: 将显示传播到所有窗口(相同窗口大小,相同轴,相同增益)
- ctrl + S: 在剪贴板中捕获绘图区域的截图
- 上/下/右/左箭头: 使用键盘平移
显示numpy数组的最小工作示例。
import numpy as np
import scipy.signal
from easyqc.gui import viewseis
ntr, ns, sr, dx, v1 = (500, 2000, 0.002, 5, 2000)
data = np.zeros((ntr, ns), np.float32)
data[:, 500:600] = scipy.signal.ricker(100, 4)
# create a record with 400 traces and 2500 samples
noise = np.random.randn(ntr, ns) / 10
# create an arbitrary layout of 2 receiver lines of 200 sensors
a, b = np.meshgrid(np.arange(ntr / 2) * 8 + 2000, np.arange(2) * 50 + 5000)
# the header is a dictionary of numpy arrays, each entry being the same length as the number of traces
header = {'receiver_line': b.flatten(), 'receiver_number': a.flatten()}
# show the array with the header
fig0 = viewseis(data, si=.002, h=header, title='clean')
fig1 = viewseis(data + noise, si=.002, h=header, title='noisy')
安装说明
1) 使用pip从PyPI安装
pip安装easyqc
2) 使用pip从源代码安装
建议使用虚拟环境和以开发模式(就地)安装
git clone https://github.com/oliche/easyqc.git
cd easyqc
pip install -e .
使用Anaconda从源代码安装
建议安装conda环境,并从源代码以开发模式运行
安装
git clone https://github.com/oliche/easyqc.git
conda env create -f conda_easyqc.yaml
conda activate iblenv
conda develop ./easyqc
更新
conda env update --file conda_easyqc.yaml --prune
或进行完全清理
conda env list
conda env remove -n easyqc
然后按照上面的安装说明进行。
贡献
Pypi发布清单
flake8
rm -fR dist
rm -fR .pdm-build
pdm publish
测试wheel
virtualenv easyqc --python=3.11
source ./easyqc/bin/activate
pip install easyqc
#pip install -i https://test.pypi.org/simple/ easyqc # doesnt' seem to install deps
项目详情
下载文件
下载您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分布
easyqc-1.0.0.tar.gz (17.3 kB 查看哈希值)
构建分布
easyqc-1.0.0-py3-none-any.whl (18.7 kB 查看哈希值)