Geophysics Labs Notebooks
This a collection of Jupyter Notebooks that I have written to illustrate or demonstrate the techniques and methods that are described in the blog posts on geophysicslabs.com.
Here is the list of notebooks so far, more will come soon!
- Color quantization with scikit-learn - part of How to add maps to OpendTect?
- Cropping and resampling a grid - part of How to add maps to OpendTect?
- How to convert a cross-section to SEGY? - part of How to add cross-sections to OpendTect?
Running the notebooks
The notebooks have been tested with Python 3.4 and 3.5. To install Python, using Anaconda is a good start. A default installation of Anaconda 4.2 includes Numpy, matplotlib, SciPy and scikit-learn, which should be enough for some notebooks. Additional packages might be required, and this depends on the notebook.
A common way to deal with different sets of packages and therefore dependencies is to create an environment. For example, the notebook about cropping and resampling needs
rasterio to run, so you could type this on the command line:
conda create -n geophysicslabs rasterio scipy matplotlib scikit-learn ipykernel
The addition of
ipykernel allows you to run the notebook with the new environment in Jupyter. In the menu, go to Kernel > Change kernel and select