GIMP team revitalizes astrophotography tools

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;
  • 32bit 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.

Was it useful? There's more:

9 Responses. Comments closed for this entry.

  1. How do I get GIMP,will it work with USB camera. Orion Starshoot ll?

  2. Alexandre Prokoudine 20 February 2013 at 6:00 am

    Ronnie, GIMP would be not the best tool for capturing images. It’s first and foremost an advanced image editor.

  3. This is really great news. Both for professional and amateur astronomers.

  4. How does GEGL handle double-precision floats ?

  5. Ycletp: Like any other data format, though a specific Babl format. const Babl *format = babl_format(“RGBA double”), or if that short-hand is not registered:  const Babl format = babl_format_new(babl_model(“RGBA”), babl_type(“double”), ...)

    Don’t know how performant common GEGL ops and data conversions would be with doubles at the moment though.

  6. Is there a good tutorial available somewhere on the web for doing astrophotography processing using GIMP?

  7. Alexandre Prokoudine 05 February 2014 at 8:42 pm

    @David, yes, and it’s specifically mentioned in the “How to work with FITS images” section above :)

  8. nice tutor, i will to try it

  9. This is a really good article Alexandre. Thank you.

    Is there any chance that you could provide a 2017 update?  I’m starting to dig and research on my own but this article is a top search engine return and I’m sure a lot of people would benefit from an update.  Many thanks.