# x lines of Python: read and write SEG-Y

Reading SEG-Y files comes up a lot in the geophysicist's workflow. Writing, less often, but it does come up occasionally. As long as we're mostly concerned with trace data and not location, both of these tasks can be fairly easily accomplished with ObsPy.

Today we'll load some seismic, compute an attribute on it, and save a new SEG-Y, in 10 lines of Python.

ObsPy is a rare thing. It demonstrates what a research group can accomplish with a little planning and a lot of perseverance (cf my whinging earlier this year about certain consortiums in our field). It's an open source Python package from the geophysicists at the University of Munich — Karl Bernhard Zoeppritz studied there for a while, so you know it's legit. The tool serves their research in earthquake and global seismology needs, and also happens to handle SEG-Y files quite nicely.

Aside: I think SixtyNorth's segpy is actually the way to go for reading and writing SEG-Y; ObsPy is probably overkill for most applications — it's about 80 times the size for one thing. I just happen to be familiar with it and it's super easy to install: conda install obspy. So, since minimalism is kind of the point here, look out for a future x lines of Python using that library.

### The sentences

As before, we'd like to express the process in just a few sentences of plain English. Assuming we just want to read the data into a NumPy array, look at it, do something to it, and write a new file, here's what we're doing:

1. Read (or really index) the file as an ObsPy Stream object.
2. Stack (in the NumPy sense) the Trace objects into a single NumPy array. We have data!
3. Get the 99th percentile of the amplitudes to make plotting easier.
4. Plot the data so we can see it.
5. Get the sample interval of the data from a trace header.
6. Compute the similarity attribute using our library bruges.
7. Make a new Stream object to hold the outbound data.
10. Write a new SEG-Y file with our computed data in it!

There's a bit more in the Jupyter Notebook (examining the file and trace headers, for example, and a few more plots) which, remember, you can run right in your browser! You don't need to install a thing. Please give it a look! Quick tip: Just keep hitting Shift+Enter to run the cells.

If you like this sort of thing, and are planning to be at the SEG Annual Meeting in Dallas next month, you might like to know that we'll be teaching our Creative Geocomputing class there. It's basically two days of this sort of thing, only with friends to learn with and us to help. Come and learn some new skills!

The seismic data used in this post is from the NPRA seismic repository of the USGS. The data is in the public domain.

### Matt Hall

I am a geoscientist in Nova Scotia, Canada. Founder of Agile Geoscience, co-founder of The HUB South Shore. Into geology, geophysics, programming in Python, and knowledge sharing (especially wikis).

# x lines of Python: synthetic wedge model

Welcome to a new blog series! Like the A to Z and the Great Geohpysicists, I expect it will be sporadic and unpredictable, but I know you enjoys life's little nonlinearities as much as I.

The idea with this one — x lines of Python — is to share small geoscience workflows in x lines or fewer. I'm not sure about the value of x, but I think 10 seems reasonable for most tasks. If x > 10 then the task may have been too big... If x < 5 then it was probably too small.

Python developer Raymond Hettinger says that each line of code should be equivalent to a sentence... so let's say that that's the measure of what's OK to put in a single line.

### Synthetic wedge model

To kick things off, follow this link to a live Jupyter Notebook environment showing how you can make a simple synthetic three-rock wedge model in only 9 lines of code.

The sentences represented by the code that made the data in these images are:

1. Set up the size of the model.
2. Make the slanty bit, with 1's in the wedge and 2's in the base.
3. Add the top of the model as 0; these numbers will turn into rocks.
4. Define the velocity and density of rocks 0 to 2.
5. Distribute those properties through the model.
6. Calculate the acoustic impedance everywhere.
7. Calculate the reflection coefficients in the model.
8. Make a Ricker wavelet.
9. Convolve the wavelet with the reflection coefficients.

All of the notebooks we share in this series will be hosted on mybinder.org. I'm excited about this because it means you can run and edit them live, without installing anything at all. Give it a go right now.

