Friday, November 11, 2005

Everything in its Right Place

Moonrise
As an observational astronomer, I'm supposed to work under the mandate of describing the universe as it actually is (and not for example, how we might like it to be). For the most part though it's a strange kind of abstract reality that I work on, which usually seems completely divorced from everyday experience. When I observe, I point the telescope at an object, and use some sort of instrument to carefully collect light from a faint little part of the sky. Then I painstakingly massage the data to remove instrumental effects. The goal is to make it as accurate a representation as possible of the light that was released in the colossal thermonuclear explosion of a dying star in a distant galaxy; which then fell through space for several million years, slowly stretching as the universe expanded; and finally rained down on the Earth, bounced off a couple of mirrors and went splat on a small cryogenically-cooled chunk of silicon. It's all a very pretty picture, but since most of my supernovae are 10,000 times fainter than can be seen by the naked eye on a really dark night, I rarely find that the things I think about at work pop up in my "real" life.

Astronomers, as a general rule, never know what constellation their objects are in, or have much more than a rather vague notion of where they might be located in the sky. This is often surprising to members of the general public, and is probably a source of irritation to hard-core amateur astronomers who are chagrined to discover that the pros long ago sold their souls to 'Go-to" scopes. In fact, at many observatories you may not even ever see the telescope, and you certainly never observe in the same room with it. Generally you want to keep the telescope dome as dark and as close to the outside air temperature as possible. It amuses me to no end to see the Holywood version of astronomy, with some guy in his shirtsleeves sitting at a desk on the observatory floor with all the lights on while he's observing.

Real observing is a bit like playing a rather dull and tedious computer game all night long, preferably in some super-arid and somewhat airless environment. That's on a good night. On a bad night, observing is exactly like sitting around for hours waiting for the clouds to go away and wishing there was something better on TV at 3AM than infomercials, phone-sex ads, and reruns of The Rockford Files. Occasionally, you find an episode of The Simpsons on, which is usually the cue for that bane of all astronomers: The Sucker Hole. (This is when the clouds suddenly clear out and convince you to open the dome and start observing, only to sweep back in 15 seconds after you start taking data.)

But I digress...

Anyway, every once in a while I get surprised by some part of my job popping unexpectedly around a corner and saying boo. Occasionally, such events can even trigger a Zen moment where it becomes clear that the sort of things I picture in my head do, in fact, exist in nature, and that the world "really does work that way."

The picture here was taken at one of those "Gee, the Earth really is round" moments. The image is of the moon rising over the engineering building this afternoon as I looked out the window. (The moon is the small white dot over the building. My iSight doesn't have much of a 'zoom' capability.) I was a little surprised to find it there, as I had just been battling with it about 5 hours earlier. I had another remote observing session with IRTF in Hawaii this morning, and the moon was unfortunately just 5 degrees from my supernova, which made it wicked tricky to get a spectrum. So when it showed up again this afternoon during the daylight I was momentarily confused. (Partly, this confusion was due to my being a bit knackered. Remote observing still causes havoc with my circadian rhythms; I just get net-lagged instead of jet-lagged.)

Then it all clicked in my brain. The Sun was setting in London, and some 10-15,000 km 'below' me on the other side of the planet, it was rising in Hawaii. The object that I had observed this morning had spent the rest of the night slowly rotating under my bum (technically, it was my bum and the ground under it that was rotating, but anyway...) and was now rising out my window.

And so there it was, somewhere, rising up over Big Ben and East London: Supernova 2005hk. Somewhere, lost in all the light from the late-afternoon sky, a few photons from some distant dying star were also raining down into my eyeballs. Raining down sideways, from my point of view. And not just into my eyeballs; but all over the walls of my office and the side of Blackett Laboratory; pinging off the dome of the Albert Hall; splatting into trees and birds and dogs and babies in Hyde Park; and spraying itself all over the oblivious population of London.

Kinda cool.

Sunday, November 06, 2005

One Long Pair of Eyes

So tonight, or tomorrow morning, depending on you're point of view, I'll be observing a supernova with the NASA Infrared Telescope Facility (IRTF) on top of Mauna Kea on the big island of Hawaii. However, I won't be in Hawaii while I'm observing. Instead, I'll be doing it from the 11th floor of Blackett Laboratory in central London while watching the sun come up over Battersea Power Station (that building on the cover of Pink Floyd's Animals). Occasionally even I get a little amazed at technology, and I must admit that this certainly pleases the gadget freak in me.

IRTF has this great facility for doing remote observing. The telescope is still steered by an on-site operator, but the observer no longer has to fly out to Hawaii to do the observing. If you have a fast net connection and a Unix box, you can actually xhost the telescope controls over the internet to your desktop workstation in real time! It's all very Jetsons.

For general users this spares you a costly (though often pleasant) trip to Hawaii. For IRTF, it means they can schedule lots of half nights and such relatively easily. For people like me it's a true godsend. In the supernova business, we never know when our targets are going to show up, but when they do, we want to act fast. So now I can write proposals to ask for ``Target-of-Opportunity'' observations. If a new supernova goes off, I can bump the scheduled observer for an hour and run my operations. But I don't need to buy an emergency ticket to fly halfway around the world. I just need to get up at 4AM and catch the tube to work a couple hours early.

