Discovery from the air

This week saw the final launch of the Space Shuttle Discovery. The mission (STS-133) is an 11 day mission taking supplies to the International Space Station. The mission also has robonaut R2 - the first humanoid robot to go into space.

There were some nail-biting moments during the countdown when there was a "no-go" from the Range Safety Officer because there was a fault with their command computer. That, finally, became a "go" with about 2 seconds to spare in the planned hold. The launch went well and looked great via NASA's HD Ustream channel. The Ustream audience peaked somewhere over 44,000 viewers during launch (I must admit that I was too captivated by the launch to keep track and I noted that number some seconds after launch when it was already falling).

Today, Will Gater pointed out a YouTube clip showing the view of Discovery's launch as seen from a normal passenger flight from Miami. The video starts with Discovery breaking through the cloud deck. Unlike the usual views from the launch site where the Shuttle seems to end up heading downwards, this video really shows the increase in altitude well. It is a great video and from the audio track it sounds as though this was one of the luckiest delayed flights ever. Enjoy.

Posted in astro blog by Stuart on Saturday 26th Feb 2011 (12:41 GMT) | Permalink

FITS for the web

[This is a cross-posting from my work blog]

If you've ever used a telescope with a CCD camera you've probably encountered FITS files. FITS, or Flexible Image Transport System, is a file format used widely in astronomy to share images.

As an astronomy student I remember finding FITS files a little mysterious. Their large file sizes made them seem antiquated compared to JPEG and PNG image formats but they do have some advantages: they store useful astronomical information about your observation (e.g. coordinates on the sky, details about the instrument, observer etc); they have a larger dynamic range (PDF link); and they can store more than just images*.

A few years ago, whilst testing some astronomical radiometers, I had to work out how to output time-series data in FITS format from a C program. It was a steep learning curve for someone who had never processed binary data with code. A week or so ago I was talking to Jon Yardley about how good it would be to be able to work with FITS files in a web browser. Web browser manufacturers don't support FITS files but during the conversation I realised that I had the tools to do it without the need for extra browser plugins.

Last year I experimented with reading astronomy visualisation metadata (AVM) from JPEGs. That made use of Jacob Seidelin's Javascript library for reading binary files and lets you read them byte by byte. More recently I've learnt how to draw in the browser using HTML5's <canvas>. The result is that I can now display a FITS file in a web page. The code is available if you want to have a play with it. It is a bit slow but that is mostly due to the time it takes to transfer a 2.2 MB FITS file over the internet; processing and drawing the image is actually pretty quick (tested in Firefox 4 beta). It even works on my Android phone!

Last night I thought about completing the circle; to save a FITS file as a JPEG image with AVM headers created from the FITS file headers. I couldn't see that it was possible to attach EXIF tags to a <canvas> element (although the canvas element can be saved as a PNG in Firefox 4 beta) but I discovered that somebody has written a library to encode JPEGs with Javascript. Over the next few days (or weeks) I'll look into that library and see if it will provide the solution.

I realise that specific software exists to process FITS files and ESA/ESO/NASA's FITS Liberator makes it possible for those with Photoshop. However, these have always been slightly detached from the web itself and require separate software to run. Web browsers are increasingly ubiquitous and increasingly capable (yes, even Internet Explorer) so finally FITS files can start to get out onto the web proper.

* They can hold tables as well as data cubes with up to 999 dimensions!

Posted in astro blog by Stuart on Tuesday 22nd Feb 2011 (10:59 GMT) | Permalink

False Colour

I've just seen a neat little video on YouTube showing how a Hubble Space Telescope image of a galaxy is made. The video is created by the Space Telescope Science Institute - the people behind HubbleSite. It shows 10 hours of image processing compressed down into 2 minutes. The final colour image of NGC 3982 was created from 7 grey-scale images taken with Hubble's cameras. It is really interesting to see the work that has to go into image processing to create the beautiful finished products we expect.

Although I try not to read YouTube video comments, one caught my attention. JackyRBKwan asked "so the galaxies are in fake colour??" This issue of true verses false-colour is one that is often brought up in comments online. I've seen criticisms of Chromoscope complaining that "invisible" parts of the spectrum are given 'false' colours with the implication that this is somehow deceiving or misleading. The same sorts of arguments are heard when people find out images from Cassini or the Mars Rovers have had their colours adjusted. The implication is that adjusted colours mean the image is 'doctored' or untrue.

I find arguments over 'true' colours very frustrating. What does true-colour even mean? Our eyes don't see the true colours of reality; they respond in certain ways to blue, red and green parts of the spectrum but there is some variation from person to person and our eyes fail to see all the interesting light emitted at other wavelengths (IR, UV, radio etc). Even if we define 'true' as equivalent to the average human eye, it is almost impossible to recreate this colour in print or on screen. Even on computers the colours of red, green and blue will appear differently depending on the colour space (RGB, CMYK, AdobeRGB, CIELAB etc) and display used. Ultimately, all images are false-colour and we should understand that.

Most multi-colour astronomical images are created by combining images taken through different filters (and sometime different cameras/detectors) which often don't directly correspond to the colour detection of our eyes. That isn't a bad thing. Sometimes, by altering or stretching the colours used it is then possible to see or understand something that we couldn't before. That doesn't make the final result false even if the colour is.

Posted in astro blog by Stuart on Thursday 17th Feb 2011 (22:38 GMT) | Permalink

Astronomy power list

The other day, in response to a poll of 3000 parents, Professor Brian Cox said that science was "not dominated by old men". Although I'd like that to be true (and preferably not dominated by any particular demographic group), I suspect it still is. It got me thinking though. Who holds the power over the direction of astronomical research and careers? Is it the senior professors? Is it the editors of "high impact" journals (who have the ability to veto particular topics or authors as they choose)? Perhaps it is those who define and assess the metrics that every scientist is increasingly judged by (their algorithms could make or break your career)? What about heads of Research Councils or university departments? Administrators?

I'm soliciting nominations for an Astronomy Power List 2011. Please provide nominations for those you think have the most power over astronomical careers and/or research, along with a brief justification, in the comments below. Keep it libel-free.

Posted in astro blog by Stuart on Friday 04th Feb 2011 (00:28 GMT) | Permalink
[an error occurred while processing this directive]