You can see them on GitHub too, and fork or clone them from there. Note that if you look at the notebook for this post on GitHub, you'll be able to view it, but not change or run code unless you get everything running on your own machine. (To do that, you can more or less follow the instructions in my User Guide to the TLE tutorials).

Please do take this notion of x as 'par' as a challenge. If you'd like to try to shoot under par, please do — and share your efforts. Code golf is a fun way to learn better coding habits. (And maybe some bad ones.) There is a good chance I will shoot some bogies on this course.

We will certainly take requests too — what tasks would you like to see in x lines of Python?

### Matt Hall

I am a geoscientist in Nova Scotia, Canada. Founder of Agile Geoscience, co-founder of The HUB South Shore. Into geology, geophysics, programming in Python, and knowledge sharing (especially wikis).

# What's that funny noise?

Seismic reflections are strange noises. Around 50 Hz, narrow band, very quiet, and difficult to interpret. It is possible to convert seismic traces (active or passive) into audible sound with a shift in pitch and a time stretch.

Made by the legendary Emory Cook, who recorded everything from steel bands to racing cars to ionospheric noises to this treatment of Hugo Benioff's earthquake recordings. Epic.

Curiously the audification thing has never really caught on in exploration geophysics — a bit surprising, given the fascination with spectral decomposition over the last 15 years or so. And especially so when you consider that our hearing has a dynamic range of about 100 dB, which is comparable to, indeed slightly greater than, our vision (about 90 dB).

Paolo Dell'Aversana of ENI wants to change that. Rather than listening to 'raw' seismic, he's sending it to a MIDI interface and listening to it as a piano roll. Just try to imagine playing seismic on a piano for a second, then listen to his weird and wonderful results — at 9:45 in this EAGE video:

In this EAGE E-Lecture Paolo Dell'Aversana discusses how digital music technology can support geophysical data analysis and interpretation. If you've read any of Dell'Aversana's articles, you'll know he has one of the most creative minds in exploration geophysics. Skip to 9:45 for the crazy seismic piano roll.

On the subject of weird sounds, one of my favourite Wikipedia pages is List of unexplained sounds. I especially love the eerie recordings of mysterious underwater noises, like this one called Upsweep:

No-one knows what makes that noise! My money's on a volcanic vent, but that doesn't explain the seasonality. Maybe we should do a hackathon on these unexaplained sounds some time. If you know of any others — I'd love tohear about them.

If you enjoy strange infrasound as much as I do, I recommend following these two scientists on Twitter:

f you really like strange noises, don't forget to check out the Undersampled Radio podcast!

1 Comment

### Matt Hall

I am a geoscientist in Nova Scotia, Canada. Founder of Agile Geoscience, co-founder of The HUB South Shore. Into geology, geophysics, programming in Python, and knowledge sharing (especially wikis).

# Hooke's oolite

52 Things You Should Know About Rock Physics came out last week. For the first, and possibly the last, time a Fellow of the Royal Society — the most exclusive science club in the UK — drew the picture on the cover. The 353-year-old drawing was made by none other than Robert Hooke

The title page from Micrographia, and part of the dedication to Charles II. You can browse the entire book at archive.org.

The drawing, or rather the engraving that was made from it, appears on page 92 of Micrographia, Hooke's groundbreaking 1665 work on microscopy. In between discovering and publishing his eponymous law of elasticity (which Evan wrote about in connection with Lamé's $$\lambda$$), he drew and wrote about his observations of a huge range of natural specimens under the microscope. It was the first time anyone had recorded such things, and it was years before its accuracy and detail were surpassed. The book established the science of microscopy, and also coined the word cell, in its biological context.

Sadly, the original drawing, along with every other drawing but one from the volume, was lost in the Great Fire of London, 350 years ago almost to the day.

### Ketton stone

The drawing on the cover of the new book is of the fractured surface of Ketton stone, a Middle Jurassic oolite from central England. Hooke's own description of the rock, which he mistakenly called Kettering Stone, is rather wonderful:

I wonder if anyone else has ever described oolite as looking like the ovary of a herring?

