Tag: autobiography

Obsession

This is a short story about obsession: with a map, four books and some numbers.

My last blog post was on Ken Alder’s book “The Measure of All Things” on the surveying of the meridian across France, through Paris, in order to provide a definition for a new unit of measure, the metre, during the period of the French Revolution. Reading this book I noticed lots of place names being mentioned, and indeed the core of the whole process of surveying is turning up at places and measuring the angles to other places in a process of triangulation.

To me places imply maps, and whilst I was reading I popped a few of the places into Google Maps but this was unsatisfactory to me. Delambre and Mechain, the surveyors of the meridian, had been to many places. I wanted to see where they all were. Ken Alder has gone a little way towards this in providing a map: you can see it on his website but it’s an unsatisfying thing: very few of the places are named and you can’t zoom into it.

In my investigations for the last blog post, I discovered the full text of the report of the surveying mission, “Base du système métrique décimal”, was available online and flicking through it I found a table of all 115 triangles used in determining the meridian. So a plan is formed: enter the names of the stations forming the 115 triangles into a three column spreadsheet; determine the latitude and longitude of each of these stations using the Google Maps API; write these locations out into a KML file which can be viewed in Google Maps or Google Earth.

The problem is that place names are not unique and things have changed in the last 200 years. I have spent hours transcribing the tables and hunting down names of obscure places in rural France, hacking away with Python and loved every minute of it. Cassini’s earlier map of France is available online but the navigation is rather clumsy so I didn’t use it. Although now I come to writing this I see someone else has made a better job of it.

Beside three entries in the tables of triangles are the words: “Ce triangle est inutile” – “This triangle is useless”. Instantly I have a direct bond with Delambre, who wrote those words 200 years ago –  I know that feeling: in my loft is a sequence of about 20 lab books I used through my academic career and I know that besides an (unfortunately large) number of results the word “Bollocks!” is scrawled for very similar reasons.

The scheme with the the Google Maps API is that your program provides a place name “Chester, UK”, for example, and the API provides you with the latitude and longitude of the point requested. Sometimes this doesn’t work, either because there are several places with the same name or the placename is not in the database.

I did have a genuine Eureka moment: after several hours trying to find missing places on the map I had a bath and whilst there I had an idea: Google Earth supports overlay images on its maps. At the back of the “Base du système métrique décimal” there is a set of images showing where the stations are as a set of simple line diagrams. Surely I could overlay the images from Base onto Google Earth and find the missing stations? I didn’t leap straight from the bath, but I did stay up overlaying images onto maps deep into the night. It turns out the diagrams are not at all bad for finding missing stations. This manual fiddling to sort out errant stations is intellectually unsatisfying but some things it’s just quicker to do by hand!

You can see the results of my fiddling by loading this KML file into Google Earth, if you’re really keen this is a zip file containing the image overlays from “Base du système métrique décimal” – they match up pretty well given they are photocopies of diagrams subject to limitations in the original drawing and distortion by scanning.

What have I learned in this process?

  • I’ve learnt that although it’s possible to make dictionaries of dictionaries in Python it is not straightforward to pickle them.
  • I’ve enjoyed exploring the quiet corners of France on Google Maps
  • I’ve had a bit more practice using OneNote, Paint .Net, Python and Google Earth so when the next interesting thing comes along I’ll have a head start.
  • Handling French accents in Python is a bit beyond my wrangling skills.

You’ve hopefully learnt something of the immutable mind of a scientist!
View

 



Review of the year: 2010

IMG_7426In a heroic attempt to be timely, I am writing a “Review of the [my blogging] year” post – it’s the first full blogging year for me.

A new feature after my first few months of blogging are book reviews: my house is full of books, and although I’ve read (nearly) all of them I can’t remember the contents. I don’t really consider my book posts to be reviews: they are notes on books for my own future edification. I generally only post on non-fiction although I did write more generally about science fiction. You can see all my reading for the year on Shelfari. The focus of my non-fiction reading is very broadly the history of science, I think my favourite of these was “The World of Gerard Mercator”; this is the story of mapmaking from a time when the full extent of the world was just being discovered. I’ve also read a lot about the Royal Society; this is their 350th anniversary year and, in Britain at least, it was at the heart of the scientific revolution. It’s through the Royal Society that I did my first bit of original source reading: “The History of the Royal Society of London by Thomas Sprat”, published in 1667. A strange experience stimulated by the people I have met on twitter.

