News
Thursday
Oct182012

The blind geoscientist

Last time I wrote about using randomized, blind, controlled tests in geoscience. Today, I want to look a bit closer at what such a test or experiment might look like. But before we do anything else, it's worth taking 20 minutes, or at least 4, to watch Ben Goldacre's talk on the subject at Strata in London recently:

How would blind testing work?

It doesn't have to be complicated, or much different from what you already do. Here’s how it could work for the biostrat study I mentioned last time:

  1. Collect the samples as normal. There is plenty of nuance here too: do you sample regularly, or do you target ‘interesting’ zones? Only regular sampling is free from bias, but it’s expensive.
  2. Label the samples with unique identifiers, perhaps well name and depth.
  3. Give the samples to a disinterested, competent person. They repackage the samples and assign different identifiers randomly to the samples.
  4. Send the samples for analysis. Provide no other data. Ask for the most objective analysis possible, without guesswork about sample identification or origin. The samples should all be treated in the same way.
  5. When you get the results, analyse the data for quality issues. Perform any analysis that does not depend on depth or well location — for example, cluster analysis.
  6. If you want to be really thorough, the disinterested party to provide depths only, allowing you to sort by well and by depth but without knowing which wells are which. Perform any analysis that doesn’t depend on spatial location.
  7. Finally, ask for the key that reveals well names. Hopefully, any problems with the data have already revealed themselves. At this point, if something doesn’t fit your expectations, maybe your expectations need adjusting!

Where else could we apply these ideas?

  1. Random selection of some locations in a drilling program, perhaps in contraindicated locations
  2. Blinded, randomized inspection of gathers, for example with different processing parameters
  3. Random selection of wells as blind control for a seismic inversion or attribute analysis
  4. Random selection of realizations from geomodel simulation, for example for flow simulation
  5. Blinded inspection of the results of a 'turkey shoot' or vendor competition (e.g. Hayles et al, 2011)

It strikes me that we often see some of this — one or two wells held back for blind testing, or one well in a program that targets a non-optimal location. But I bet they are rarely selected randomly (more like grudgingly), and blind samples are often peeked at ('just to be sure'). It's easy to argue that "this is a business, not a science experiment", but that's fallacious. It's because it's a business that we must get the science right. Scientific rigour serves the business.

I'm sure there are dozens of other ways to push in this direction. Think about the science you're doing right now. How could you make it a little less prone to bias? How can you make it a shade less likely that you'll pull the wool over your own eyes?

Tuesday
Oct162012

Experimental good practice

Like hitting piñatas, scientific experiments need blindfolds. Image: Juergen. CC-BY.I once sent some samples to a biostratigrapher, who immediately asked for the logs to go with the well. 'Fair enough,' I thought, 'he wants to see where the samples are from'. Later, when we went over the results, I asked about a particular organism. I was surprised it was completely absent from one of the samples. He said, 'oh, it’s in there, it’s just not important in that facies, so I don’t count it.' I was stunned. The data had been interpreted before it had even been collected.

I made up my mind to do a blind test next time, but moved to another project before I got the chance. I haven’t ordered lab analyses since, so haven't put my plan into action. To find out if others already do it, I asked my Twitter friends:

Randomized, blinded, controlled testing should be standard practice in geoscience. I mean, if you can randomize trials of government policy, then rocks should be no problem. If there are multiple experimenters involved, like me and the biostrat guy in the story above, perhaps there’s an argument for double-blinding too.

Designing a good experiment

What should we be doing to make geoscience experiments, and the reported results, less prone to bias and error? I'm no expert on lab procedure, but for what it's worth, here are my seven Rs:

  • Randomized blinding or double-blinding. Look for opportunities to fight confirmation bias. There’s some anecdotal evidence that geochronologists do this, at least informally — can you do it too, or can you do more?
  • Regular instrument calibration, per manufacturer instructions. You should be doing this more often than you think you need to do it.
  • Repeatability tests. Does your method give you the same answer today as yesterday? Does an almost identical sample give you the same answer? Of course it does! Right? Right??
  • Report errors. Error estimates should be based on known problems with the method or the instrument, and on the outcomes of calibration and repeatability tests. What is the expected variance in your result?
  • Report all the data. Unless you know there was an operational problem that invalidated an experiment, report all your data. Don’t weed it, report it. 
  • Report precedents. How do your results compare to others’ work on the same stuff? Most academics do this well, but industrial scientists should report this rigorously too. If your results disagree, why is this? Can you prove it?
  • Release your data. Follow Hjalmar Gislason's advice — use CSV and earn at least 3 Berners-Lee stars. And state the license clearly, preferably a copyfree one. Open data is not altruistic — it's scientific.

