{ "cells": [ { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "# Geophysics Labs Notebooks\n", "\n", "Hi!\n", "\n", "This repository hosts the Jupyter notebooks of the [Geophysics Labs Blog](http://geophysicslabs.com/).\n", "\n", "The notebooks show how to use the methods I describe in the blog posts.\n", "Here is the list of notebooks so far, more will come soon!\n", "\n", "1. [Color quantization with scikit-learn](notebooks/01_Color_quantization_with_sklearn.ipynb) - part of [How to add maps to OpendTect?](http://geophysicslabs.com/2016/12/15/how-to-add-maps-to-opendtect/)\n", "2. [Cropping and resampling a grid](notebooks/02_Cropping_and_resampling_grid.ipynb) - part of [How to add maps to OpendTect?](http://geophysicslabs.com/2016/12/15/how-to-add-maps-to-opendtect/)\n", "3. [How to convert a cross-section to SEGY?](notebooks/03_Convert cross-section to SEGY.ipynb) - part of [How to add cross-sections to OpendTect?](http://geophysicslabs.com/2017/02/12/how-to-add-cross-sections-to-opendtect/)\n", "\n", "\n", "---\n", "\n", "## Installation and dependencies\n", "\n", "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.\n", "\n", "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`](https://mapbox.github.io/rasterio/index.html) to run, so you could type this on the command line:\n", "\n", "```\n", "conda create -n geophysicslabs rasterio scipy matplotlib scikit-learn ipykernel\n", "```\n", "\n", "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 `geophysicslabs`.\n", "\n", "---\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python [conda env:geophysicslabs]", "language": "python", "name": "conda-env-geophysicslabs-py" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.2" } }, "nbformat": 4, "nbformat_minor": 1 }