Every so often I do a bit of hunting out of data; for example “A sceptical look at the economy” pulled together numbers on the deficit, the debt and how they have changed over time – a useful learning experience and something I refer back to. I also quite like “Occupations of MPs”, which shows that MPs are overwhelmingly barristers. News reports often fail to provide context to stories, and these posts are my attempts to find that context. At one point I even combined fiddling with data and the history of science in one post, extracting membership of the Royal Society data and plotting it: “The Royal Society and the Data Monkey”.

As a continuation of the data monkey thoughts, I did some blogging on computer programming which is my modern equivalent of fiddling about with projects in a shed. “That’s nice, dear” is an overview of programming and some pretty maps I made with election data, the title from my wife: it’s her usual response to me excitedly displaying my latest achievement! I also made “A set of blog posts on SQL” about which I kept very quiet. The hunting out of data and programming run together really, several of my data posts have been the result of significant amounts of programming, for example: “Yields from income tax”.

When I started blogging my intention was to blog about science, in a way that people who were generally not so interested in science might read. I’ve enjoyed doing this, my blog post on the periodic table is one of the most frequently accessed, possibly due to students doing their homework! Some of the scientific posts are on work I’ve done, such as “Understanding mayonnaise”, some are on things I simply find interesting: like “Fun with fluids” which features video of dolphins playing with vortex rings and others are about the life of a scientist, such as: “Publication, publication, publication”.

I’ve also done quite a lot of current affairs blogging, some of this is straightforward rant brought on by newspaper articles but some of it is party political. At the beginning of the year you wouldn’t have known I was a Liberal Democrat party member – I think everyone knows now! Amongst other things I did a post election summary here, and more recently I wrote a slightly more philosophical post. Perhaps most entertaining is my doom-laden post election “I was up for Evan Harris”, my most visited post for the year – I think because of graph, showing the inequities of the first-past-the-post electoral system, was linked from the comments in a Guardian “Comment is Free” article.

Personally the year was slightly eventful: alongside the usual holidays (Westendorf for skiing and the Lake District) I had a little operation after which, somewhat surprisingly, I was confined to the house for 6 weeks in September and October. It was an odd time, ultimately I found I got on quite well confined to the house reading and doing little things in programming disturbed only intermittently by the fear that, health-wise, things weren’t going to plan. I still struggle to understand where my blog lies with regard to personal and private, for a while I kept a diary which was like a blog. My diary was never particularly personal: it recorded facts and where I was when, with the odd diversion into slightly longer entries on books I had read.

Somewhat less common this year for me were photography blog posts, aside from the photos for a calendar, the holiday posts above and a solitary walk post, I don’t seem to have done many this year. Mrs SomeBeans aka The Inelegant Gardener has been much more active on the photography front.

This September we installed photovoltaic(PV) solar panels, to go with the thermal solar panels we got a couple of years ago. PV solar is made economic by the feed-in-tariff, which is exceedingly generous, on our East facing roof we generate approximately the same amount of electricity as we use during the late summer. Now, with the panels covered in snow, we generate nothing. This was also the year of Shiny, my new HTC Desire: not really used as a phone but more a laptop replacement for the home and I also got myself a Kindle ebook.

I’ve enjoyed reading through my blog posts; they provide reminders of my mental activities. I like to maintain the facade that blogging is just for me, but in truth I’m pathetically happy to see the viewing stats rising on a post.

Happy New Year to you all!

What’s on the end of the stick?

gt;

StrafiOnce again I return to science. Lately I’ve been playing with some calculations of the diffusion of one thing into another. This is for work – can’t say what, it’s top secret ;-) I have to admit I’ve rather enjoyed it.

Diffusion calculations ultimately amount to an accounting exercise: this is true of much of physics. You have a bunch of stuff of some sort, and you want to calculate where your stuff will be at some time in the future. The stuff may be electric fields, magnetic fields, heat, molecules or atoms but the point is that new stuff can only be created or destroyed following simple rules and stuff will only travel from one place to another according to other simple rules. Largely it’s a problem of conservation – the amount of stuff is conserved, if stuff leaves one place it must turn up somewhere else.