These thoughtful descriptions, revealing a profundly learned scientist, hint at why Hooke has been called 'England's Leonardo'. It seems likely that he came by the stone via his interest in architecture, and especially through his friendsip with Christopher Wren. By 1663, when it's likely Hooke made his observations, Wren had used the stone in the façades of several Cambridge colleges, including the chapels of Pembroke and Emmanuel, and the Wren Library at Trinity (shown here). Masons call porous, isotropic rock like Ketton stone 'freestone', because they can carve it freely to make ornate designs. Rock physics in action!

You can read more about Hooke's oolite, and the geological significance of his observations, in an excellent short paper by material scientist Derek Hull (1997). It includes these images of Ketton stone, for comparison with Hooke's drawing:

Reflected light photomicrograph (left) and backscatter scanning electron microscope image (right) of Ketton Stone. Adapted from figures 2 and 3 of Hull (1997). Images are © Royal Society and used in accordance with their terms.

I love that this book, which is mostly about the elastic behaviour of rocks, bears an illustration by the man that first described elasticity. Better still, the illustration is of a fractured rock — making it the perfect preface.

References

Hall, M & E Bianco (eds.) (2016). 52 Things You Should Know About Rock Physics. Nova Scotia: Agile Libre, 134 pp.

Hooke, R (1665). Micrographia: or some Physiological Descriptions of Minute Bodies made by Magnifying Glasses, pp. 93–100. The Royal Society, London, 1665.

Hull, D (1997). Robert Hooke: A fractographic study of Kettering-stone. Notes and Records of the Royal Society of London 51, p 45-55. DOI: 10.1098/rsnr.1997.0005.

1 Comment

### Matt Hall

I am a geoscientist in Nova Scotia, Canada. Founder of Agile Geoscience, co-founder of The HUB South Shore. Into geology, geophysics, programming in Python, and knowledge sharing (especially wikis).

# 52 Things... Rock Physics

There's a new book in the 52 Things family!

52 Things You Should Know About Rock Physics is out today, and available for purchase at Amazon.com. It will appear in their European stores in the next day or two, and in Canada... well, soon. If you can't wait for that, you can buy the book immediately direct from the printer by following this link.

The book mines the same vein as the previous volumes. In some ways, it's a volume 2 of the original 52 Things... Geophysics book, just a little bit more quantitative. It features a few of the same authors — Sven Treitel, Brian Russell, Rachel Newrick, Per Avseth, and Rob Simm — but most of the 46 authors are new to the project. Here are some of the first-timers' essays:

• Arthur Cheng, How to catch a shear wave.
• Peter Duncan, Mapping fractures.
• Paul Johnson, The astonishing case of non-linear elasticity.
• Chris Liner, Negative Q.
• Chris Skelt, Five questions to ask the petrophysicist.

It's our best collection of essays yet. We're very proud of the authors and the collection they've created. It stretches from childhood stories to linear algebra, and from the microscope to seismic data. There's no technical book like it.

### Supporting Geoscientists Without Borders

Purchasing the book will not only bring you profund insights into rock physics — there's more! Every sale sends \$2 to Geoscientists Without Borders, the SEG charity that supports the humanitarian application of geoscience in places that need it. Read more about their important work.

It's been an extra big effort to get this book out. The project was completely derailed in 2015, as we — like everyone else — struggled with some existential questions. But we jumped back into it earlier this year, and Kara (the managing editor, and my wife) worked her magic. She loves working with the authors on proofs and so on, but she doesn't want to see any more equations for a while.

If you choose to buy the book, I hope you enjoy it. If you enjoy it, I hope you share it. If you want to share it with a lot of people, get in touch — we can help. Like the other books, the content is open access — so you are free to share and re-use it as you wish.

### Matt Hall

I am a geoscientist in Nova Scotia, Canada. Founder of Agile Geoscience, co-founder of The HUB South Shore. Into geology, geophysics, programming in Python, and knowledge sharing (especially wikis).

# Q is for Q

