Skip to main content

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: take screenshot to clipboard
  • ctrl + P: propagates display accross all windows (same window size, same axis, same gain)
  • up/down/right/left arrows: pan using keyboard

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 conda_easyqc.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/*

Test wheel:

virtualenv easyqc --python=3.8
source ./easyqc/bin/activate
pip install easyqc
#pip install -i https://test.pypi.org/simple/ easyqc  # doesnt' seem to install deps

Project details


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.6.2.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

easyqc-0.6.2-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file easyqc-0.6.2.tar.gz.

File metadata

  • Download URL: easyqc-0.6.2.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for easyqc-0.6.2.tar.gz
Algorithm Hash digest
SHA256 7103296e4d2c589eeba5de4a6f4c44096560ac9a7b913a08a1ae0b900f28ab22
MD5 2350e5a365f77cbfdb93cedf21fdd5d6
BLAKE2b-256 84689edfccae3e3eb4aaf0fe1cc8f2b7aeaf80d34679f657eca25bb57a8250bc

See more details on using hashes here.

File details

Details for the file easyqc-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: easyqc-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for easyqc-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e4c7eab12b4ed5fdb2f5218b5b00fe305f5023bde44b6b7865bdeaa50028d011
MD5 4877bebd7efb496a842cf72fa25e31a5
BLAKE2b-256 54f382fec7602abedfe4714ce677db58b39fe54a5f7eeff27d34f8b6272b92f9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page