For diffusion the stuff is molecules, for the purposes of these particular calculations the stuff is not created or destroyed. In the crudest case diffusion is just driven by different amounts of stuff in different places, this is enough to drive the redistribution of stuff since at the molecular level everything is jiggling around at random. If you start with more stuff in one place than another and jiggle it all around at random ultimately it ends up uniformly distributed.

Things can get a bit more complicated, for example you might be interested in your stuff moving into a different environment where it’s not so happy to be or your stuff might be reactive but this is just a smallish change in the basic rules. You also need to define an appropriate boundary condition – what your stuff was doing at one instant in time.

The rules and boundary conditions are expressed as a set of equations; these may have an analytical solution – that’s to say you can write down a further equation that specifies where everything is and when (which you can make into a pretty picture for the boss). Or you may have to carry out a numerical solution: divide time and space up into little pieces and apply the rules in small steps – this is an inelegant but frequently necessary method which, if done naively, can bite you on the arse. Or more technically: “exhibit undesirable numerical instability”.

It turns out that the analytical solution for my current problem can be found in Crank’s “Mathematics of Diffusion”, and so the main work was in making a story for those less interested in equations. The fundamental rules for diffusion are elegant and beautiful, the solutions for specific cases can be ugly and a bit hairy. This is where my skill comes in, to be honest I’m not that good at maths so I couldn’t solve the equations myself – but given a bit of time I can work out which equation is the solution to my problem and carry out calculations with it.

My original adventures with diffusion started in the mid-nineties whilst I was a postdoctoral researcher at the physics department in Cambridge – I was funded by Nestle to measure water diffusing into starch. They were interested in this because at the time they were making a KitKat icecream, which involved putting damp icecream next to crispy wafer with the entirely predictable outcome: the wafer went soggy even when the icecream was stored at –20oC. I spent 18 months or so doing experiments and calculations to demonstrate the very obvious which was if you want to stop your crispy wafer going soggy the best thing to do is coat it in something lardy and therefore water-repellent – chocolate is good! In the meantime I learnt a wide range of things about diffusion and experiments.

Water diffusing into starch turns out to be a more involved case from a modelling point of view because of the whole “going soggy” thing: basically the properties of the starch change with their water content so there’s feedback between how much water there is and how easy it is for more water to arrive. I did experiments to see where the water was in the starch. This was done using stray-field nuclear magnetic resonance imaging (STRAFI), which required the sample to be stuck on the end of a stick and shoved up the bore of a big magnet, hence the title of this post.

This is another illustration of scientific impact: the core results I relied on for my couple of weeks of calculation date back decades or even hundreds of years. The rules for diffusion were first formulated by Fick in 1855, and since then work has been on-going in solving the equations for ever more complex situations. The 18 months I spent 15 years ago meant that when I returned to it rather then spending several months getting acquainted I could drop pretty much straight in and get some useful results within a couple of weeks. It’s difficult to say what the financial impact for my company might be, with any luck it will save some people at the lab bench a bit of time because results that, are on the face of it, a little odd will have a clear explanation or it may turn out that the calculations show they should stop what they’re doing now because it will never work.

References

  1. Hopkinson, I., R. A. L. Jones, P. J. McDonald, B. Newling, A. Lecat, and S. Livings. “Water ingress into starch and sucrose : starch systems.” POLYMER 42, no. 11 (May 2001): 4947-4956.
  2. Hopkinson, I., R. A. L. Jones, S. Black, D. M. Lane, and P. J. McDonald. “Fickian and Case II diffusion of water into amylose: a stray field NMR study.” CARBOHYDRATE POLYMERS 34, no. 1 (December 5, 1997): 39-47.
  3. Crank, J. “The Mathematics of Diffusion” Oxford Science Publications.

A diversion in my life

In the past my blog was my diary, which was entirely private. I kept a diary on my Psion for a number of years before the feeling that I should make a daily, or at least a regular, entry on the minutiae of my life became oppressive and I gave up. More recently I resumed as a blogger, and rather than writing down minutiae I wrote in a more formal, extended style on things that were happening, or on my mind, for a more public audience. It still provided a record of what I thought when.

