Seismic viewer for numpy
Project description
EasyQC
Seismic Viewer for numpy arrays using pyqtgraph.
Usage Instructions
The goal is to provide an interactive seismic viewer at the python prompt.
NB: if you use ipython
use the %gui qt
magic command before !
Keyboard Shortcuts
- ctrl + A: increase display gain by +3dB
- ctrl + Z: deacrease display gain by +3dB
- ctrl + P: propagates display accross all windows (same window size, same axis, same gain)
Minimum working example to display a numpy array.
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')
Install Instructions
1) From pypi using pip:
pip install easyqc
2) From sources using pip:
I suggest to use a virtual environment and install in development mode (in-place)
git clone https://github.com/oliche/easyqc.git
cd easyqc
pip install -e .
3) From sources using anaconda
I suggest to install a conda environment and run from sources in development mode.
Installation
git clone https://github.com/oliche/easyqc.git
conda env create -f ./seisview/env_seisview.yaml
conda activate iblenv
conda develop ./easyqc
Update
conda env update --file conda_easyqc.yaml --prune
Or for a complete clean-up:
conda env list
conda env remove -n easyqc
And follow the install instructions above.
Contribution
Pypi Release checklist:
flake8
rm -fR dist
rm -fR build
python setup.py sdist bdist_wheel
#twine upload dist/*
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
pip install -U easyqc
Test wheel:
virtualenv easyqc --python=3.8
source ./easyqc/bin/activate
pip install -i https://test.pypi.org/simple/ easyqc
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
easyqc-0.0.14.tar.gz
(8.9 kB
view details)
Built Distribution
File details
Details for the file easyqc-0.0.14.tar.gz
.
File metadata
- Download URL: easyqc-0.0.14.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83a6c7ca8574766aabc9ba82826efd01cb5d134b5985524feea6c491c5c27218 |
|
MD5 | 6606a5b71b829611e0e4cf8aed85fc16 |
|
BLAKE2b-256 | c752c8ca0121d5ba53f45b34925693e34153b9d2ebfe1b6d927c29345130f6bc |
File details
Details for the file easyqc-0.0.14-py3-none-any.whl
.
File metadata
- Download URL: easyqc-0.0.14-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 051b041031bf81580eca79418164e8021a35cd541fc5b5458ee9d96dcb615de3 |
|
MD5 | f63d941330b87e8cc280af403d1c0238 |
|
BLAKE2b-256 | b83563a75eafc8b0cea1bc5a1900a313c4cd8b5bab7f01e49c3598eb603915f0 |