PyAstro for GIMP
GIMP Python Plug-ins for Processing Astro Images
Introduction
GIMP is a free image processing program that is freely available from its website at https://www.gimp.org/. It is developed by the Linux community and is often included in the default install of various flavours of the Linux operating system - particularly those derived from Ubuntu, which are currently very popular. Versions of the package is also available for Windows and Mac OS X at the GIMP website. It is a very popular and versatile package, arguably competitive with commercial programs like Photoshop © .
Of interest here is that GIMP is suitable for processing astronomical images. Typically these are obtained with a DSLR camera, taking multiple short exposures (< 30s) at high ISO (400-1600), which reduces the effect of light pollution and is relatively tolerant of poor camera tracking. Along with the astronomical images (`Lights'), it is usual to take a few dark exposures (`Darks'), for use in correcting in-camera noise, and also flat frames (`Flats') to correct for vignetting and dust on the camera sensor. GIMP can perform all the necessary operations, including dark subtraction, image stacking, field flattening and image enhancement (in particular colour correction, brightness adjustment, noise reduction and sharpening). However there are some issues to consider.
Firstly, the procedures involved can be complicated and tedious to carry out and one needs to know a lot about GIMP to be able to do what's necessary. Fortunately, GIMP provides a facility to incorporate user-developed plug-ins, which can be designed to perform some of these complicated tasks with ease. A number of such plug-ins have been developed by the author (Bill Smith) for use with the GIMP Python interface and are made freely available here. Collectively they are known by the title PyAstro for GIMP, or PyAstro for short. They have been used a great deal by the author and have proved to be reasonably robust and useful. It is hoped that others will find them useful also.
Secondly, it should be noted that DSLR cameras usually record colour depth to at least 12 bits per channel, while the usual JPEG image files use only 8 bits per channel. For this reason it is recommended that users of Py-Astro work with image files in RAW format (i.e. the native format of the DSLR camera). Since GIMP does not directly read RAW format, this will require you to get hold of one of the free programs: IRIS, DCRaw, or UFRaw, which can be used to convert the RAW files into 16 bit TIFF files, which GIMP can read. There is also a free GIMP plug-in called gimp-ufraw you can obtain that does the job and functions as a GIMP desktop utility.
Thirdly, most older versions of GIMP can handle only 8 bits per colour channel and deeper bit depths are truncated when the image file is read, which is not ideal! Fortunately however, since version 2.9 became available, GIMP has been capable of handling 16 bit colour and you are strongly recommended to acquire this, or a later version, and maximise your image processing power. That said, you can use PyAstro with 8 bit images, such as JPEG files, and even do something to mitigate the limitations of 8 bits (see documentation), but it is far better to work with 16 bits to begin with.
The following is a list of the plug-ins available in PyAstro the indicated sub-menus:
GIMP is a free image processing program that is freely available from its website at https://www.gimp.org/. It is developed by the Linux community and is often included in the default install of various flavours of the Linux operating system - particularly those derived from Ubuntu, which are currently very popular. Versions of the package is also available for Windows and Mac OS X at the GIMP website. It is a very popular and versatile package, arguably competitive with commercial programs like Photoshop © .
Of interest here is that GIMP is suitable for processing astronomical images. Typically these are obtained with a DSLR camera, taking multiple short exposures (< 30s) at high ISO (400-1600), which reduces the effect of light pollution and is relatively tolerant of poor camera tracking. Along with the astronomical images (`Lights'), it is usual to take a few dark exposures (`Darks'), for use in correcting in-camera noise, and also flat frames (`Flats') to correct for vignetting and dust on the camera sensor. GIMP can perform all the necessary operations, including dark subtraction, image stacking, field flattening and image enhancement (in particular colour correction, brightness adjustment, noise reduction and sharpening). However there are some issues to consider.
Firstly, the procedures involved can be complicated and tedious to carry out and one needs to know a lot about GIMP to be able to do what's necessary. Fortunately, GIMP provides a facility to incorporate user-developed plug-ins, which can be designed to perform some of these complicated tasks with ease. A number of such plug-ins have been developed by the author (Bill Smith) for use with the GIMP Python interface and are made freely available here. Collectively they are known by the title PyAstro for GIMP, or PyAstro for short. They have been used a great deal by the author and have proved to be reasonably robust and useful. It is hoped that others will find them useful also.
Secondly, it should be noted that DSLR cameras usually record colour depth to at least 12 bits per channel, while the usual JPEG image files use only 8 bits per channel. For this reason it is recommended that users of Py-Astro work with image files in RAW format (i.e. the native format of the DSLR camera). Since GIMP does not directly read RAW format, this will require you to get hold of one of the free programs: IRIS, DCRaw, or UFRaw, which can be used to convert the RAW files into 16 bit TIFF files, which GIMP can read. There is also a free GIMP plug-in called gimp-ufraw you can obtain that does the job and functions as a GIMP desktop utility.
Thirdly, most older versions of GIMP can handle only 8 bits per colour channel and deeper bit depths are truncated when the image file is read, which is not ideal! Fortunately however, since version 2.9 became available, GIMP has been capable of handling 16 bit colour and you are strongly recommended to acquire this, or a later version, and maximise your image processing power. That said, you can use PyAstro with 8 bit images, such as JPEG files, and even do something to mitigate the limitations of 8 bits (see documentation), but it is far better to work with 16 bits to begin with.
The following is a list of the plug-ins available in PyAstro the indicated sub-menus:
1. Color Tools:
5. Misc Tools:
|
2. Effects:
4. Layer Tools:
|
The plug-ins can be obtained from the file PyAstro3.tar.gz and the documentation from PyAstro3.pdf. Please consult the documentation for details of the plug-ins and how to install them.
© Bill Smith 2024.
© Bill Smith 2024.