GIMP team revitalizes astrophotography tools

In the eyes of astrophotographers GIMP has always been an underdog. Recent changes in the unstable version finally address this issue.

The bottleneck #1 was in the lacking support for high bit depth precision. And thus ever since the GIMP team passed the point of no return towards the bright GEGL future with its processing in 32bit floats and non-destructive editing, it was only a matter of time till the FITS plugin was upgraded.

So the plug-in was first cleaned-up and ported to GEGL by Michael Natteter in January 2013. After that, during last weekend, Michael Henning implemented support for high bit depth precision in the FITS loader and saver, namely:

  • 16 and 32 integers;
  • 3-2bit floats;
  • double-precision floats.

GIMP will now load such images in their native precision mode, except for the last option.

Let's illustrate what it actually means. Here's a picture of Sagittarius A*, the supermassive black hole at the center of the Milky Way Galaxy (image courtesy by Chandra X-Ray observatory).

Looks boring? Well, this is how GIMP automatically scales image data (which is, by the way, bottleneck #2).

Let's start taking it to extremes and apply +3 gamma with the Levels tool. Here's what you get with GIMP 2.8 and its 8bit precision:

Whereas unstable GIMP 2.9 loads the FITS image in 32bit float mode, hence tweaking gamma is far, far less ugly. There's not so much loss of useful data:

Now, there are different ways to scale. Let's try a new experimental GEGL operation called Exposure and bump lightness by +7EV stops.

Needless to say, with its 8bit precision GIMP 2.8 owes you a new pair of eyes:

Whereas GIMP 2.9 does a much better job:

What's next

Michael Henning says that some work still has to be done to improve the GIMP's FITS plugin. Indeed, in some cases you get warnings upon loading images.

The next step could be implementing image scaling algorithms similar to the ones in FITS Liberator. That sounds like a fairly simple GEGL operation. Patches are welcome.

After that, apparently, something like adjustment layers would make most users happy. Seriously, for analysis of scientific data there's much more suitable free software.

Windows and Mac builds of unstable GIMP are likely to appear on soon. Linux users are recommended to run GIMP from Git with the latest released version of the Cairo library.

How to work with FITS images

A month ago Joseph DePasquale, science imager from Chandra X-ray Center at Smithsonian Astrophysical Observatory, updated his tutorials that explain how to use GIMP for processing FITS images. Those now match GIMP 2.8 and recent versions of G'MIC.

Joseph is in touch with the GIMP team, and his interest was one of the reasons the upgrade of the FITS plugin actually happened.

What's up with GIMP astro plugins

If you've been following all things astronomy on Linux, you probably stumbled upon Georg Hennig's astro plugins for GIMP, which is a mix of toys and tools. Until recently it looked somewhat abandoned (and indeed was last updated for GIMP 2.4).

Half a year ago LGW cleaned UI of the plugins and then colaborated with Georg on further improvements. Most of the changes are now available in the v0.8. However the release is currently missing most recent changes from a Git repository, such as a fairly trivial port of the plugins to object API from GIMP 2.8.

Further work here is likely to involve porting the plugins to GEGL, so that tools like the rounding of stars and layers alignment would work directly on GEGL buffers. Georg is also thinking about resuming his work on various deep space objects' visualizations.

Finally, speaking of alignment, check out a new app called lxnstack. It's a very simple application for astrophotographers that makes use of OpenCV to align images and subtract darkframes. The most recent release, cut by Maurizio D'Addona yesterday, supports FITS files.

If you find some interesting links relevant to astrophotography on Linux, there's a hungry comments form below waiting to be feeded.