This post is difficult in the sense that it is somewhat private: I had a minor operation on the 23rd September and only now am I about to go back to work. My minor operation turned out to be a little more complicated then expected. The aftermath has taken up a significant portion of my time and dominated my thoughts for the last 6 weeks. I hasten to add that at no time has my life (or any part of my body) been at serious risk and I have only occasionally been in minor, localised pain and been a little inconvenienced. This is all a storm in a tiny little teacup, but it is my teacup and I have had some sort interesting experience along the way.

I will be circumspect about the exact nature of my affliction. I started with a visit to a GP, who packed me off to the consultant at my local hospital. This is where I had my “unexpected prostate examination”. *That* wasn’t the affected part! A useful experience really, because at some point later in my life a semi-regular prostate exam will probably be a good idea and to be honest, there’s nothing to it. Warning signs: men, if you are semi-clad and a doctor asks you to roll on your side and pull your knees up to your chest – ask him why first!

I have medical insurance as a taxable benefit of my job. My initial intention was to stick with the NHS – my local hospital is over the road from where I live, whilst the private hospital, I believed, was many miles away. It turned out the private hospital was closer, and the wait was shorter and the consultant clearly thought me mad for not exercising my insurance. My initial private consultation was just 4 days after I raised the issue, on a Saturday morning, with potentially my operation the following Thursday. As it was the operation was delayed a few weeks because I had visitors at work on the Friday coming from Sweden – and it seemed wrong to bounce them and then my surgeon was going on holiday, to Sweden, for a couple of weeks. Compare this with initial consultation wait of 1 month, and operation scheduled for almost three months later on the NHS. I don’t see this as a criticism of the NHS: to provide fast service requires that you have more capacity than you strictly need – we choose not to fund the NHS to that level. I’ve been very happy with my local NHS GP service, and the quality of the medical care they provide – I’m sure that the quality of the medical care I would have received from the local hospital would be similarly excellent.

The nice things about private medicine are: it happens pretty quickly (and conveniently), the surroundings are nice and you’re better separated from your fellow man.  The people who join you in private medical care may or may not be more pleasant than those with whom you are treated with in the NHS but they do not generally share a room with you!

I didn’t sleep the night before my operation: I’d never had a general anaesthetic before and to be honest I was a little bit scared – it didn’t help that I’m passingly familiar with historical pre-anaesthesia tales of operations for bladder stones and a mastectomy: I had a minor fear that I would be fully conscious but unable to communicate. I was also scared I wouldn’t have my operation, because to be honest things were getting a bit difficult. My final fear was that I would wake from my anaesthetic with caffeine withdrawal – I’d been fasting for the previous 18 hours or so.

To start the day of my operation properly a wasp stung me on my toe!

General anaesthesia is extinction: there is consciousness, there is nothing, there is consciousness. Chatting to the anaesthetist as I went under I discovered I was getting propofol. I suspect the porters tasked with returning post-operative patients to their rooms have a collection of the most utter gibberish known to man. For my part I supplied them with the prime factors of my room number: 2 and 13, thank you for asking.

The first week or so after my operation passed easily, I’d expected to be off work for a week and I had some books to read. I even made a new website for the Chester Liberal Democrats. The next week or so it sort of dawned on me that the consultants slightly sweaty brow after the operation and the advice that I would take “a long time to heal” did mean something and I was indeed going to take “a long time to heal”. So here I am 6 weeks later during which I’ve largely been confined to the house.

Somewhat surprisingly I’ve done OK: I’ve read a lot, I’ve fiddled around with various computer programs, blogged a bit, shredded many old bills, re-organised things and not watched daytime TV and not even listened to the radio a great deal.

A visit to the consultant at about week 3 was somewhat surprising – I didn’t things were going too well, he thought they were going great! He has always appeared somewhat disdainful of patients, GP’s and a willingness to prescribe antibiotics for imaginary infection. He said mine was one of the more difficult operations of my type that he’d done. I suspect he wanted the medal I claimed for myself on that one.

The doctor (and consultants) views on the solubility of soluble stitches are quaint – their reported view is that they dissolve in 10-14 days. I started off with 20 stitches, six weeks ago. Number of stitches which have disappeared through dissolution: 3; Number that I’ve helped out: 12. Number remaining: 5. The nurse seemed a bit more clued up and said they “took ages”. I suspect the problem is that patients assume that they shouldn’t tell the doctor they’ve been fiddling with their stitches, so the doctor continues in the happy belief that stitches dissolve.

