Archives For hack

Yesterday was the Hack Day at the UK National Astronomy Meeting 2014 in Portsmouth. I organised it with my good friend Arfon Smith of GitHub, formerly Zooniverse. We wanted to try and start a new NAM tradition – it went well so maybe we did. I’m psyched that .Astronomy got to help make it happen – not just through my involvement, but the many .Astronomy alumni who attended!
Some of the hack projects have already started to appear online, such as Geert Barentsen, Jeremy Harwood, and Leigh Smith (Hertfordshire) who created a Martian Nyan Cat, which is planning to fly over the entirety of ESA’s Mars Express data archive in one continuous, two-day-long, flight. You also grab the code for Duncan Forgan’s beautiful ‘Music of the Spheres’ project, which sonifies the rhythms of planetary systems. Other projects are harder to place online, such as Jane Greaves’ knitted galaxy cluster – with dark matter contributed by many people during the hack day itself.

I spent much of the day working with Edward Gomez (LCOGT) on the littleBits Space Kit. littleBits is a modular system of circuits that let anyone try their hand at something that ordinarily requires a soldering iron. littleBits components may be switches, sensors, servos, or anything really, and they connect magnetically to create deceptively simple circuits that can be quite powerful.


For example you could connect an infrared sensor and an LED to make a device that flashes when you press buttons on your remote. Or you could use a microphone and a digital LCD display to create a sound meter. The littleBits components are sturdy enough to withstand being bashed about a bit, and simple, and large enough, to let you stick on cardboard, homemade figures, or anything else you find around the house. I found out about littleBits when I met their creator, Aya Bdier at TED in March. She is a fellow TED Fellow.

We decided fairly quickly to try and built an exoplanet simulator of some sort and ended up crating the littleBits Exoplanet Detector (and cup orrery). There were two parts to this: a cup-based orrery, and a transit detector.

The cup orrery consisted of a rotating ‘planetary system’ fashioned from a coffee cup mounted on a simple motor component – we only had hack day supplies to play with – and a central LED ‘star’. Some more cups and stirrers were required to scaffold the system into a stable state but it was soon working.

The transit detector used a light-sensor component that read out to both a speaker and a LCD numerical display – Ed refers to this as the laser display board. With a bit of shielding from the buffet’s handy, black, plastic plates the light sensor can easily pick up the LED and you can see the light intensity readout varying as the the paper planet passes in front of the star. It was awesome. We got very excited when it actually worked!

You might think that was geeky enough, but it gets better. I realised I could use my iPhone 5s – which has a high-frame-rate video mode – to record the model working in slow motion and allow us to better see the digital readout. We also realised that the littleBits speaker component can accept an audio jack and so could use the phone to feed in a pure tone, which made it much easier to hear the pulsing dips of the transits.

Finally, we had the idea to record this nice, tonal sound output from the detector and create waveforms to see if we could recover any properties about the exoplanets. And sure enough: we can! We built several different coffee-cup planetary systems (including a big planet, small planet, and twin planets) and their different properties are visible in their waveforms. Ed is planning a more rigorous exploration of this at a later date, but you can see and hear the large cup planet’s waveform below.

Waveform for Large Cup Planet

Waveform for Large Cup Planet

So if you want to try something like this, you only need the littleBits Space Kit. You can buy them online and I’d love to see more of these kits, and to see them in schools. I’m now totally addicted to the idea myself too!

GitHub Stickers

Thanks to Arfon for suggesting that we do this Hack Day together; to the NAM 2014 Portsmouth team for being so supportive; and to GitHub for sponsoring it – where else would we have gotten all the cups?!

Orbiting Links

May 6, 2014 — Leave a comment

Screenshot 2014-05-06 22.04.29

