Tuesday, 30 August 2011


So I'm still in the States, although our trip is nearly at an end, and in a few days we'll be packing for the long flight back to London. I enjoyed Renovation, the 2011 worldcon, a great deal. Reno was ... well, Reno. I sort of knew what to expect and on that basis I can't say I was disappointed or surprised to any great degree. Las Vegas has never appealed to me (I absolutely don't get the gambling thing, on any level) so the idea of spending time in a downsized Vegas didn't exactly rock my world. But, the worldcon is only ever partly about the physical location. It's the meeting of a community, or a number of marginally overlapping communities, and in my experience the quality of the event spaces and hotels, and ease of transit between them, counts for at least as much as the charms of the host city. In that respect Reno wasn't too bad. I, like most of my colleagues, ended up in the Peppermill, a vast, warren-like resort hotel stuffed with slot machines and bad-taste decor. But, my room was excellent and spacious, it was a manageable walk to the convention center, and I didn't find the heat nearly as oppressive as it had been in LA before my departure. A shuttle bus ran throughout the day, although it mostly managed not to be there when I needed it, but if there wasn't time to walk the taxis were quick and relatively affordable.

Conventions are odd things, and I can easily understand why people either never give them a go, or are put off after one or two bad dealings. My first convention, 1991's Mexicon in Harrogate, was not a particularly joyous experience. I did not know many people and while I'd been published, my handful of stories hadn't yet earned me any kind of name recognition, and certainly not the very minor level of "celebrity" which comes from being an SF pro. Although I met many friendly people, including a number who have remained good friends (and was driven there and back thanks to the kindness of Paul McAuley, who happened to be living near me in St Andrews at the time - we were both writing for Interzone) I still left the convention feeling like an outsider knocking on the door, rather than feeling part of the scene.

I did not return to an SF convention until 2001, by which point I had sold many more stories and had a novel under my belt. It was a vastly different experience. Although still relatively new to the big grown up world of novel publishing, I'd already made enough contacts that it was hard not to walk into a room and spot someone I knew well enough to cadge a pint off. That's been my experience ever since, certainly in the english-speaking world. I've been to foreign conventions where I didn't know anyone at the start, but since I'm usually there as a guest, and therefore being chaperoned, it's not an issue. My wife has often accompanied me to conventions, and still does on occasion, but it's been a while since it was just the two of us, talking to ourselves in one corner of a room.

By the time Reno rolled around - my fifth worldcon - I already had tentative meet-up plans scheduled before I arrived. Before very long I was sitting down with a pint before me, chatting to old and new friends, and not long after that I was into the swing of my program schedule, making sure I was where I needed to be for panels, readings and so on. Since I wasn't attending Renovation as a "guest" writer, my workload was fairly stress-free. As a guest, I often end up delivering talks and these can and do require a large measure of preparation, often weeks in advance. I moderated one panel (the moderator is the one who keeps the panel on track, makes sure everyone has time to talk, takes questions and so on) but that isn't usually too onerous - I normally sit down some time beforehand and scribble some bullet points for discussion in case the conversation flags, but as often as not they aren't needed.

The only part of the con I wasn't looking forward to, in fact, was the Hugo award ceremony. It's a long, long evening and it starts early enough that it's difficult (for me at least) to eat beforehand. There are nibbles at various points in the evening, but also a lot of alcohol, so it's easy to over do it if you're not careful. This time, as well, I had a horse in the race. It was my first Hugo nomination, and a big enough personal deal that it was essentially the reason I was in Reno. I was surprised, in fact, at the number of times I was asked how many of these things I'd lost, as if I had some extensive history of Hugo nominations. Well, no. That was my first, and as far as I was concerned I was going to assume it was just as likely to be my last as well. Now, I didn't think it likely that I was going to walk away with the award. People had liked Troika well enough to nominate it, and there were even some who liked it best of all out of all the novellas, but it was by no means the favorite in what was generally perceived to be a decent set of stories. But, but. We've all seen awards go to stories that were not the favorites, or even the next-best favorites. So - for myself, at least - while you try to chill out and convince yourself that you can't possibly win and therefore need not get nervous as the winning announcement draws near, there's always that small voice at the back of your head that says, but it could still happen. So for me, award ceremonies are a combination of anticipation, discomfort, terror, and (generally speaking) the quiet let-down as the moment passes and it becomes clear that, no, you haven't won. There's an element of disappointment, but it doesn't last too long and I can't say I've ever lost an award to a writer or work I genuinely disliked. Losing the novella category was perhaps more of a let-down that it would normally have been, given that it was the last of three awards that Troika had been shortlisted for (it had lost the Locus and Sturgeon awards earlier in the summer). But, you know, no biggie. The whole shebang - the ceremony, the party afterwards, the treatment of the nominated writers - was faultless, in my experience. Hell, I even got a nice laminated certificate and a neat brushed-steel kaleidoscope to take home. So, no complaints from me.