Saturday, November 05, 2005

Ride the Snake

Python Code


When STScI first came out with their PyRAF software package, I was a little skeptical. Yes, the scripting language provided by IRAF was primitive and painful to use, so marrying IRAF to a decent scripting language is a great idea. However, Python seemed a little weird, a little new. Why not go with a more common and mature language like perl, which is installed on virtually every Unix box on the planet. However, the more I've used Python/PyRAF, the more I'm convinced it was an inspired choice.

Python does have a few quirks. I'm still not a big fan of using white space to indicate code structure, but I must admit I'm rarely bitten by it. Of course, I only ever work on my own Python code. If I was working with others I can see this might be a bit more of a problem. Especially as the standard solution in the Python community is ``never use tabs'' and I happen to like using tabs, (even worse, I like using 2 space tabs instead of the standard 4).

Anyway, where Python really shows it's strength is it's OOP-ness. Python is actually a completely object-oriented language, even though it doesn't always look like it. Unlike perl which tacks on objects an an afterthought, Python is OOP to the core; but it still retains that marvelous sloppiness of a scripting language which makes it a great tool for doing some pretty flash things rather easily.

For making short little scripts, the object-ness of Python is not particularly useful, but it's not particularly invasive either. However, as I've stepped up to coding more complicated things including my current task, a full-blown data pipeline, I've found objects more and more useful. The thing is that objects are a great way to deal with metadata without having to pass enormous numbers of parameters between tasks. Keeping track of the metadata is extremely useful in pipelines, where you need to mix lots of data together in different ways to get to your final data products. By making objects that act as code analogues to the various logical combinations of data the relationship between data sets is supplied naturally.

Python even has a built-in module which saves and retrieves object instances, which can be a little tricky, and is certainly tedious if you have to code it for each object type by hand. In Python it's a snap, you just dump your object instance into the `pickle' module and it saves it to disk in some magic appropriate manner, and will magically read it again later, handing you back an instance just as if you'd done nothing special with it. It's so easy it almost feels like cheating.

Tuesday, November 01, 2005

The Christmas Invasion

Evil Tarts
Ah, the holiday season approaches. The time of long nights and short days, 'year's best' lists, cheesy holiday songs, and Christmas specials on the telly (including the return of our beloved Doctor Who!). It's also marked by the return of those dangerous little confections known as mince tarts. Growing up in America, I was blissfully unaware of these things until last year. (I may have heard the name, but I had no real idea as to it's significance).

The basic idea seems to be to take a good 10 or 12 inch fruit pie, and train your Acme Shrinking Ray on it until it's about 2 inches across. Thus, by the geometry involved, you've increased the taste density by a factor of about 30 or so. They may look harmless, but those things sure pack a punch. They are the pie equivalent of blipverts, and may indeed make your head explode.

The King of Bloke & Bird

Intensive Care

Robbie Williams is an interesting phenomenon. In the 'States, he's almost a nobody. Just another one of those quirky British acts that showed up for a song or two and then disappeared. But here in the U.K. he's big. Really, really big! Maybe the most famous pop star of his generation.

When you see him perform on the telly, it's easy to see why he's been so successful. His 'X-factor' isn't his looks, or his charming mix of arrogance and self-depreciation. Rather it's in his performance. I don't know if I've ever seen anyone with such a magnetic connection to his audience. Despite the mocking irony which permeates his lyrics, he sells it by committing to it with a passionate sincerity that's hard not to admire. It's even more amazing that it works considering that he never for a moment pretends that it's not just an act. I suspect that this inherent contradiction is part of what makes it difficult for him to translate to an American audience. Americans tend to like their pop stars to believe their own hype.

His latest album Intensive Care just came out here. His previous album Escapology was a bit of a chore to learn to enjoy, but Intensive Care yields it's fruits pretty readily. The standout track is, not surprisingly, the first single "Tripping," which starts with a bed of disco-reggae, adds a generous helping of eastern tinged strings and a rap-over bridge. Plus a falsetto hook on the chorus that's so catchy it should come with a biohazard warning.

This genre blending does pretty much set the tone for much of the rest of the album. "Make Me Pure" is a fine example of his simultaneously cheeky, ironic, and sincere nature; a faux country ballad with a gospel chorus in the background and a lyric built around a prayer to God to "Make me pure, but not yet." "Advertising Space" is another lovely Robbie ballad that's already getting some airplay here as well.

The album does sag a little in the middle under the weight of too many midtempo ballads. But then the second half kicks in with "Your Gay Friend," an uptempo pop-rock song which is almost perky enough to be on a They Might Be Giants album. "Sin Sin Sin" sounds a bit like something lifted from Georgio Moroder's Donna Summer file. "The Trouble with Me" is another midtempo piece with a lovely melody that is almost certain to be the next single, and "A Place to Crash" sounds like Elton John wrote a song with The Rolling Stones and invited Styx in to do the backing vocals.

All in all, a pretty decent pop album. Not as consistently adventurous or successful as Gwen Stefani's Love, Angel, Music, Baby, last year's perfect disposable pop album, but certainly worth a listen.