RepositoryJupyter NotebookITItaly
aadm

aadm/geophysical_notes

Collection of geophysical notes in the form of IPython/Jupyter notebooks.

173stars
78forks
1issues
1views

// geophysical_notes //

My collection of geophysical notes written as Jupyter notebooks.

(Mostly obsolete now, don't have time for a proper update; for example I stopped wasting my time with jupyter widgets and Panel for interactive apps and I am now using Streamlit).

seismic petrophysics

Do magic things with well log data.

support data for "seismic petrophysics"

  • well_2*.txt: raw log data from Well 2 of Quantitative Seismic Interpretation (QSI)
  • qsiwell2.csv: assembled all the logs from various files
  • qsiwell2_frm.csv: qsiwell2 + fluid replaced elastic logs
  • qsiwell2_augmented.csv: barebones well data, only Ip, Vp/Vs and LFC (litho-fluid class log)
  • qsiwell2_synthetic.csv: synthetic data generated through Monte Carlo simulation, same logs as in qsiwell2_augmented.csv (Ip, Vp/Vs and LFC)
  • qsiwell2_dataprep.py: Python script to assemble all the original QSI files

seismic and rock physics stuff

How to load and display SEG-Y files, plus some simple ways to play with the data, e.g. extracting amplitude informations, adding noise & filtering. Also, a notebook entirely dedicated to wedge modeling and how to reproduce a couple of figures from scientific publications.

support data for "seismic stuff"

  • 16_81_PT1_PR.SGY, 16_81_PT2_PR.SGY, 16_81_PT3_PR.SGY, 31_81_PR.SGY: 2D lines in SEGY format from the USGS Alaska dataset
  • 3d_farstack.sgy, 3d_nearstack.sgy: 3D cubes from the QSI dataset (see above)
  • Top_Heimdal_subset.txt: interpreted horizon for the QSI near and far angle cubes
  • ST10010ZC11_FAR_T_CROP.seisnc, ST10010ZC11_NEAR_MID_T_CROP.seisnc, ST10010ZC11_NEAR_T_CROP.seisnc: angle stacks from Equinor's Volve dataset
  • Interpreted horizons for the Volve seismic are in Horizons_TWT/Official_Horizons
  • volve10r12-full-twt-sub3d.sgy, hor_twt_hugin_fm_top.dat: small segy and interpreted horizon from segysak documentation examples (also from Volve dataset)

miscellaneous

Other notebook of interest, maybe only tangentially related to geophysics, such as a notebook showing a comparison between colormaps (the dreadful jet against a bunch of better alternatives) and another that uses the well known Gardner's equation as an excuse to practice data fitting in Python.

notes on running python

I used to recommend either Enthought's Canopy Express or Anaconda. I haven't been using Canopy for a while now and I'm very particular about installing stuff on my computers, so right now what I use (and suggest everyone else to do) is to install a subset of Anaconda called miniconda. Starting from this, it's easy to install the packages you need for your work and nothing else. For example, this is how I setup my system for work:

$ conda install numpy scipy pandas matplotlib jupyter scikit-learn scikit-image xarray dask netCDF4 bottleneck
$ conda install -c bokeh colorcet
$ conda install -c conda-forge jupyterlab

Then I install some additional packages with pip:

$ pip install bruges lasio segyio

Instead of integrated environments (for example, Spyder) I simply use a modern (and free!) editor like VSCode (Atom is a good alternative) to code and write. However, JupyterLab gets better everyday and it can already be used to do everything in a browser window (but to me it's still slower than a text editor and a jupyter console window); I like the idea of Juyter Notebooks to distribute commented code and simply as a working tool to make code interact with explanatory text and plots.

using SEG-Y data

To read and write SEG-Y data in Python you need additional libraries like ObsPy, Segpy or Equinor's segyio.

My current favourite is however segysak, based on segyio. In addition to the qualities of the underlying segyio (a 340 Mb file is read in 1 second, while obspy needs 8), it also adds some very cool features to map horizons to seismic cubes (amplitude extraction!).

# timeit results using segyio:
1.11 s ± 17.7 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

# timeit results using obspy:
8.85 s ± 1.07 s per loop (mean ± std. dev. of 7 runs, 1 loop each)

license

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

290.9k
Nov 30, 2026
RepositoryPython
shareAI-lab/learn-claude-code

Bash is all you need - A nano claude code–like 「agent harness」, built from 0 to 1

81.2k
Nov 15, 2026
RepositoryPython
MLEveryday/100-Days-Of-ML-Code

100-Days-Of-ML-Code中文版

22.2k
Oct 24, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryPython
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

379.9k
Sep 15, 2026
RepositoryPython
vinta/awesome-python

The definitive list that answers "I want to do X in Python, which tool should I use?"

338.6k
Nov 28, 2026
RepositoryPython
TheAlgorithms/Python

All Algorithms implemented in Python

226.6k
Nov 13, 2026
RepositoryPython
yt-dlp/yt-dlp

A feature-rich command-line audio/video downloader

212.4k
Dec 2, 2026
RepositoryC++
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

201.9k
Dec 1, 2026