As to the bigger question - was the whole Reno trip worth it? That's no easier to answer than it ever is. As mentioned, I've been to five worldcons now. Four were on different continents, and the one that took place in Europe was also in a different country to me. Like most of the people who show up, I'm there on my own ticket. That's a long-haul plane flight, hotel accommodation before and after the con (as a jetlag sufferer, I'm not going to the States, particularly not the west coast, for anything less than a couple of weeks) as well as the basic cost of membership and accommodation at the con itself. That's a lot of money. Is it worth it? I'm attending the worldcon because I enjoy the immersion in that community, the discussions, the meetings with old and new friends. But that's only part of it. I'm also there to promote myself as a writer, to (hopefully) reach a few new readers, booksellers and other industry insiders. Speaking for myself, it's much harder to judge whether or not that investment is really cost-effective. Because, aside from the purely monetary side of it, which is not small beer by any means, there's also the fact that I'll be lucky to get any writing done while I'm on the road. Yes, there are writers who can work anywhere, anytime. I don't think I'm particularly precious about my working habits but I'm not one of those. Give me a day in a hotel and I might get something done, but the odd hour here and there just doesn't cut it. Not when I'm also trying to get the gym, fight jetlag, deal with the hundred and one minor complications of being abroad (In my case this included forgetting to pack my driving license). But it's not just the lost time while I'm away - it's the time spent preparing for the trip, the time spent recovering. The last phase of productive writing for me was early August, and I doubt that I'll get back into the swing of things until a good week into September, given that I'll be hit just as thoroughly with jetlag on the return leg. So: it's a big, gaping hole out of my year, and last year I did two big conventions, both of which needed intercontinental travel. Yeah, pity poor me, forced to endure the glamorous jetset lifestyle of the internationally published novelist. Honestly, there are elements of it that I never stop enjoying, and I'm grateful for what SF has given me. Realistically, though, I'm still not at all sure that the time and effort of attending the big cons are justified in terms of maintaining or expanding my profile. That doesn't mean I'd stop going - there's still the friends and community side of the equation, the mere fact of being able to talk SF with people who care as deeply about it as I do - but it does give one pause for thought. That said, I suspect that I go through these contortions every time I come back from a big con, and I don't doubt that I'll be going through them again, this time next year, after Chicago. I hope to be there.

Thursday, 18 August 2011

I'm so Hollywood

Griffith Observatory, LA. On my way to Reno for the World Science Fiction Convention, my wife and I flew into Los Angeles and sent a few days with some old friends of ours in Burbank. We only get to see them every five or six years and it's always great to hook up and renew our acquaintance with the area.

Built on the edge of Mount Hollywood, the observatory is a short drive from Burbank and on a clear day offers magnificent views across town and out to the sea. There was low-lying haze when we drove up, but the observatory buildings were still gloriously sharp and bright against a pure blue sky, doubtless as impressive and inspiring as when they were first built in the mid 1930s.

Griffith Observatory has never been a working observatory, but rather a place of education and outreach. In that respect it still seemed to be doing an excellent job, judging by the many children and adults evidently stimulated by the well constructed and informative exhibits inside. Even as someone with a background in professional astronomy, I found much to enjoy and think about.

In the public imagination, Griffith is perhaps best known for its use as one of the locations in Rebel Without a Cause (it had apparently been used in earlier films, but never in its intended function). Fitting, therefore, that there should be a small memorial to James Dean on the Observatory grounds.

Thanks to Barbara Bella for the photographs, all of which remain her copyright.

I'm in Reno now, which is another story. I'll probably not have too much to say about the convention until I get back, but for now I'm enjoying it tremendously - although one does get rather tired of the sound of ones own voice after a day of panels and general discussion.

Tuesday, 16 August 2011

Zoo City by Lauren Beukes

This is great.

We could argue the toss about whether it's "science fiction", given that the book is marketed as urban fantasy, and takes place in an alternate 2011 in which shamanism functions well enough to permit the targeted scrambling of SMS texts, and in which criminals are psychically bound to magic animals. What matters is that Zoo City is fantastically good on its own terms. It's blisteringly well written, heartbreaking and funny in the right places, ice cool, and paced like a runaway bastard, and with a sense of place - and culture - that rips you out of wherever and whenever you happen to be sitting and reading. For me that happened to be a transatlantic flight, but I still read it in pretty much one sitting, and finished it with tremendous satisfaction. I look forward to catching up with Moxyland next.

Wednesday, 10 August 2011

Of battleship turrets and pulsars

The Crab Nebula is the remnant of a supernova which exploded - or rather was seen to explode - in 1054AD. The pulsar at the heart of the nebula - the neutron star left over when the star's core collapsed at the moment of the supernova - was discovered in 1968, very shortly after Jocelyn Bell's discovery of the first pulsar using the Cambridge radio telescope.

The pulsar, and its associated nebula, have been and continue to be of great interest to astronomers. But the pulsar itself has a direct practical application, in that it's a very precise and well-studied clock. Rotating once every 33 milliseconds, the pulsar acts as a cosmic lighthouse, sending out beams of electromagnetic energy which happen to sweep across the Earth. Visible in both the optical and radio bands, the pulsar offers a reliable means of determining the accuracy and precision of time-based astronomical observations.

S-Cam, the instrument I helped work on, was a photon-counting detector. Each of its supercooled pixels was connected to a complex chain of electronics which enabled S-Cam to record not only the energy and position of incoming photons - individual particles of light - but also their arrival times. As each photon arrived, it triggered a cascade of electrons which rose and fell in a well understood fashion. The amplitude of that electron burst gave one an idea of the energy, or colour, of the photon, and the onset of the burst told one about the arrival time. S-Cam's electronics were connected to a GPS receiver, a piece of hardware which provided a definitive timestamp, accurate to millionths of a second, for each photon.

The raw output data of S-Cam, in simple terms, therefore consisted of a long list of sequential photon events. There would be an arrival time - referenced to some offset zero point - then the X,Y coordinates of the pixel which had seen the event, and finally a parameter which was proportional to the energy of the photon.

In other words, something like this:

0.0045 3 5 15
0.0067 1 4 28
0.0143 2 5 09

... and so on. A typical observation could easily contain more than a million photon events, but we didn't need to concern ourselves with the individual lines of data; we had software to chew the numbers and spit out processed data in astronomically interesting formats: spectra, time versus intensity curves, and so on.

Occasionally, though, we had to dig down really deeply into the data, because something didn't quite make sense.

The Crab pulsar was a high-priority target for S-Cam for one simple reason: it offered us the only independent, microsecond-level test of our time-tagging. It was almost impossible to verify that the electronics chain was working well in the lab. We couldn't use the GPS hardware to generate a test signal because the GPS hardware was already part of the electronics chain - it would have been like trying to use a ruler to measure itself. We were confident that the instrument's absolute time-tagging was good to within a second, and we had no reason to doubt the precision of the individual photon events. But only an observation of the Crab would settle matters.

To our relief, all seemed well. The "heartbeat" of the Crab, as revealed by our instruments, looked the way we expected it to. Importantly, the main peak - the higher of the two "blips" in the pulse profile - was arriving bang on the nail. We could be sure of this because the main dish at Jodrell Bank makes regular observations of the Crab, and the small variations in the Crab's rotation period are tracked and published from month to month.

As an aside, the big dish at Jodrell - now the Lovell Telescope - was completed in 1957. The two hinge points, on which the dish swivels, incorporated components from the gun turret mechanisms of the British battleships HMS Revenge and HMS Sovereign.

So, all well and good. We had our well-calibrated instrument with a reliable time-tagging system. We could then go ahead and do lots of actual astronomy, safe in the knowledge that the individual photon arrival times could be trusted.

But it wasn't that simple. Much later in the program, some of our colleagues raised an interesting point. While our Crab pulse profile looked fine from a standpoint of absolute phasing, there was something a bit fishy about it. If the profile was a heartbeat with two spikes, then the spikes themselves were about 30% fatter than they should have been.

We performed an exhaustive analysis of the system and its data processing software, trying to make the pulse profile conform. But nothing we did fixed the problem. And the deeper we looked into it, the more troubling the discrepancy began to look. That "fattening" of the pulse profile was a hint that, down at the level of the individual time tags, something was going wrong. Some percentage of the photons - some, but not all - were being assigned erroneous timetags.

It only showed up in bright objects. If we go back to that list of photon events above:

0.0045 3 5 15
0.0067 1 4 28
0.0143 2 5 09

and imagine a small error - an addition or subtraction of some small number - being applied to the timetags. Now, those photons can't break the laws of physics - they must arrive in strict time order! And indeed, that's what appeared to be the case - most of the time.

But occasionally we'd see a timetag where it appeared as if a photon had come in earlier than its predecessor:

0.0045 3 5 15
0.0067 1 4 28
0.0059 2 5 09

Now, this made no sense. And it only "showed up" in observations where we were getting a sufficiently high flux of incoming photons for one to hop the queue and seem to arrive earlier than the one before it.

It took weeks to get to the bottom of the problem. And in the end it turned out to be due to a fault at the actual hardware level. A piece of electronic circuitry was not behaving properly, due - it eventually became clear - to a piece of stray conducting material bridging two parts of the electronics board. This component was a set of binary registers designed to convert the raw arrival time of the photon into a different data format, using something called a "Gray Code".

Now what the hell is a Gray Code? I had no idea, but I quickly got an education. A Gray Code, or "reflected binary code" is a very clever mathematical procedure. Incorporating a Gray Code converter into our electronics made very good sense, because what a Gray Code ensures is that there are no sudden "spikes" in the data transmission system.

Imagine sending pulses down an electronic line, encoding arrival times. If your photon events happened at nice intervals, you might get:


... and so on.

But that "roll over" from 0.999 to 1.000 is bad news, because instead of just one digit changing, four have changed. And (at least far as I understood it) that's not good in the context of electronic signal processing, where you want things to be as smooth as possible.

The Gray Code solves that. It cleverly ensures that two successive values will only differ by exactly one bit, meaning that - as far as the electronics cares - there is nothing to hint that there has been a "roll over". Later, when you want the data to be intelligible, you apply a reverse Gray Code to put it back into its normal format. And that's exactly what was going on in S-Cam.

Except that, during the Gray Code conversion, that stray bit of conducting material was screwing things up. Basically, if a digit appeared in one register, it would "contaminate" the one next to it, propagating an error throughout the data analysis.
But this effect was so subtle that we had not seen it until someone noticed that our Crab pulse profile was too fat.

Once we understood what was going on, it was relatively simple to construct some simulation software. This verified that we had a complete, self-consistent grasp of the problem. Of course, that didn't help us fix the data that was already affected by the fault.

But actually, it did! By applying our understanding of the Gray Code issue, we were able to build a piece of software which took old datasets and unscrambled the erroneous time tags. It only worked for relatively bright, high-photon output objects - but those were exactly the ones where correcting the time tags really mattered. It was hugely satisfying, at the end of this months-long analysis, to be able to regenerate our original Crab pulse profile and see what we should have been all along.

That's almost it - but for one curious twist. The Jodrell Bank observations were crucial to our understanding of the problem, and I've already mentioned that the Lowell Telescope rides on battleship turrets. Gray Codes have many real-life applications, but one of the most useful is in position encoders - especially for rotary shafts.

Think of a shaft sticking up from the floor to the ceiling. Now imagine parts of the shaft painted in an insulating material, and other parts left in bare conductive metal. Now also imagine metal brushes contacting the shaft at different positions. As the shaft rotates, the brushes will either touch a conducting patch or an insulated patch. The question is, can you design a shaft such that these brushes always give an absolutely unambigous reading of the shaft's momentary rotation angle? Well, you can - but you have to use Gray Codes to do it. And one of the first uses for reliable position encoders was in ... you've guessed it ... battleship turrets.

Monday, 8 August 2011

My life in science

Here's a short piece, slightly expanded from one I wrote for the program book of Norcon, which I attended earlier this year - hope it's of interest.

From science to science fiction...

In 2004 I turned full-time writer after more than a decade doing science. If there's a question I get asked more than any other, it's why did I quit my day job?

Here's my attempt at answering that. It might help, though, if I said a bit about what that day job concerned, and how I got into it.

I'd always been fascinated by science on some level, but it wasn't until my early teens that I started giving serious thought to the idea of doing it as a career. On the face of it, this was a bit of an odd choice. My natural talents, such as they were, lay far more in the direction of the arts than the sciences. From an early age it was clear that I had an aptitude for writing, and beyond that I was also quite a precocious artist. Most of my family and teachers assumed that I'd end up either involved with words or paint, or some level. But I had other ideas. Inspired by Carl Sagan's Cosmos TV series, and the non-fiction science books of Asimov and Clarke, I had my heart set on being some kind of scientist. By the time I was forced to narrow down my choice of school subjects to maths, physics and chemistry, I was increasingly determined to become an astronomer. The fact that I wasn't particularly good at maths or physics - and even worse at chemistry - did not deter me in the least. Nonetheless my teachers were prepared to give me a chance.

It wasn't plain sailing by any means. I was offered a place at university in 1984, but that was contingent on getting a minimum set of grades. As it happened, I failed in spectacular fashion. I went back to school for another year, while most of my friends left home. It was a humbling experience, but in hindsight a really good one. That third year taught me a lot, and although I struggled to get the university offers that I wanted a second time round, I did apply myself to study with a lot more determination than in the previous two years. Unfortunately I was not able to find an astronomy course willing to offer me a place, but I settled on working with lasers, which at the time struck me as fantastically exciting, given that I'd only seen one in my entire life. As luck would have it, though, after getting three respectable passes, I was offered a position on an astronomy course at Newcastle. I'd never applied to that university, or even been to the city, so when I showed up on day one with my belongings in a rucksack, it was truly the start of an adventure.

I had a good time at Newcastle, and graduated with a decent degree in 1988. The friends I made there are all still close ones, and we keep in touch regularly. Importantly, three years of university life hadn't dented my enthusiasm for science. I decided to continue my studies by embarking on a PhD course. Newcastle didn't offer the doctoral level subjects I was interested in, and in any case I felt that a change of scenery would do me good. In the Autumn of 1988, therefore, I found myself on the way up to St Andrews, Scotland, to begin another three years of study.

Doing a PhD was very different to degree work. For the first time I was expected to show initiative, to develop my own research interests. I found the transition from formal study quite difficult at first, and I can't say I particularly enjoyed the first year. By the second year, though, I had some data to work on and more importantly a sense of direction. Equally significantly (to me, if not to anyone else) I'd also just broken into science fiction publishing. In the summer of 1989 I sold my first piece of short fiction, to Interzone magazine. I was over the moon. Not long after they also took a second piece from me. The stories wouldn't appear in the magazine until the following year, but for the first time I felt the faint stirrings of a possible second career.

My work at St Andrews involved observations taken with an instrument mounted above the main observatory building itself: the 0.5m Leslie Rose Telescope. Although small by international standards this was a big scope to be using in the UK, although not the biggest at St Andrews, and with the right approach it was capable of doing first class work. I spent many, many nights in the dome, often wearing four or five layers - it got cold in winter! Generally I had a radio for company and got through the night on multiple cups of coffee. This was real astronomy: the telescope's data-acquisition system was electronic, but ensuring that the instrument was correctly tracking the target star meant that an observer needed to keep returning to the eyepiece at regular intervals. The dome also needed to be moved manually throughout the night.

I also made use of the Anglo-Australian Telescope at Siding Spring, New South Wales, as well as some data collected remotely from the Canary islands. I've written a couple of stories with an Australian theme and they both stemmed from those exciting visits to the country in 1989 and 1990 (I returned in 1994, but that run was a total washout - we spent both nights playing pool and waiting for the rain to stop, if memory serves).

At the end of 1991, after three years in St Andrews, I handed in my PhD thesis, entitled 'Optical Spectroscopy of Massive X-ray Binaries'. Staying on to do further research wasn't really an option, so I was obliged to look further afield. After seeing a job vacancy I hopped over to the European Space Agency's establishment in Noordwijk, Holland for an interview. Though the job I'd applied for was now filled, they offered me another one. With the bank breathing down my neck, it didn't take me long to accept. I went from being unemployed, to having my future mapped out for at least the next year. That was a great feeling, although I was a little apprehensive about relocating to a foreign country.

The job concerned EXOSAT, an ESA satellite that had orbited the Earth between 1983 and 1986, studying the sky in the X-ray part of the spectrum. X-ray astronomy is a vast field in its own right, with its own language and concepts. Coming from a very different astronomical background, I had some catching up to do...and some pitfalls to watch out for.

To give an example: it's usual to study the distribution of starlight from a given astronomical object by means of a spectrum. A red star humps in the red part of the spectrum, a blue star humps in the blue part, and so on. In optical astronomy, it's normal to plot the units of 'colour' in terms of wavelength, which means that the 'blue end' is to the left of the 'red end'. In X-ray astronomy, however, the spectrum is plotted back to front! No problem if you work exclusively in one or other disciplines, but hopping between them needs a bit of mental agility, especially in the high-pressure environment of a telescope control room where you're comparing plots and trying to assess the feasibility of some observation with the clock ticking and your liquid nitrogen running out...

It gets even worse when you start thinking about the units used to measure the intensity of a given colour - are we using Janskys today, or Crabs, or photon counts? If it's photons, is it photons per second, or photons per second per KeV? Sound of man bashing head against wall...

Most of the science I did in my first three years in the Netherlands concerned data that was already in the EXOSAT archive - observations that the satellite had made, but which still hadn't been analysed in any detail. My studies focused on neutron stars in binary systems, trying to work out details of their magnetic fields, and how the fields interacted with the gas streams being dragged off the other star. The neutron stars all happened to pulsars - emitting regular 'ticks' of X-ray flux akin to a very accurate clock. However, as the gas stream from the other star crashed into the magnetic field of the pulsar, there could be a braking or accelerating force which would cause the ticks to slow down or speed up. Once you'd disentangled the effects of orbital motion you could use the remaining variations to say something about the details of the magnetic field and the complicated gas flows. Needless to say, there were a lot of messy details that got in the way of a clear picture.

I really enjoyed working at ESA, but it often seemed like the database management side of my job was squeezing out any time to get to grips with the science side. My bosses kindly gave me a third year as a fellow, but at the end of 1994 I left to spend two years commuting from Noordwijk to Utrecht, where I worked in the university's astronomy department. Working in a purely academic environemnt was another culture shock and I unfortunately I didn't find that I got significantly faster in my paper writing than at ESA. I often got horribly bogged down in a particular stage of the analysis, fretting over error bars or something, details holding me back for months when I should be surging forward. I could see trouble brewing unless I either changed my career plans or became magically prolific overnight. At the end of 1996 I completed a telescope run in Chile, and then my partner (now my wife) and I took a week's holiday in the Atacama desert. By the time we got back to Holland, I was out of work.

It was scary but liberating. I used the spare time to finish my book, which I eventually managed to sell. At the same time, 1997 was the year when I finally felt that I was getting somewhere with my short fiction. I'd been writing and publishing for what seemed like years, but up to that point nothing had seemed to make any kind of splash or attract the wider attention of other editors in the field. Between 1997 and 1998, though, things started happening. My stories began to be noticed a bit more, and I started picking up interest from the American magazines.

I was also fortunate: I'd applied to work for a small company based in Haarlem, who claimed to have something to do with space science. As it happened, the firm turned out to be run by an amiable welshman I'd already known as a colleague in ESA. The firm took me on, and after a few small contracts spread over the next two years, I ended up working as a contractor on an ESA program named S-Cam. That was 1999, which was a fairly significant year for me. Ten years on from my first short fiction sale, it was the also the year when I managed to sell three novels. One written, one sort of written, the other no more than some vague intentions. It was all very exciting and I was lucky to have the support of my colleagues, many of whom turned out to be closet science fiction readers.

Working on S-Cam was fascinating. It was a project to develop a new detector technology for use in ground and space-based astronomy. S-Cam (abbreviated from STJ-Cam, or superconducting tunnel junction camera) would basically be the ultimate, all-singing, all-dancing camera, with a capability to not just count every single photon of starlight arriving from space, but to also log its arrival time with microsecond accuracy, and also determine its energy or colour. What would have been intractably difficult observations could now be made very easily, almost in a point-and-click fashion.

That was the idea, anyway, but S-Cam was also cutting-edge technology with all sorts of teething troubles that needed to be overcome. Not only was the instrument temperamental - it needed to be cooled to within half a degree above absolute zero, which is pretty cold - it also demanded a completely new approach to data analysis, all of which had to be invented more or less from scratch. I found that my dual background in optical and X-ray astronomy came in very handy, as S-Cam was basically an optical camera that behaved like an X-ray detector. Despite the technological difficulties we still managed to collect a lot of data with S-Cam, hooked onto the William Herschel Telescope in the Canary islands. Along the way we made some very neat observations of eclipsing binary systems, measured quasar redshifts and the temperatures and chemical compositions of stars. Between 2000 and 2004 we worked to upgrade to a larger version of the detector, with 120 pixels rather than 36. The 120 pixel array saw first light in the summer of 2004, just after I left ESA, and performed well despite less than brilliant weather.

So why did I leave? Not because I didn't enjoy the job, but because the demands of writing had increased to the point where I had little time for anything else. It was also deeply unfair on my wife, who hadn't had a holiday or much of a social life since I signed my novel contract. I was sad to give up science, but at the same time excited at being able to give writing more time. I'd found myself turning down approaches to write stories for anthologies - exactly the kind of offer I'd spent most of the last twenty years dreaming of getting! Now at least I'd be able to say yes to a few things that took my fancy.

I do miss some aspects of the day job, especially the banter around the coffee table in the morning. Doing science was also the kind of job where you never really knew what you were going to be working on from week to week, and the challenge of thinking analytically was obviously very different from the kinds of mental process involved in writing. That said, I think I'm reasonably well suited temperamentally to sitting at home all day, and it's surprising how quickly the hours go by. Also, you don't stop being a scientist just because they stop paying you. Science is a state of mind, not a job definition. I'm still fascinated by the entire edifice of modern science, and an avid reader of New Scientist. All in all, then, I'm happy enough with the way things worked out. In my old day job, I got to have fun and work with some amazingly talented and generous people. Now I get to write about other planets and other times for a living, and I'm more delighted than you can imagine that some of my readers are scientists and astronauts, still out there doing what I always dreamed of doing. Being a science fiction writer has probably opened more doors for me than being a paid scientist ever did...

The only thing that hasn't improved is the vast amount of coffee I still drink, but you can't have it all. The mathematician Paul Erdos once described himself as a machine for turning coffee into proofs. Change "proofs" for "science fiction" and you've got a pretty good description of me.