Why go to all this trouble? Listen to Richard Feynman:

The first principle is that you must not fool yourself, and you are the easiest person to fool.

Thank you to @ToriHerridge@mammathus@volcan01010 and @ZeticaLtd for the stories about blinded experiments in geoscience. There are at least a few out there. Do you know of others? Have you tried blinding? We'd love to hear from you in the comments! 

Friday
Oct122012

M is for Migration

One of my favourite phrases in geophysics is the seismic experiment. I think we call it that to remind everyone, especially ourselves, that this is science: it's an experiment, it will yield results, and we must interpret those results. We are not observing anything, or remote sensing, or otherwise peering into the earth. When seismic processors talk about imaging, they mean image construction, not image capture

The classic cartoon of the seismic experiment shows flat geology. Rays go down, rays refract and reflect, rays come back up. Simple. If you know the acoustic properties of the medium—the speed of sound—and you know the locations of the source and receiver, then you know where a given reflection came from. Easy!

But... some geologists think that the rocks beneath the earth's surface are not flat. Some geologists think there are tilted beds and faults and big folds all over the place. And, more devastating still, we just don't know what the geometries are. All of this means trouble for the geophysicist, because now the reflection could have come from an infinite number of places. This makes choosing a finite number of well locations more of a challenge. 

What to do? This is a hard problem. Our solution is arm-wavingly called imaging. We wish to reconstruct an image of the subsurface, using only our data and our sharp intellects. And computers. Lots of those.

Imaging with geometry

Agile's good friend Brian Russell wrote one of my favourite papers (Russell, 1998) — an imaging tutorial. Please read it (grab some graph paper first). He walks us through a simple problem: imaging a single dipping reflector.

Remember that in the seismic experiment, all we know is the location of the shots and receivers, and the travel time of a sound wave from one to the other. We do not know the reflection points in the earth. If we assume dipping geology, we can use the NMO equation to compute the locus of all possible reflection points, because we know the travel time from shot to receiver. Solutions to the NMO equation — given source–receiver distance, travel time, and the speed of sound — thus give the ellipse of possible reflection points, shown here in blue:

Clearly, knowing all possible reflection points is interesting, but not very useful. We want to know which reflection point our recorded echo came from. It turns out we can do something quite easy, if we have plenty of data. Fortunately, we geophysicists always bring lots and lots of receivers along to the seismic experiment. Thousands usually. So we got data.

Now for the magic. Remember Huygens' principle? It says we can imagine a wavefront as a series of little secondary waves, the sum of which shows us what happens to the wavefront. We can apply this idea to the problem of the tilted bed. We have lots of little wavefronts — one for each receiver. Instead of trying to figure out the location of each reflection point, we just compute all possible reflection points, for all receivers, then add them all up. The wavefronts add constructively at the reflector, and we get the solution to the imaging problem. It's kind of a miracle. 

Try it yourself. Brian Russell's little exercise is (geeky) fun. It will take you about an hour. If you're not a geophysicist, and even if you are, I guarantee you will learn something about how the miracle of the seismic experiment. 

Reference
Russell, B (1998). A simple seismic imaging exercise. The Leading Edge 17 (7), 885–889. DOI: 10.1190/1.1438059

Tuesday
Oct092012

Your best work(space)

Doing your best work requires placing yourself in the right environment. For me, I need to be in an uncluttered space, free from major distractions, yet close enough to interactions to avoid prolonged isolation. I also believe in surrounding yourself with the energetic and inspired people, if you can afford such a luxury.

The model workspace

My wife an I are re-doing our office at home. Currently mulling over design ideas, but websites and catalogs only take me so far. I find they fall short of giving me the actual look and feel of a future space. To cope, I have built a model using SketchUp, catering to my geeky need for spatial visualization. It took me 35 minutes to build the framework using SketchUp: the walls, doors and closets and windows. Now, it's taking us much longer to design and build the workspace inside it. I was under the impression that, just as in geoscience, we need models for making detailed descisions. But perhaps, this model is complicating or delaying us getting started. Or maybe we are just being picky. Refined tastes.