Quality factor, or $$Q$$, is one of the more mysterious quantities of seismology. It's right up there with Lamé's $$\lambda$$ and Thomsen's $$\gamma$$. For one thing, it's wrapped up with the idea of attenuation, and sometimes the terms $$Q$$ and 'attenuation' are bandied about seemingly interchangeably. For another thing, people talk about it like it's really important, but it often seems to be completely ignored.

A quick aside. There's another quality factor: the rock quality factor, popular among geomechnicists (geomechanics?). That $$Q$$ describes the degree and roughness of jointing in rocks, and is probably related — coincidentally if not theoretically — to seismic $$Q$$ in various nonlinear and probably profound ways. I'm not going to say any more about it, but if this interests you, read Nick Barton's book, Rock Quality, Seismic Velocity, Attenuation and Anistropy (2006; CRC Press) if you can afford it.

### So what is Q exactly?

We know intuitively that seismic waves lose energy as they travel through the earth. There are three loss mechanisms: scattering (elastic losses resulting from reflections and diffractions), geometrical spreading, and intrinsic attenuation. This last one, anelastic energy loss due to absorption — essentially the deviation from perfect elasticity — is what I'm trying to describe here.

I'm not going to get very far, by the way. For the full story, start at the seminal review paper entitled $$Q$$ by Leon Knopoff (1964), which surely has the shortest title of any paper in geophysics. (Knopoff also liked short abstracts, as you see here.)

