Archive | May 2012

F1 Monaco Grand Prix Stats

A while back I thought it might be fun if I started to look at the statistical nature of Formula 1 races. As a data scientist I always enjoy having a play with numbers and I thought I could easily apply some simplistic models to the data with some python scripting.
I initially had some “fun” with JSON and getting the data into some useful format for me to process in python. This was overcome once I realised that the data structure was a bit more complicated than I had expected. Python has a nice function for dealing with web outputs in JSON format (using the libraries simplejson and urllib2 was the trick – I’ll write something about this later).
There is of course lots of data and I intend to look at this further but for the time being I thought it would be really interesting to look at the variation of lap times for each driver by looking at their mean, max, min and standard deviation. It turns out that the driver who was the most consistent with their lap times in the Monaco Grand Prix was Nico Hulkenberg who produced a standard deviation in his lap times of 5.201. Webber won the race and had a standard deviation of 5.224. I’ll have to dig out the rest of the data, could be interesting to see who is actually the most consistent driver in this very odd season.
Over the next few races I intend to apply a bunch of different approaches to the data but for now here is a quick first plot looking at 10 drivers lap times over the race. You can really see when it started to get a bit damp (the bump towards the end of the race):
F1 Monaco
Oh and here is a quick data table I’ve produced that gives some overview info: ID number, driver name, mean laptime (s), max laptime (s), min laptime, standard deviation in the lap time and finally the total number of laps completed:
1 Webber 81.2634358974 113.554 79.076 5.22471471332 78
2 Rosberg 81.3692179487 113.729 78.805 5.21267201929 78
3 Hamilton 81.7103974359 113.709 79.04 5.53280282831 78
4 Alonso 81.6865512821 113.85 78.857 5.56464331487 78
5 Massa 81.5894102564 114.276 78.806 5.49839624505 78
6 Vettel 82.2420512821 114.809 79.101 6.18925093413 78
7 Raikkonen 82.0597820513 114.904 78.904 5.24474347995 78
8 Schumacher 81.9103717949 115.898 79.082 5.20794225841 78
9 Hulkenberg 81.9712051282 115.635 79.457 5.20147106992 78
10 Senna 82.1178846154 115.198 79.719 5.4820607696 78
11 Resta 82.8519220779 115.304 79.246 6.337354458 77
12 Ricciardo 82.7586623377 115.818 78.423 5.854848841 77
13 Kovalainen 82.9670519481 117.791 79.305 6.34228615403 77
14 Button 82.6418701299 117.735 79.548 5.87962974219 77
15 Glock 83.6168026316 118.07 79.58 6.78045042755 76
16 Pic 82.9222 119.071 77.43 6.48074288422 70
17 Vergne 82.8413692308 119.216 77.296 7.0860552063 65
18 Perez 84.60925 118.874 78.53 8.55919369012 64
19 Petrov 84.1634285714 120.466 79.649 6.8907672407 63
20 Karthikeyan 86.6702666667 118.104 80.825 10.3405089976 15
21 Kobayashi 108.5892 135.62 81.603 23.0780821595 5
As I say this is just a start, I’m hoping to make some nicer looking lots for the next race…

M38: an open cluster in Auriga

As I continue on with the Messier list of objects we encounter yet another open cluster of stars. In this case we are looking at M38 in Auriga – another perfectly good binocular target. The brightest star of this cluster has a luminosity that equates to about 900 Sun’s – so pretty darn bright.

A year back in the UK