I’ve added a new section to Orbiting Frog today: Orbiting Links ( This new page displays an automated set of URLs currently being shared by the astronomers of Twitter. This is a work in progress, but it seems to be producing good results so far.

Orbiting Links is created by taking a small set of my favourite astro-Tweeters, and following their tweets, and the tweets of the people they follow too. As links are shared, I store them and keep track of how often they are retweeted or posted elsewhere. Those that rise to the top in any 24-hour period are displayed on the page. Each URL that makes it to this page has some details attached to it, including the original tweet that the system spotted it in.

I’m tracking a bunch of my favourite go-to astronomers on Twitter. The accounts they follow are also monitored, up to about 5,000 accounts. It isn’t necessarily those people that will rise to the top here though – but more likely the sources of the links they share. I will continuously modify the list of source accounts, to maximise the usefulness of this page.

Why Do This?

To find interesting stuff! The topics will vary day-to-day, and sources of interesting links should rise to the top organically. I see this as an alternative news source, delivering material aligned with the interests of my peers on Twitter. It’s an experiment too – and a coding project I’ve been wanting to build for a while now. The source code is on GitHub, forked from the original OpenFuego repo.

Resources Used

This site has built on top of several other projects, many of which I have slightly modified. The back-end is written in PHP and the front-end is HTML+JavaScript.

  • OpenFuego: Created by Andrew Phelps of the Nieman Journalism Lab, OpenFuego is the open-source version of Fuego, a Twitter bot created to track the future-of-journalism crowd and the links they’re sharing.
  • Type & Grids: You can find many amazing website templates on Type & Grids. All of them are responsive and well-commented, and many of them are free.
  • Twitter: Microblogging site Twitter is still one of my favourite things about the web, even after all these years!

Future Development

The current to-do list for this project includes an RSS feed and a Twitter account, which will provide other ways to access the same set of links. If you have ideas for how this projects should evolve, please get in touch.

Solid, liquid, gas. The three states of matter are something I first explored in primary school and water was the best example. You can easily see water frozen in your freezer, and it spews as a gas from your kettle. But if you mess with these normal states, you can do some fun and strange things with something as everyday as water.

We’re all taught in school that water boils at 100°C and freezes at 0°C. This range was defined by a Swedish astronomer(!) called Anders Celsius when he devised the temperature scale that bears his name and which is also known as ‘centigrade’. It’s a very useful way of thinking about temperature[1].

Rather awesomely, there is a way to cool water below 0°C without it becoming ice. The process is called ‘supercooling‘. To try it you’ll need a bucket, some bottled water, lots of salt (we used 700g of the stuff doing this), and a big bag of ice.

Supercooling Kit

Supercooling involves lowering the temperature of a substance but preventing it taking a solid form. In the case of water you can supercool it way down (to about -45°C if you have the right kit) – just so long as you can stop ice crystals forming. Ice forms around ‘nucleation sites’ – places where ice crystals can get a foothold and start growing. These sites are usually impurities in the water or on the surface of some other material that its in contact with. So if you can get very pure water in a very smooth container, you can take it below freezing but keep it liquid. For that reason you should use plastic bottles of mineral water, but filtered water will work too. We used both here.

Salty Slush


  1. Put some water into a bucket and pour all the salt in. Mix it up really well, and try and make sure the salt is all dissolved.
  2. Stand the bottles of water in the bucket and pour in the ice cubes until they almost cover them. You want to cover the bottles just enough that you can still pick them up and also turn them.
  3. Mix it up! Salt reduces the freezing point of water and so the ice will melt quite a bit as this goes along. You want to create a bucket of briney slush. This will let the temperature get very low.
  4. Now you need to leave your bottles alone. Every ten minutes or so, go and rotate them gently. This is just to make sure the water cools down evenly and is cooled throughout. After about 45 minutes the process should be complete. You should be able to feel that the bucket is very cold to the touch – ice will be starting to form on the outside.
  5. Now you can play with your supercooled water…

Supercooling Water

Playing with Supercooled Water

Here comes the fun part! Note that if this stuff isn’t working for you then you probably need more salt and ice – or to give it more time to cool down.

Supercooled water is just waiting to turn into ice. If you gently pick up one of the bottles and then violently shake it, it will almost instantly turn into ice. Shaking it creates air bubbles in the bottle on which ice crystals can form. Once a few have started, it’s a runaway process since the best place for ice crystals to form is on other ice crystals. This is pretty amazing and I couldn’t get a good video or photo of this happening – it was too quick.

What we did a lot of was make ice towers! It’s a seemingly magical process that my four-year-old thought was brilliant. To do this you simply take an ice cube and pour supercooled water onto it. (It’s best to place this on something to contain the excess water!). As the water touches the ice it quickly crystallises and starts to create a tower, building upward as you pour. It’s pretty cool (ahem!). Again: the best place for ice crystals to form is on other ice crystals.

The towers were quite beautiful too, made of pure, transparent crystals. They were quite solid for a minute or two and then quicky disintegrated (it was 22°C in our house).

Why Salt?

Salt is used to grit roads in the Winter because it lowers the freezing point if water and makes the ice melt. In the process it actually lowers the temperature further. If you have a thermometer handy then you can watch the water in the bucket drop in temperature as this experiment progresses. This is why this method works to supercool the bottles – the temperature quickly dropped to around -8°C in our bucket and the slushy mixture makes good contact with the outside of the bottles for quick cooling of the water inside. I suppose this might work in the freezer but opening the lid our of chest freezer would disrupt the cooling and frankly the slushy brine is half the fun!

Science at Home

My four-year-old loved doing this. We talked about molecules slowing down and ice forming. We talked about the Winter and frozen puddles, road gritters, and cold drinks. Mixing in the salt and ice is fun and making ice towers blew her away. The 45-minute wait was the hardest part for her – so we made glowing jelly at the same time!

I’m not sure if supercooling is necessarily something that young kids will take away from this but there’s lots to understand about ice and freezing. The ice towers were very exciting and next time I do this I’ll have some gloves ready for the kids so they can do the pouring and shaking – the bottles are too cold otherwise.

I’ll leave you with another ice tower video:


[1] I cannot fathom why anybody prefers Fahrenheit, which starts with frozen brine at 0°F, the freezing point of water at 32°F and it places the boiling point of water 180° higher at 212°F. Because those are all such handy numbers. Human ‘blood-heat’ was supposed to be at 100°F but things got rearranged – so now it seems odd. Sheesh.

I (or rather my computer) spent most of this morning geocoding the database of astronomical papers that I scraped from NASA ADS a while back. I’ve got about a quarter of a million papers, covering several of the major astronomical journals (MNRAS, ApJ, A&A, PASP and AJ) back to their first publications. There are 7 million citations and 900,000 authorships in the database.

I want to geocode the affiliations listed in those authorships, in order to explore the relationships between different institutes. Geocoding is the process of finding the latitude and longitude coordinates for a place given the address. Authors of papers give their institute’s address but they write them very inconsistently. By geocoding them down to a lat/long pair its easier to normalise the data and get a better feel for when two affiliations are the same place.. The other day I found a Ruby gem called Geocoder that does exactly what I want and so I set about trying to avidly avoid Google’s API rate limit.

Those 900,000 authorships (individual authors on each paper) come from about 70,000 unique affiliations, of which 50,000 appear to parseable as a potential address. Each one takes a second to be geocoded to it could take a while to do them all. I had the sense to start with the most-affiliated addresses and work down though, so in fact I already have 230,000 of those 900,000 authorships covered.

So far the fifteen most authorship-rich institutes are:

  1. Harvard (9576, 4.16%)
  2. Johns Hopkins University (6076, 2.64%)
  3. Cavendish Laboratory, Cambridge (5191, 2.26%)
  4. Universität Bonn (4468, 1.94%)
  5. CalTech (4442, 1.93%)
  6. Max-Planck-Institut für Astrophysik, Garching (4311, 1.87%)
  7. Tucson, Arizona (3452, 1.50%)
  8. ESO, Garching (3409, 1.48%)
  9. NASA, Goddard Space Flight Center (3342, 1.45%)
  10. Durham University (2643, 1.15%)
  11. MIT (2136, 0.93%)
  12. Paris, Observatoire (2125, 0.92%)
  13. Big Bear Solar Observatory, Pasadena (2030, 0.88%)
  14. California Univ., Berkeley (1878, 0.82%)
  15. Max Planck Institute for Astronomy, Heidelberg (1878, 0.82%)

These aren’t the ones that publish the most papers, but rather the centres that have put out the most cumulative author-credits. I’ve not normalised for date either. For all I know Harvard just published one 9,576 author paper, for example (FACT: they didn’t).

The other thing I realised as soon as they started to come in was that I can now see which research centres have the most awkward names. ESO Garching, for example, has been written in at least 15 different ways in the data I’ve gone through so far (see list at the end). It however does have a lot of papers, so you’d expect variations to arise.

Another inconsistently named centre is the California Institute of Technology in Pasadena. With several sub departments and multiple ways to write its name, it appears have more than 44 variations in the way it is credited!

If we consider only the locations with more than 5 address variants, and normalise to the total number of author-credits we get the following top-ten list of institutions with inconsistently written affiliations. These are the institutions where the number of different names are highest compared to the number of times it appears in total.

  1. University of California Berkeley, USA
  2. CalTech, USA
  3. INAF – IASF Bologna, Italy
  4. Instituto de Astrofísica de Andalucía, CSIC, Granada, Spain
  5. Department of Astronomy, Kyoto University, Japan
  6. Universität Bonn, Germany
  7. Instituut voor Sterrenkunde, Leuven, Belgium
  8. Universitäts-Sternwarte München, Germany
  9. Department of Applied Mathematics, The University of Leeds, UK
  10. Yale University, USA
Should this be a worry? I suppose many research centres have ‘defined’ names that everyone should be using, but no one is doing so (or at least no one is checking). I know that here in Oxford there is everyday discrepancy between ‘Oxford University’ and the ‘University of Oxford’ and that is just the start of these things.
In the world of big data, geographical information is very important. Big data is also often reliant on the once-typed or written words of human beings. (e.g. If academic researchers cannot credit their institutes consistently then presumably no one is typing the addresses of many places correctly. Perhaps research papers should be encoded with co-ordinates? Either way, geocoding is a very important tool in an era of big, personal data.
Once I have more of the ADS data geocoded, there is more that can be done here.


List of variations for affiliation credits to ESO, Garching:

  • ESO, Garching bei München, Germany
  • ESO, Karl-Schwarzschild-Str. 2, 85748 Garching bei München, Germany
  • ESO, Karl-Schwarzschild-Strasse 2, 85748 Garching bei München, Germany
  • ESO, Karl-Schwarzschild-Strasse 2, D-85748 Garching bei München, Germany
  • European Southern Observatory, 85748 Garching bei München, Germany
  • European Southern Observatory, D-85748 Garching bei München, Germany
  • European Southern Observatory, Garching bei München, Germany
  • European Southern Observatory, Karl Schwarzschild Strasse 2, 85748 Garching bei München, Germany
  • European Southern Observatory, Karl-Schwarzschild-Str. 2, 85748 Garching b. München, Germany
  • European Southern Observatory, Karl-Schwarzschild-Str. 2, 85748 Garching bei München, Germany
  • European Southern Observatory, Karl-Schwarzschild-Str. 2, 85748 Garching, Germany
  • European Southern Observatory, Karl-Schwarzschild-str. 2, 85748, Garching bei München, Germany
  • European Southern Observatory, Karl-Schwarzschild-Str. 2, D-85748 Garching bei Munchen, Germany
  • European Southern Observatory, Karl-Schwarzschild-Strasse 2, 85748 Garching bei München, Germany
  • European Southern Observatory, Karl-Schwarzschild-Strasse 2, D-85748 Garching bei München, Germany
  • European Southern Observatory, Karl-Schwarzschildstr. 2, 85748 Garching bei München, Germany