This is a completely to-scale drafting of my new office. It is missing some furniture, but the main workspace is shown on the left wall; a large, expansive desk to house (up to) two monitors, two chairs, and two laptops. The wide window sill will be fitted with bench cushions for reading. Since we want a built-in look, it makes sense construct a digital model to see how the components line up with other features in the space. 

More than one place to work 

So much of what we do in geoscience is centered around effectively displaying information, so it helps to feel fresh and inspired by the environment beyond the desktop. Where we work affects how we work. Matt and I have that luxury of defining our professional spaces, and we are flexible and portable enough to work in a number of settings. I like this.

There is a second place to go to when I want to get out of the confines of my condo. I spend about 30 hours a month at a co-working space downtown. The change in scenery is invigorating. I can breathe the same air as like-minded entrepreneurs, freelancers, and sprouters of companies. I can plug into large monitors, duck into a private room for a conference call, hold a meeting, or collaborate with others. Part of what makes an office is the technology, the furniture, the lighting, which is important. The other part of a workspace is your relationship and interaction to other people and places; a sense of community.

What does your best work space look like? Are you working there now?

Saturday
Oct062012

Journalists are scientists

Tim Radford. Image: Stevyn Colgan.On Thursday I visited The Guardian’s beautiful offices in King’s Cross for one of their Masterclass sessions. Many of them have sold out, but Tim Radford’s science writing evening did so in hours, and the hundred-or-so budding writers present were palpably excited to be there. The newspaper is one of the most progressive news outlets in the world, and boasts many venerable alumni (John Maddox and John Durant among them). It was a pleasure just to wander around the building with a glass of wine, with some of London’s most eloquent nerds.

Radford is not a trained scientist, but a pure journalist. He left school at 16, idolized Dylan Thomas, joined a paper, wrote like hell, and sat on almost every desk before mostly retiring from The Guardian in 2005. He has won four awards from the Association of British Science Writers. More people read any one of his science articles on a random Tuesday morning over breakfast than will ever read anything I ever write. Tim Radford is, according to Ed Yong, the Yoda of science writers.

Within about 30 minutes it became clear what it means to be a skilled writer: Radford’s real craft is story-telling. He is completely at home addressing a crowd of scientists — he knows how to hold a mirror up to the geeks and reflect the fun, fascinating, world-changing awesomeness back at them. “It’s a terrible mistake to think that because you know about a subject you are equipped to write about it,” he told us, getting at how hard it is to see something from within. It might be easier to write creatively, and with due wonder, about fields outside our own.

Some in the audience weren’t content with being entertained by Radford, watching him in action as it were, preferring instead to dwell on controversy. He mostly swatted them aside, perfectly pleasantly, but one thing he was having none of was the supposed divide between scientists and journalists. Indeed, Radford asserted that journalists and scientists do basically the same thing: imagine a story (hypothesis), ask questions (do experiments), form a coherent story (theory) from the results, and publish. Journalists are scientists. Kind of.

I loved Radford's committed and unapologetic pragmatism, presumably the result of several decades of deadlines. “You don’t have to be ever so clever, you just have to be ever so quick,” and as a sort of corollary: “You can’t be perfectly right, but you must be mostly right.” One questioner accused journalists of sensationalising science (yawn). “Of course we do!” he said — because he wants his story in the paper, and he wants people to read it. Specifically, he wants people who don’t read science stories to read it. After all, writing for other people is all about giving them a sensation of one kind or another.

I got so much out of the 3 hours I could write at least another 2000 words, but I won’t. The evening was so popular that the paper decided to record the event and experiment with a pay-per-view video, so you can get all the goodness yourself. If you want more Radford wisdom, his Manifesto for the simple scribe is a must-read for anyone who writes.

Tim Radford's most recent book, The Address Book: Our Place in the Scheme of Things, came out in spring 2011.

The photograph of Tim Radford, at The World's Most Improbable Event on 30 September, is copyright of Stevyn Colgan, and used with his gracious permission. You should read his blog, Colganology. The photograph of King's Place, the Guardian's office building, is by flickr user Davide Simonetti, licensed CC-BY-NC.