It’s now been a year since [I left Calgary] to come back to the UK. Time has flown by and I can’t quite believe that it was a year ago. Its quite fitting that I write this now, my rebate for tax from the Government of Canada just got deposited in my account 🙂
The last year has been at times rather stressful but has had some very good highlights. I just can’t believe how fast it has gone.
In all fairness that should be expected as I started new job, moved house twice (including a period of time where I spent the week in some house
in Cambridge and the weekend in Brum), got married and did various bits of travelling.
I think the highlight of my time being back in the UK so far has to be getting married. That involved lots of work but was just
awesome. It was great to see everyone again, some old friends that I just don’t see often enough.
There are moments when I do miss being in Calgary, but that’s mostly the people – I made some good friends out in Canada. I also miss the weather, cold in winter warm in summer. It always appeared to either be gorgeous sunshine or snowing there. Its May and its just dank here and has been overcast for about a two weeks.The time in Calgary really did me good and I think I grew up a lot during it. Nice to be able to compare the living in two countries and just how similar many things are.
Though I really have had a great year that has involved a decent amount of travelling would have liked a bit more but less of the 3 hour train journeys (one way) between Birmingham and Cambridge.
We managed to go to India for some observing at the GMRT and a little bit of travelling ([day 1], [day 2], [Ellora and Aurangabad], [Ajanta], [Pune], [KFC], [Mumbai]):
Me at GMRT
To [Paris for a conference], and a weekend off:
Eiffel Tower at night
For a meeting in [The Netherlands]:
Amsterdam Central Train Station
and oh honeymoon to Bath and Croatia/Slovenia ([Plitvice Lakes],[Pula Groznjan],[Rovinj], [Lake Bled] ):
Lake Bled from Castle
Though more important than any of that – I got to go to the [new Wembley] at last!
More recently I became the Outreach Officer in the Astrophysics group so that means lots more of what I really enjoy – talking about astronomy.
So overall, not too bad a year. Now onto the second and my second as a post-doc at the University of Cambridge – I wonder what the next year to offer? Should be fun.

A trip to Amsterdam

A couple of weeks back I got to go to Amsterdam for 36 hours or so for a radionet meeting (on a project called Hilado). The meeting was very interesting and we talked about lots of radio astronomy computing – something I’m always very happy to be doing. Though in some respects the highlight for me was going to the Netherlands. I’ve been through Schiphol a few times before but never actually entered the country. I was quite suprised just how easy it was to get from the airport in to the main town. I stayed up in Zaandam in a really weird looking hotel:
Hotel in Zaandam
We flew over to Amsterdam with EasyJet and got the normal delays. Though it was almost comedy on the way out. Firstly, the police needed to remove a dude of the plane. No one came forward with the name they were suggesting so they had to go through all of our passports on the plane. They found the person and took him off. Was very strange. They then had to get us all to indentify our bags but in parallel one of the overhead compartent catches had to be replaced… but that took a while – oh the joys.
Anyway, once in Amsterdam I had a good time and even managed a bit of time post the meeting for a wonder around. I think I’ll have to go back for a weekend at some point – lots to see and well a couple of hours wasn’t ever going to do it justice.
The area around the hotel in Zaandam, was quite nice:
Sunrise over Zaandam
but I do think I saw everything there is to see in Zaandam in my hour walk after breakfast (apart from going down to the wind mills – which were too far away but are probably the main attraction).
As I said I only did a whislte stop tour around Amsterdam central and it was heaving with people. I’ll have to go back again.
Amsterdam Canals
Amsterdam Central Train Station
More pics over on flickr.

ALMA at the SSE imaging

We’ve been working on a bunch of things for the upcoming ALMA Summer Science Exhibition stand including a hands on ALMA simulator.
I’ve just finished adding our “Send to twitter” function with a bit of windows based commandline wizardy – I’m actually very pleased with it. So here is a bit of an Easter egg, me through the eyes of the ALMA SSE Imager – a bit of Earth rotation really brings out my features – can you guess what is on my t-shirt?
me through ALMA imager

How to make an image in radio astronomy

Radio Astronomy 101
In a rather simplistic viewpoint: you get uv data from your array (bottom right); you convolve it with a point spread function (top right) to get a nicely uniformly gridded data set (top left) and then you take the FFT of it to get a pretty image (bottom left).
Of course that’s a gross under-estimate of what you need todo but highlights a key point – you have to grid the data. This is computationaly expensive and something I’m working on at the moment. The above plots are really just an example of a small python script I’ve developed to try out a few ideas. In reality, you’d have some source structure in there and hopefully your final image would be something that would be much more representative on the sky than the criss-cross pattern you seen in the final image (bottom left).