The dimensionless seismic quality factor $$Q$$ is defined in terms of the energy $$E$$ stored in one cycle, and the change in energy — the energy dissipated in various ways, such as fluid movement (AKA 'sloshing', according to Carl Reine's essay in 52 Things... Geophysics) and intergranular frictional heat ('jostling') — over that cycle:

$$Q \stackrel{\mathrm{def}}{=} 2 \pi \frac{E}{\Delta E}$$

Remarkably, this same definition holds for any resonator, including pendulums and electronics. Physics is awesome!

Because the right-hand side of that relationship is sort of upside down — the loss is in the denominator — it's often easier to talk about $$Q^{-1}$$ which is, more or less, the percentage loss of energy in a single wavelength. This inverse of $$Q$$ is proportional to the attenuation coefficient. For more details on that relationship, check out Carl Reine's essay.

This connection with wavelengths means that we have to think about frequency. Because high frequencies have shorter cycles (by definition), they attenuate faster than low frequencies. You know this intuitively from hearing the beat, but not the melody, of distant music for example. This effect does not imply that $$Q$$ depends on frequency... that's a whole other can of worms. (Confused yet?)

### The frequency dependence of $$Q$$

It's thought that $$Q$$ is roughly constant with respect to frequency below about 1 Hz, then increases with $$f^\alpha$$, where $$\alpha$$ is about 0.7, up to at least 25 Hz (I'm reading this in Mirko van der Baan's 2002 paper), and probably beyond. Most people, however, seem to throw their hands up and assume a constant $$Q$$ even in the seismic bandwidth... mainly to make life easier when it comes to seismic processing. Attempting to measure, let alone compensate for, $$Q$$ in seismic data is, I think it's fair to say, an unsolved problem in exploration geophysics.

Why is it worth solving? I think the main point is that, if we could model and measure it better, it could be a semi-independent measure of some rock properties we care about, especially velocity. Actually, I think it's even a stretch to call velocity a rock property — most people know that velocity depends on frequency, at least across the gulf of frequencies between seismic and acoustic logging tools, but did you know that velocity also depends on amplitude? Paul Johnson tells about this effect in his essay in the forthcoming 52 Things... Rock Physics book — stay tuned for more on that.

For a really wacky story about negative values of $$Q$$ — which imply transmission coefficients greater than 1 (think about that) — check out Chris Liner's essay in the same book (or his 2014 paper in The Leading Edge). It's not going to help $$Q$$ get any less mysterious, but it's a good story. Here's the punchline from a Jupyter Notebook I made a while back; it follows along with Chris's lovely paper:

Top: Velocity and the Backus average velocity in the E-38 well offshore Nova Scotia. Bottom: Layering-induced attenuation, or 1/Q, in the same well. Note the negative numbers! Reproduction of Liner's 2014 results in a Jupyter Notebook.

Hm, I had hoped to shed some light on $$Q$$ in this post, but I seem to have come full circle. Maybe explaining $$Q$$ is another unsolved problem.

References

Barton, N (2006). Rock Quality, Seismic Velocity, Attenuation and Anisotropy. Florida, USA: CRC Press. 756 pages. ISBN 9780415394413.

Johnson, P (in press). The astonishing case of non-linear elasticity.  In: Hall, M & E Bianco (eds), 52 Things You Should Know About Rock Physics. Nova Scotia: Agile Libre, 2016, 132 pp.

Knopoff, L (1964). Q. Reviews of Geophysics 2 (4), 625–660. DOI: 10.1029/RG002i004p00625.

Reine, C (2012). Don't ignore seismic attenuation. In: Hall, M & E Bianco (eds), 52 Things You Should Know About Geophysics. Nova Scotia: Agile Libre, 2012, 132 pp.

Liner, C (in press). Negative Q. In: Hall, M & E Bianco (eds), 52 Things You Should Know About Rock Physics. Nova Scotia: Agile Libre, 2016, 132 pp.

van der Bann, M (2002). Constant Q and a fractal, stratified Earth. Pure and Applied Geophysics 159 (7–8), 1707–1718. DOI: 10.1007/s00024-002-8704-0.

### Matt Hall

I am a geoscientist in Nova Scotia, Canada. Founder of Agile Geoscience, co-founder of The HUB South Shore. Into geology, geophysics, programming in Python, and knowledge sharing (especially wikis).

# The sound of the Software Underground

If you are a geoscientist or subsurface engineer, and you like computery things — in other words, if you read this blog — I have a treat for you. In fact, I have two! Don't eat them all at once.

### Software Underground

Sometimes (usually) we need more diversity in our lives. Other times we just want a soul mate. Or at least someone friendly to ask about that weird new seismic attribute, where to find a Python library for seismic imaging, or how to spell Kirchhoff. Chat rooms are great for those occasions, Slack is where all the cool kids go to chat, and the Software Underground is the Slack chat room for you.

It's free to join, and everyone is welcome. There are over 130 of us in there right now — you probably know some of us already (apart from me, obvsly). Just go to http://swung.rocks/ to sign up, and we will welcome you at the door with your choice of beverage.

To give you a flavour of what goes on in there, here's a listing of the active channels:

• #python — for people developing in Python
• #sharp-rocks — for people developing in C# or .NET
• #open-geoscience — for chat about open access content, open data, and open source software
• #machinelearning — for those who are into artificial intelligence
• #busdev — collaboration, subcontracting, and other business opportunities
• #general — chat about anything to do with geoscience and/or computers
• #random — everything else

If you have a long commute, or occasionally enjoy being trapped in an aeroplane while it flies around, you might have discovered the joy of audiobooks and podcasts. You've probably wished many times for a geosciencey sort of podcast, the kind where two ill-qualified buffoons interview hyper-intelligent mega-geoscientists about their exploits. I know I have.

Well, wish no more because Undersampled Radio is here! Well, here:

The show is hosted by New Orleans-based geophysicist Graham Ganssle and me. Don't worry, it's usually not just us — we talk to awesome guests like geophysicists Mika McKinnon and Maitri Erwin, geologist Chris Jackson, and geopressure guy Mark Tingay. The podcast is recorded live every week or three in Google Hangouts on Air — the link to that, and to show notes and everything else — is posted by Gram in the #undersampled Software Underground channel. You see? All these things are connected, albeit in a nonlinear, organic, highly improbable way. Pseudoconnection: the best kind of connection.

Indeed, there is another podcast pseudoconnected to Software Underground: the wonderful Don't Panic Geocast — hosted by John Leeman and Shannon Dulin — also has a channel: #dontpanic. Give their show a listen too! In fact, here's a show we recorded together!

Don't have an hour right now? OK, you asked for it, here's a clip from that show to get you started. It starts with John Leeman explaining what Fun Paper Friday is, and moves on to one of my regular rants about conferences...

In case you're wondering, neither of these projects is explicitly connected to Agile — I am just involved in both of them. I just wanted to clear up any confusion. Agile is not a podcast company, for the time being anyway.

1 Comment

### Matt Hall

I am a geoscientist in Nova Scotia, Canada. Founder of Agile Geoscience, co-founder of The HUB South Shore. Into geology, geophysics, programming in Python, and knowledge sharing (especially wikis).

# In search of the Kennetcook Thrust

Behind every geologic map, is a much more complex geologic truth. Most of the time it's hidden under soil and vegetation, forcing geologists into a detective game in order to fill gaps between hopelessly sparse spatterings of evidence.

Two weeks ago, I joined up with an assortment of geologists on the side of the highway an hour north of Halifax for John Waldron to guide us along some spectacular stratigraphy exposed in the coastline cliffs on the southern side of the Minas Basin (below). John has visited these sites repeatedly over his career, and he's supervised more than a handful of graduate students probing a variety of geologic processes on display here. He's published numerous papers teasing out the complex evolution of the Windsor-Kennetcook Basin: one of three small basins onshore Nova Scotia with the potential to contain economic quantities of hydrocarbons.

John retold the history of mappers past and present riddled by the massively deformed, often duplicated Carboniferous evaporites in the Windsor Group which are underlain by sub-horizontal seismic reflectors at depth. Local geologists agree that this relationship reflects thrusting of the near-surface package, but there is disagreement on where this thrust is located, and whether and where it intersects the surface. On this field trip, John showed us symptoms of this Kennetcook thrust system, at three sites. We started in the footwall. The second and third sites were long stretches spectacularly deformed exposures in the hangingwall.

### Footwall: Cheverie Point

SEE GALLERY BELOW FOR ENLARGEMENT

The first stop was Cheverie Point and is interpreted to be well in the footwall of the Kennetcook thrust. Small thrust faults (right) cut through the type section of the Macumber Formation and match the general direction of the main thrust system. The Macumber Formation is a shallow marine microbial limestone that would have fooled anyone as a mudstone, except it fizzed violently under a drop of HCl. Just to the right of this photo, we stood on the unconformity between the petroliferous and prospective Horton Group and the overlying Windsor Group. It's a pick that turns out to be one of the most reliably mappable seismic events on seismic sections so it was neat to stand on that interface.

Further down section we studied the Mississippian Cheverie Formation: stacked cycles of point-bar deposits ranging from accretionary lag conglomerates to caliche paleosols with upright tree trunks. Trees more than a metre or more in diameter were around from the mid Devonian, but Cheverie forests are still early and good examples of trees within point-bars and levees.

### Hangingwall: Red Head / Johnson Beach / Split Rock

SEE GALLERY BELOW FOR ENLARGEMENT

The second site featured some spectacularly folded black shales from the Horton Bluff Formation, as well as protruding sills up to two metres thick that occasionally jumped across bedding (right). We were clumsily contemplating the curious occurrence of these intrusions for quite some time until hard-rock guru Trevor McHattie halted the chatter, struck off a clean piece rock with a few blows of his hammer, wetted it with a slobbering lick, and inspected it with his hand lens. We all watched him in silence and waited for his description. I felt a little schooled. He could have said anything. It was my favourite part of the day.

### Hangingwall continued: Rainy Cove

The patterns in the rocks at Rainy Cove are a wonderland for any structural geologist. It's a popular site for geology labs from Atlantic Universities, but it would be an absolute nightmare to try to actually measure the section here.

SEE GALLERY BELOW FOR ENLARGEMENT

John stands next to a small system of duplicated thrusts in the main hangingwall that have been subsequently folded (left). I tried tracing out the fault planes by following the offsets in the red sandstone bed amidst black shales whose fabric has been deformed into an accordion effect. Your picks might very well be different from mine.

A short distance away we were pointed to an upside-down view of load structures in folded beds. "This antiform is a syncline", John paused while we processed. "This synform over here is an anticline". Features telling of such intense deformation are hard to fathom. Especially in plain sight.

The rock lessons ended in the early evening at the far end of Rainy Cove where the Triassic Wolfville formation sits unconformably on top of ridiculously folded, sometimes doubly overturned Carboniferous Horton Rocks. John said it has to be one of the most spectacularly exposed unconformities in the world.

I often take for granted the vast stretches of geology hiding beneath soil and vegetation, and the preciousness of finding quality outcrop. Check out the gallery below for pictures from our day.

I was quite enamoured with John's format. His field trip technologies. The maps and sections: canvases for communication and works in progress. His white boarding, his map-folding techniques: a practised impresario.

What are some of the key elements from the best field trips you've been on? Let us know in the comments.

1 Comment

# The 5%

We recently published our 500th post on this blog. I made the first post on 11 November 2010, a week after quitting my job in Calgary (yes, there was a time when people used to quit jobs). So, 500 posts in a little over 2000 days — about a post every 4 days. About 300,000 words (still only about half of War and Peace). And I probably shouldn't think about this, but let's call it at least 1000 hours (it's probably double that).

To celebrate the milestone, however arbitrary, I thought I'd spend an evening rounding up some of our favourite and most popular posts. If nothing else, it might serve as place to start for any new readers.

### Our culture

I did say this post was about the top 5%, so strictly I owe you one more post. If you'll indugle me, I'll hark right back to the start — this post on The integration gap from 5 January 2011 was one of my early favourites. It was one of those ideas I'd been carrying around for a while. Not profound or interesting enough for a talk or an article. Just a little idea. I doubt it's even original. I just thought it was interesting. It's exactly what blogs were made for.

It only remains to say Thank You for the support and attention over the years. We appreciate it hugely, and look forward to crafting the next 500 posts for lining the bottom of your digital cat litter box.

### Matt Hall

I am a geoscientist in Nova Scotia, Canada. Founder of Agile Geoscience, co-founder of The HUB South Shore. Into geology, geophysics, programming in Python, and knowledge sharing (especially wikis).

# PRESS START

The dust has settled from the Subsurface Hackathon 2016 in Vienna, which coincided with EAGE's 78th Conference and Exhibition (some highlights). This post builds on last week's quick summary with more detailed descriptions of the teams and what they worked on. If you want to contact any of the teams, you should be able to track them down via the links to Twitter and/or GitHub.

A word before I launch into the projects. None of the participants had built a game before. Many were relatively new to programming — completely new in one or two cases. Most of the teams were made up of people who had never worked together on a project before; indeed, several team mates had never met before. So get ready to be impressed, maybe even amazed, at what members of our professional community can do in 2 days with only mild provocation and a few snacks.

### Traptris

An 8-bit-style video game, complete with music, combining Tetris with basin modeling.

Team: Chris Hamer, Emma Blott, Natt Turner (all MSc students at the University of Leeds), Jesper Dramsch (PhD student, Technical University of Denmark, Copenhagen). GitHub repo.

Tech: Python, with PyGame.

Details: The game is just like Tetris, except that the blocks have lithologies: source, reservoir, and seal. As you complete a row, it disappears, as usual. But in this game, the row reappears on a geological cross-section beside the main game. By completing further rows with just-right combinations of lithologies, you build an earth model. When it's deep enough, and if you've placed sources rocks in the model, the kitchen starts to produce hydrocarbons. These migrate if they can, and are eventually trapped — if you've managed to build a trap, that is. The team impressed the judges with their solid gamplay and boisterous team spirit. Just installing PyGame and building some working code was an impressive feat for the least experienced team of the hackathon.

Prize: We rewarded this rambunctious team for their creative idea, which it's hard to imagine any other set of human beings coming up with. They won Samsung Gear VR headsets, so I'm looking forward to the AR version of the game.

### Flappy Trace

A ridiculously addictive seismic interpretation game. "So seismic, much geology".

Team: Håvard Bjerke (Roxar, Oslo), Dario Bendeck (MSc student, Leeds), and Lukas Mosser (PhD student, Imperial College London).

Tech: Python, with PyGame. GitHub repo.

Details: You start with a trace on the left of the screen. More traces arrive, slowly at first, from the right. The controls move the approaching trace up and down, and the pick point is set as it moves across the current trace and off the screen. Gradually, an interpretation is built up. It's like trying to fly along a seismic horizon, one trace at a time. The catch is that the better you get, the faster it goes. All the while, encouragements and admonishments flash up, with images of the doge meme. Just watching someone else play is weirdly mesmerizing.

Prize: The judges wanted to recognize this team for creating such a dynamic, addictive game with real personality. They won DIY Gamer kits and an awesome book on programming Minecraft with Python.

### Guess What!

Human seismic inversion. The player must guess the geology that produces a given trace.

Team: Henrique Bueno dos Santos, Carlos Andre (both UNICAMP, Sao Paolo), and Steve Purves (Euclidity, Spain)

Tech: Python web application, on Flask. It even used Agile's nascent geo-plotting library, g3.js, which I am pretty excited about. GitHub repo. You can even play the game online!

Details: This project was on a list of ideas we crowdsourced from the Software Underground Slack, and I really hoped someone would give it a try. The team consisted of a postdoc, a PhD student, and a professional developer, so it's no surprise that they managed a nice implementation. The player is presented with a synthetic seismic trace and must place reflection coefficients that will, she hopes, forward model to match the trace. She may see how she's progressing only a limited number of times before submitting her final answer, which receives a score. There are so many ways to control the game play here, I think there's a lot of scope for this one.

Prize: This team impressed everyone with the far-reaching implications of the game — and the rich possibilities for the future. They were rewarded with SparkFun Digital Sandboxes and a copy of The Thrilling Adventures of Lovelace and Babbage.

### DiamondChaser

aka DiamonChaser (sic). A time- and budget-constrained drilling simulator aimed at younger players.

Team: Paul Gabriel, Björn Wieczoreck, Daniel Buse, Georg Semmler, and Jan Gietzel (all at GiGa infosystems, Freiberg)

Tech: TypeScript, which compiles to JS. BitBucket repo. You can play the game online too!

Details: This tight-knit group of colleagues — all professional developers, but using unfamiliar technology — produced an incredibly polished app for the demo. The player is presented with a blank cross section, and some money. After choosing what kind of drill bit to start with, the drilling begins and the subsurface is gradually revealed. The game is then a race against the clock and the ever-diminishing funds, as diamonds and other bonuses are picked up along the way. The team used geological models from various German geological surveys for the subsurface, adding a bit of realism.

Prize: Everyone was impressed with the careful design and polish of the app this team created, and the quiet industry they brought to the event. They each won a CellAssist OBD2 device and a copy of Charles Petzold's Code.

Some of the participants waiting for the judges to finish their deliberations. Standing, from left: Håvard Bjerke, Henrique Bueno dos Santos, Steve Purves. Seated: Jesper Dramsch, Lukas Mosser, Natt Turner, Emma Blott, Dario Bendeck, Carlos André, Björn Wieczoreck, Paul Gabriel.

### Credits and acknowledgments

Thank you to all the hackers for stepping into the unknown and coming along to the event. I think it was everyone's first hackathon. It was an honour to meet everyone. Special thanks to Jesper Dramsch for all the help on the organizational side, and to Dragan Brankovic for taking care of the photography.

The Impact HUB Vienna was a terrific venue, providing us with multiple event spaces and plenty of room to spread out. HUB hosts Steliana and Laschandre were a great help. Der Mann produced the breakfasts. Il Mare pizzeria provided lunch on Saturday, and Maschu Maschu on Sunday.

Thank you to Kristofer Tingdahl, CEO of dGB Earth Sciences and a highly technical, as well as thoughtful, geoscientist. He graciously agreed to act as a judge for the demos, and I think he was most impressed with the quality of the teams' projects.

Last but far from least, a huge Thank You to the sponsor of the event, EMC, the cloud computing firm that was acquired by Dell late last year. David Holmes, the company's CTO (Energy) was also a judge, making an amazing opportunity for the hackers to show off their skills, and sense of humour, to a progressive company with big plans for our industry.