So that’s the story of my last 6 weeks, the funniest thing in all this is something my dad said; unfortunately it makes it pretty much absolutely clear what my operation was, and so I might leave it to an ephemeral tweet.

A piece of land

I am the under-gardener to The Inelegant Gardener, more specifically I am the under-allotmenteer. For those outside the UK, allotments are standard sized vegetable gardens enshrined in UK law. We took possession of our first half allotment plot on 1st October 2006.  I remember our visit to the colony to see the allotment; we’d taken our traditional Saturday morning wander around town when The Inelegant Gardener mentioned, apparently in passing, that she’d like to look at an allotment (or rather a half-plot). I was instantly wary of this idea, I remember watering and weeding on my dad’s allotment as a child, back breaking and boring work. But when I stood at the foot of the overgrown plot I was instantly converted. A strange feeling came over me, of land, food, honest toil and soil – it was like my own Soviet propaganda film. Here I could work the land and provide!

PA010065

The half-plot on possession, October 2006

But more was to come: walking back to the car some months later, after working on the half allotment, I pointed and laughed at the risible start someone had made on digging a neighbouring whole plot. A sheepish Inelegant Gardener admitted to being the owner of the risible start and a new whole plot. It turns out she was an aggressive territorial expansionist, albeit a pathetic digger. The Inelegant Gardener did her best “feeble female” look, and I agreed to dig the new allotment. A task I was to complete some 18 months later, almost exactly two years ago.CIMG0807

A risible start to the digging of the whole plot, April 2007

As under-gardener my principle tasks are digging and construction: sheds, paths, compost bins and the like. It’s rather satisfying work compared to my day job, which mostly concerns generating abstractions inside a computer. Allotment work produces tangible output: an hours digging produces a patch of turned soil and a bucket of roots. Construction produces sturdy, useful structures of which a man can be proud. As a result of this toil I am able to identify perennial weeds purely from their roots: dock, bindweed, nettles, couch grass, horsetails, ground elder. I sometimes worry that The Inelegant Gardener will pimp me out to other allotmenteers for digging work.

The Inelegant Gardener is still subject to unrealistic fancies, having directed me to spread about a ton of farmyard manure on the potato-patch-to-be she seemed to believe the worms would quickly incorporate it into the soil. Bollocks would they, not in two weeks, not without the aid of little squad of wormy JCBs! It was muggins wot’ dug in the manure. I still think potatoes are magic though, turning over the soil with a fork and white egg-shaped edible things appearing – it’s magic. More realistically the potatoes came out all manner of shapes and sizes, several years they suffered from blight.

For us allotmenteering is a bit of fun, if a crop fails it doesn’t matter. Seeing the blight-wilted potato-tops and unearthing the rotten, stinking tubers gives an insight into what it is to rely so closely on the vagaries of nature for your livelihood. Seasonality becomes much more obvious; despite being relatively clued up about agriculture in truth I had little sense of when what vegetables were in season. Now I know, and it’s cabbage for most of the winter. Currently in season are courgettes (bloody hundreds of them), carrots, sweetcorn, potatoes, mangetoute, French beans, raspberries, beetroot. It’s fair to say we haven’t entirely cracked planting appropriate quantities, to start with we had one or two exemplars of any particular vegetable per meal, now we have massive, short-lived gluts.

We achieved a crop on our second visit to the allotment or rather Henry, a fellow allotmenteer, gave us some produce to keep us interested. He has continued to provide advice ever since, but now we swap vegetables and fruit. When we started only a small fraction of the plots on our colony were in cultivation, and Henry seemed to be keeping the place alive. These days most of the site is cultivated, it’s a friendly sort of place – most people will stop to say a few words as they pass on their way to their own plots. I can do a passable impression of a someone who knows how to grown stuff, if interrogated.

Our other neighbour at the allotments keeps chickens, at one point they had free range across the whole site they would come and supervise digging, jumping into the trench at inopportune moments to pluck out a tasty grub. Nowadays they are behind chicken wire, but still come to the fence if you’re digging or weeding by them, making approving clucking noises. There is something very reassuring about this companionship.

These days the allotment is looking almost ship-shape, at least it does when we’ve caught up with all the weeds. I continue to be proud of my construction efforts.CIMG0844

New paths! June 2010