Join us for a free hands-on training course on
computational geoscience for subsurface professionals.
As part of its commitment to digital transformation and maximising economic recovery of the UKCS, the Oil & Gas Authority is offering 40 free places on Agile's Geocomputing training class. The course will run in Croydon and in Aberdeen so you can choose the location best for you.
24–28 September 2018
1–5 October 2018
This introductory-level course is aimed specifically at geoscientists and engineers.
We only use familiar data and workflows, so participants are writing useful code from the start. During the course we make a well tie from scratch and, in doing so, we use well logs, seismic data, and a wide range of programming tools. Once you have acquired the basics of programming, we spend a day on machine learning, specifically a supervised classification task. We finish with a day working on your own project, helping you lay a foundation for your continued learning over the following weeks and months.
At the end of the course, you will be able to solve straightforward geoscience problems with short Python programs and state-of-the-art numerical computing tools. Furthermore, you will have a solid grasp of the principal tools in use by Python data scientists, and know how to successfully explore problems in your field with these tools.
Getting started in Python
In this module we will get used to Python's syntax and explore some of its built-in functions. At the end, we will have a good overview of the basic toolset used by earth scientists everywhere, and be ready to dive deeper.
Manipulating and visualizing data
- Follow-along exercise: Make a topography map in 5 lines of code (right).
- Follow-along exercise: A lightweight 3D seismic visualization.
Variables and assignment
- Introduction to Python command line.
- Basic assignment syntax and dynamic typing.
- Asking for help. Finding help online.
Native data types
- int and float (and complex); why so many kinds of numbers?
- Type casting.
- String methods, strings as collections. Indexing and slicing.
- String formatting anf f-strings.
- Exercise: text processing practice manipulating formation names.
Operators and expressions
- Mathematical operations, comparison operators, booleans.
- Augmented assignment, multiple assignment.
- Copies and pointers.
- Exercise: some gentle rock physics.
Data collections and data structures
- list — indexing again, slicing again, striding, nested lists.
- Exercise: Getting ages from the geologic timescale. Practice indexing.
- tuple and set
- dict — mappings of key:value pairs.
- Exercise: Stratigraphic column: storing, retrieving and modifying entries in dicts.
- Exercise: Introduction to visualizing well logs: line plots vs scatter plots.
- Iteration and iterables: for and while.
- Exercise: compute impedance and reflectivity in a well.
- List comprehensions.
- Exercise: convert for loops into list comprehensions.
- Making decisions: if-elif-else statements.
- Exercise: create a pay flag on a gamma-ray log.
Getting data, part 1
- Reading and writing text files.
- Exercise: create a dictionary of well tops from a ‘broken’ input text file.
- Built-in functions, and importing modules.
- The anatomy of a function. Syntax, docstrings.
- Exercise: write a function that computes an impedance log.
- Exercise: write a function that computes reflection coefficients.
- Exercise: write a function that computes formation thicknesses.
- Sharing code via modules, importing and using modules.
- Exercise: Getting data from a sidewall core analysis report (csv file).
- Exercise: Get geological ages by processing pages.
- The Python standard library.
- External Python packages and PyPi.
In this module we will jump into numerical computing with NumPy. We'll also find out how to make charts in matplotlib, and discover the rich toolkits in the SciPy family. After Day 2, students will have some understanding of how to make useful scientific tools.
- What is NumPy for? n-dimensional arrays!
- A simple synthetic seismogram.
- Exercise: make a 2D wedge model.
- Load and inspect a 1D wireline log.
- Exercise: compare list iteration to vectorized math to compute reflectivity.
- Load and inspect a 2D seismic section from Numpy binary.
- Exercise: plotting raster data with imshow.
- Load and inspect a 3D seismic volume from Numpy binary.
- Indexing into the cube, computing trace statistics.
- Visualize traces, sections, and timeslices.
- Exercise: load and visualize a seismic horizon.
- What is matplotlib?
- Exercise: Exploring plots.
- Seaborn, Plotly, Bokeh, and other plotting environments.
- What's in the SciPy package?
- Interpolation: time conversion of a sonic log.
- Exercise: make a simple synthetic seismogram.
- Complex seismic trace attributes — phase and envelope.
- Exercise: make an offset synthetic seismogram.
- Spectral analysis with scipy.
- Exercise: make a time-frequency plot of our synthetic.
Reading and writing data files
- Persisting ndarrays, dataframes, and other objects.
- Reading SEG-Y files with segyio and ObsPy. Writing SEG-Y files.
- Reading LAS files with lasio and welly. Writing LAS files.
Machine learning for geoscientists
- Recognizing tasks suitable for machine learning.
- What's the difference between supervised and unsupervised learning?
- Recognizing regression vs classification tasks.
Data management for machine learning
- Pandas DataFrames: A new way to look at well logs.
- Exercise: loading a pandas DataFrame from a CSV.
- Exercise: building a pandas DataFrame from a LAS file.
- DataFrames vs arrays (vs Hadoop, Dask, etc).
The machine learning iterative loop
- Data — Getting the data. Loading and storing in an array and/or DataFrame
- Processing — data exploration, inspection, cleaning, and feature engineering.
- Model — What is a model? Training a Scikit-Learn model (for now).
- Results — assessing quality and performance metrics (accuracy, recall, F1,
- confusion matrices)
- Repeat — What can we do to improve performance?
- Exercise: Hugoton lithology prediction contest.