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)
  • ctrl + S: captures screenshot of the plot area in the clipboard
  • 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:

If you want to control which Qt binding you are using, pick your favourite in the list below:

uv pip install easyqc[pyqt5]
uv pip install easyqc[pyqt6]
uv pip install easyqc[pyside2]
uv pip install easyqc[pyside6]

If you already have Qt installed in your environment:

uv 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 uv

I suggest to install a new uvenvironment and run from sources in development mode.

Installation

git clone https://github.com/oliche/easyqc.git
uv python install 3.13
uv venv --python 3.13
uv pip install -e .

Contribution

pdm is used to manage the dependencies and the virtual environment. pip install pdm to install it.

Pypi Release checklist

  • Update version in pyproject.toml
  • Ruff ruff check .
  • Ruff ruff format .
  • publish on pypi:
rm -fR dist
rm -fR .pdm-build
pdm publish
  • tag the commit
git tag -a 1.0.0
git push origin 1.0.0

Test 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

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easyqc-1.2.0-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: easyqc-1.2.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.26.6 CPython/3.11.10 Linux/6.8.0-49-generic

File hashes

Hashes for easyqc-1.2.0.tar.gz
Algorithm Hash digest
SHA256 801485a3e2b55f4cb5f03fe548eee0f83d2db22b6ddb2e84803cf1067a0ab46e
MD5 5b2c73bff38abf728d660718e538c59f
BLAKE2b-256 251ee368c2d8553d37092e00a01a6e01f77acd591866ed4bc0493cb7f0fb46ca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: easyqc-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.26.6 CPython/3.11.10 Linux/6.8.0-49-generic

File hashes

Hashes for easyqc-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5f02b0f0a495096ac30d22485ae5f962ad06b08d9d9b3e7fb8efc76232a5cf7
MD5 00fea91c1929c5ac36d2dae9e7707231
BLAKE2b-256 f5aa03d625aed6a0a6e7c1dcb5e6e4ffabb9fdfb202ee41dc9eafb66e88e7283

See more details on using hashes here.

Supported by

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