Thursday, April 25, 2013

The Raspberry Pi in scientific research

The cost implications that come with finding yourself able to buy a computer for $25 are significant for all of us, but they can make a real difference to the way cash-strapped researchers do things. We’re seeing a surprising number of university departments around the world using the Pi for the sort of tasks you’d previously have pointed a PC at, with very gratifying results.

I had email from Lorna, who manages some of our social media, about a video she’d been sent yesterday. “It’s about crabs,” she said. “The seaside kind.” (Just as well, or I wouldn’t have been able to publish it.) David Soriano, who is an Associate Professor of Chemistry at the University of Pittsburgh-Bradford, has been using a webcam controlled by a Pi to monitor fiddler crabs which are being offered thermal polypeptides, rich in the amino acid tyrosine. Tyrosine starts the pathway to melanin pigment production in the crab, and David’s watching for colour changes that result from it. This is a long video, at 15 minutes, but it’s very interesting, as David describes the setup and some of the crabs’ behaviour.

David is also studying the effects of certain chemical agents on the American Cockroach with the help of a Pi. Cockroaches are much less cute than fiddler crabs, so I won’t embed the video here, but you can watch it on YouTube.

Meanwhile, over in France at Aix-Marseille Université, Sebastiaan Mathôt, a post-doc at the Laboratoire de Psychologie Cognitive, has been running his graphical experiment builder, OpenSesame, on the Pi.

Eben took part in a university psychology experiment once. The results, somewhat surprisingly, demonstrated that he had a closer relationship with Superman than he did with God.

Sebastiaan is testing the Pi for use in psychological experiments, and has found it very suitable. He found a few milliseconds’ inaccuracy in some measurements, but says:

If I were to set up a low-budget lab, I wouldn't have any problem with running my behavioral studies on a Pi, since this type of temporal jitter has a negligible impact on statistical power.

You can find out more about his setup on his blog; it’s well worth a read.

The biologists are in on it too: click the picture below to visit the University of St Andrews in Scotland, whose Centre for Biological Diversity have written a Raspberry Pi phylogeny reconstruction program, so students can look at the relationship between phylogeny and evolution on a Pi.

Daniel Barker, from St Andrews, said:

Given a bunch of DNA sequences and some pre-processing, LVB gives you an idea how they are related. If you give it one sequence per species, it gives you an idea of how the species are related. LVB combines an optimality criterion that’s rapid to evaluate and a subtle heuristic search – with the intention of working fast, and reasonably well, with large input.

If you’d like to learn more (undergrad-level biology is a whole new world to a lot of us), Daniel came and posted some more explanation on our forums last year. Come and take a look.

Of course, you don’t need to be at a university to use a Pi to research something. Yesterday I spotted a brand new Twitter feed, fully automated with a Pi, dedicated to capturing an image of the Beijing sky every 15 minutes. Zhe Wu, who works at delicious.com, is collecting the visual data and will be using it to analyse changes in the condition of the city’s air. There’s not a lot of data to process yet; the images only started being collected yesterday. But we’re looking forward to seeing what he does with them. You can view the stream of pictures on Twitter.

Pictures of the Beijing sky today. It’s looking a bit less smoggy today than it did on my last trip!

Back in the UK, we’re seeing some pretty extraordinary research work coming out of schools too. The winners of the 16-18 section of the recent PA Consulting Awards competition, challenging schoolchildren to “make the world a better place” with a Pi, were Alyssa Dayan and Tom Hartley from Westminster School, whose Air Pi we’ve mentioned here before briefly; it’s a very sophisticated, very well implemented project we thought we should talk about some more.

Air Pi is, say Alyssa and Tom, “an automatic air quality & weather monitoring device powered by a Raspberry Pi, capable of displaying, recording and uploading information about temperature, humidity, air pressure, light levels, UV levels, carbon monoxide, nitrogen dioxide and smoke level to the internet.” It’s cheap, it’s modular, it’s open: we love it. Here are Alyssa and Tom, who will explain a bit more about the project and what’s being done with it.

There’s a lot more information on the AirPi website – head over and have a look. You can set one up yourself for as little as £50 (including the Pi), and AirPis are already being used to monitor air quality as far away as India.

Are you using a Pi for research? Let us know in the comments.

No comments:

Post a Comment