How Linux is advancing astronomy

Linux in astronomy
Linux helps astronomers control their equipment and process the images of deep space

Go to any gathering of amateur astronomers and almost all of the computers on show will be running Windows, with a handful displaying applications such as Nebulosity and Starry Night on a Mac OS X system.

While Macs are still the preferred option for media creation, Windows has a better selection of astronomy apps, such as Maxim DL, and wider driver support for cameras and charge-coupled devices (CCDs).

Chilean desert observatory copyright: eso

PRO-GRADE: Telescopes in the Chilean desert

Head into the professional world of astronomy, though, and Linux machines are ubiquitous. Speaking to science colleagues, fellow developers and reading this very magazine, it becomes clear that there are a wealth of options out there for avid stargazers and the same names and distros crop up again and again.

Apart from astronomy software, the other key issue is driver support for telescope mounts and cameras.

When it comes to commercial camera options, there are three approaches. The first, and probably cheapest, is using standard DSLR-type cameras, modified by removing the infrared blocking filter to increase sensitivity to night-sky objects such as faint emission nebula.

These tend to give good wide-field views with telescopes, but suffer from a high level of noise when it comes to imaging. As you're typically exposing on an object for minutes at a time, building up over several hours or even days of exposure time, noise level is critical.

Noise tends to look like speckles on the image, or an annoying glow in one or more corners (caused by thermal noise from the camera's electronics). The speckle is particularly bad, because the star fields look largely the same.

Windows software such as Deep Sky Stacker or Maxim DL happily copes with this using calibration image frames. On Linux, Astrotack supports dark frame manipulation, and applications such as Siril can support the stacking of individual images.

Controlling DSLRs in Linux starts with simple shutter/release and sensitivity control applications, which communicate to the camera via USB cables - the Canon EOS range is the most popular, because the cameras can easily be modified. You can then either transfer the images to the computer with a USB stick, or take out the CompactFlash (CF) card and insert it into a reader.

Watch this space

Rosette

ROSETTA NEBULA: This picture of the Rosette Nebula, taken by the author, is typical of the types of deep sky images possible using modest home equipment

With the second approach - using dedicated astronomical cameras rather than commercial DSLRs - the noise issue is less of a problem.

These cameras connect directly via USB, GigE or FireWire to your computer, and usually have one or more stages of integrated cooling, which reduces the problems caused by thermal noise. The downside is that they generally have smaller fields of view, or when they don't they cost about 10 times more.

When picking a camera, the monochrome flavour is usually more flexible with astro imaging, because it permits the use of the CCD with specialist narrow-band filters, which pick up specific frequencies of light emitted by things such as nebulae. It also has the side benefit of eliminating almost all light pollution caused by street lights. This is usually how deep sky imagers who live in suburban areas get their pictures.

On Linux, serious astro cameras for deep sky imaging, by companies such as SBIG, QSI and Finger Lakes, are supported, with applications including GoQat for the QSI series also handling some of the pre-processing dark frame subtraction, as well as having integrated autoguider support.

Atik camera

COOL OPERATOR: The Atik 383L+ cooled CCD camera, one of the most popular on the market

An autoguider is a small camera that works alongside the deep sky imaging camera, and sends the telescope little corrections to its tracking systems to ensure you get pin-sharp stars. Telescopes usually track the sky in what's known as side-real tracking, which follows the motions of the stars across the sky as the Earth rotates, but even the more expensive telescope mounts have small errors.

For visual use or short exposure use, this isn't a big problem, but when taking very long exposures it leads to unsharp and trailed star and object images. The autoguider effectively locks on to a star near where the main imaging camera is pointing, and keeps it locked in-between crosshairs.

If the mount should move incorrectly, the camera picks this up and sends a command to the telescope mount to correct it. This is how 99% of all long exposure deep sky imaging is done, from the home observatory through to the Hubble Space Telescope.

The third type of camera approach, typically for lunar, solar and planetary imaging, uses a high framerate webcam-type device to take a video of the object. The goal here again is to reduce noise, but mainly the effect of the atmospheric turbulence above us.

With 100km of sky to punch through, large professional telescopes use adaptive optics lasers to measure this turbulence and send corrections to the telescope's mirrors. Adaptive optics is available in the amateur domain but it's expensive and only works with micro mirrors and no laser.

For planetary and lunar imaging, the way most people beat the "seeing" (atmospheric mush) is to take hundreds of images in quick succession, as a video. Software combines these images, removing the ones where the seeing is not so good, and then composites the good frames to make one final sharp image. This is known professionally as "lucky" imaging, and while it was developed by professionals, the amateur community has taken to it far more.

There is a lack of widespread driver support for CCD cameras in areas such as planetary and lunar imaging. However, companies such as Imaging Source and Lumenera, and firms that make the deep sky cameras we've already mentioned - SBIG, QSI and Finger Lakes - can or do provide Linux support for their products, and will, in many cases, assist with installation.

If Linux is your platform of choice, check first that your camera is supported, though, because the deep sky ones mentioned are all quite expensive. When it comes to image post-processing, a few applications seem to be more popular than others on Linux. While their commercial Windows counterparts sometimes offer more options, these examples are no slouches.

DS9

STAR TREKKING: DS9 is a popular image-processing application both in professional astronomy and education

For image processing and data reduction there is the multi-platform DS9. It's used widely in educational projects, as well as at research facilities by people such as the Faulkes Telescope team.

Handling Flexible Image Transport System (FITS) along with other file formats, it enables photometric analysis, basic image processing, histogram adjustment and image mosaic creation. DS9 is simple, but effective at what it does. It required a download of the source and then some command line compilation but, as with many of the applications, the clear online instructions made this pretty straightforward on our Ubuntu system.

Dancing with the stars

SalsaJ

IMAGE MANIPULATION: SalsaJ is used in education to show students the ins and outs of image processing

Again multi-platform, the Java-based image manipulation and processing tool SalsaJ is more comprehensive, and requires compiling and running initially from commandline interfaces. (There are software GUI-based tools that really help with this, but the command line approach is straightforward.)

Widely used in education and available in multiple languages, SalsaJ also comes with online exercises for developing your astronomical skills, from measuring Doppler shift in exoplanets and looking at spectra, through to determining the weight of a galaxy.

GIMP

OLD FAITHFUL: Gimp is one of the most popular Linux applications, offering many of the facilities of Photoshop

Gimp is hugely popular and sports a Photoshopstyle UI. It supports the FITS file format, commonly used in astro photography, along with dozens of others and the range of options will enable you to process images to a level as good as those offered by its commercial counterpart. (Albeit with a steep learning curve and acceptance that the UI is possibly not as intuitive as Photoshop's.)

In terms of actual imaging acquisition, we've mentioned GoQat for the QSI range. Another popular application that supports both deep sky imaging cameras and the high framerate webcam approach is wxAstroCapture, which runs under Kubuntu, OpenSUSE and Ubuntu.

Again, with clear instructions I was able to get this running with my Artemis cooled deep sky cameras. While their implementation for Windows of ASCOM-compliant autoguider support was not in the Linux version, preventing very long exposure photography, the user interface and level of control matched many of the features of my typical workflow software on Windows.

With just a few extra tweaks to support autoguiders and the filter wheel (an Atik USB-controlled five-position wheel to change the types of filters my monochrome cameras use), I could have run an entire imaging session just in Linux.

As an astro imager, I focus on deep sky objects and imaging comets, and this is something that many people with an interest in astronomy and computers fall for. You see those lush Hubble-type images in magazines, and Linux will pretty much enable you to achieve the same effects.

Professional observatories such as the VLT, Keck and so on all have toolsets, which are sometimes freely available, so you can dive in at the deep end and look at the applications' professional use on a day-to-day basis. Being able to tap into the vast software resources of professional observatories should set you in good stead.

It does take some work, research and effort to get many aspects of astronomy on Linux working and ticking over - for free and with the stability that professional astronomers crave - but the future for Linux is looking better than ever.