Other Links


Wide contour image

Download latest version - now available for OS X, Linux, and Windows

AAOGlimpse is an experimental program that reads in astronomical images from FITS files and displays them as 3D surfaces using OpenGL. It can display images in a way reminiscent of programs like Skycat and DS9, and although it lacks a large number of features that they have, it does allow you to tilt your image interactively, spin it around, look at it from the back, and generally have fun seeing it from all angles. It produces some rather nice screenshots - good for illustrating presentations - and may just show you things about your data you'd not noticed before. It can handle images, spectra, and data cubes. It can work with any data cube that can fit into available virtual memory, which in principle should be limited only by the amount of empty disk space available.

The latest version is available from AAO, here. Recent changes are described here.  (Links to previous versions are included in the change list, just in case I've broken something that used to work. If so, please let me know.)

Most recent changes:

Version 1.6 is now available for OS X and Windows. Version 1.4 is available for Linux. You find these on the downloads page.

The most significant change in version 1.6 is support for more than just a main and a secondary image. AAOGlimpse can now load an essentially unlimited number of images and switch quickly between them. The 'Open' and 'Open secondary' file menu items still function as before, and an image loaded using these replaces the exisiting main or secondary image, but an image loaded using the new 'New' file menu item is simply added to the existing list of images. The left and right arrow keys move between images, and a new 'images' menu displays the list of available images. The numeric keys can also be used to select images, and these can be tagged to display them in superposition. (This is described in some detail in the change notes.) A new 'show keyword details' strip can be invoked from the 'windows' menu, and can be used to display the values of FITS keywords for the current image.

Note that at the moment, most of the illustrations in this page are from the earlier OS X version. The new portable GUI looks slightly different, but operates in the same way. Version 1.5 introduced some minor interface changes, a center of gravity estimate, and fixed a crash that was seen on an OS X 10.8 system where the font files used were not in the expected place. The page you're reading now needs bringing up to date, but you can find out about all the latest features by looking at the change descriptions.

Contents of this page

What can it do? A brief summary of AAOGlimpse's capabilities.
Current version The current state of the program.
Installation How to install the program on your Mac.
Source Something about the source code for the program.
Running A quick guide to using the program.
Control keys and cursor How to use the mouse and what the key combinations do.
Menu options What the various menu options do.
Working with highlit areas How to select regions of your data.
Working with JPEG images Using AAOGlimpse to look at your photos, and JPEG data.
Working with 2 images Blinking anod other tricks with two images.
Limitations and problems Some of the things that aren't quite right yet.
3D data cubes Working with 3D data.
Future plans What might come next.
The socket interface Controlling AAOGlimpse from another program.
Acknowledgements Thanks to all concerned.

What can it do?

The current version (1.6) is an early release but it can do the following:

(The illustration at the top of this page shows a test image of two galaxies, in grey scale with contours superimposed, tilted slightly to show the 3D effect. A small rectangular area centered on one of the galaxies has been selected and the summed data in each axis is shown.)

There are some caveats to this brief summary of the facilities, as you might expect. See the section on known limitations for more details.

The program has been written to handle all data internally as 3D data cubes (even a spectrum is treated internally as a data cube of dimensions (1,1,N)).
Back to contents

Current version

The current version of AAOGlimpse is available from AAO, here. This is an early releasel . However, it can read in FITS files and display them, and has produced all the illustrations for this Web page. At the moment it only runs under Mac OS X or under Linux, on any 64-bit machine with a decent amount of memory and reasonable graphics capabilities. There is a 32-bit version available for Windows, which can do all the 64-bit version does except for handling really really big data files. It does help to have a 3-button mouse, because it gets annoying to have to control-click instead of right-clicking. A scroll wheel is very useful if you have a desktop without a touch pad, although I find I prefer to scroll by using two fingers on my laptop.

My laptop is a 13" MacBook Pro, which is not generally regarded as a machine you'd buy for heavy graphics work, but it works well on most data I've tried it on - mainly CCD images up to 4096 by 4096 pixels and some data cubes. Versions before 0.5 could get very slow displaying larger images because they used every pixel in the data when creating the displayed surfaces. Now the program makes a more intelligent choice as to which pixels to use, and this limits the load on the graphics sub-system. With version 0.85 the program can handle data cubes that exceed the physical memory of the machine, which it does by making allowing you to concentrate on a subset of the planes of the data cube, moving that subset through the cube as required.

This early version of the program is being made available now in the hope that people will give it a try and give me some feedback on whether this sort of display program is useful (do we really need another program that displays FITS images?) and if so what sort of features other users would like to see. I have my own ideas, but I'd like to hear yours - email to ks at aao.gov.au.
Back to contents


Trivial. On OS X, download the appropriate .dmg file, double click on it and you see a new disk image on your desktop. In that is the AAOGLimpse program. You can run it directly from there or you can copy it to somewhere else - Applications would be an obvious place. Double-click on it and it starts up. (If it doesn't, send me an e-mail. In particular, do tell me which version of OS X you're running - you can get that from 'About this Mac' in the Apple menu.)

On Linux, download the .tar.gz file, gunzip and and untar it, and you will have a directory that contains the AAOGlimpse program, together with a test image and two font files that the program needs. AAGlimpse expects to find these in the directory from which it is run.

There are more details in the Readme file included with the program.

Back to contents


The source for AAOGlimpse is available here and there is some documentation for it here. This is not particularly tidily packaged, and at present will build only on OS X, but if you want to see how these tricks are done, this is the place to look. (Bug reports are always appreciated, fixes are really wonderful!)
Back to contents


When AAOGlimpse starts up, you should see a window like this on your screen:

AAOGlimpse startup window

The rather interesting image rotates rather nicely and gives you something to look at while you think what to do next. Anyone who's ever run the Apple OpenGL demonstration program will recognise this image, and it should be pretty clear what formed the basis for this Mac version of AAOGlimpse. (I'm very grateful to the people at Apple for this. See the acknowledgements section for more details, including something about the shape used.)

Most of the image viewing controls are available now, and you can practice moving this image around if you like, but if you have a FITS file available, we might as well move directly to having a look at it. If you don't, or if AAOGlimpse has trouble reading your image (not unlikely, at this early stage of the program), there is one that ought to work included in the disk image you downloaded.

There is also a small window that contains controls connected with image scaling. We'll come to that later.

Click on the 'File' menu and select 'Open'. Select a file of yours if you like, but it might be safer to use the one supplied with the program, which is called n6770.fits. You should be able to select any file ending with ".fit" or ".fits". At this point AAOGlimpse has been tested with FITS files that contain 1D, 2D and 3D data, and has bee tried on data cubes of up to 25GBytes) If you select n6770.fits, you should see:

AAOG n6770 open

That's your basic image display, just like any FITS image viewer will show you. Except perhaps for the colour table, but I like this one. (It's the old Figaro 'grjt' table - see acknowledgements for details.) If you don't like the colour table, you can select a gray scale using the 'colour' menu. (You can also set a negative colour table, one like the Skycat default table, or load one from a file - if you have one AAOGlimpse recognises, which you probably don't.) Keep away from the 'invisible' option in the 'colour' menu, for now. (If you really must, you can always get back by selecting 'Figaro default colours' in the 'colour' menu.)

The default scaling isn't the best for this image. This is where the scaling control panel comes in. It should be over to the left of the screen. By default it scales between the 98 percentile levels of the data and uses linear scaling. Change the percentile value to 95 (press return for it to take effect) and click on the 'square root' radio button. It should look like this:

AAOG n6770 rescaled

The percentile entry box, scaling option buttons, and the explicit maximum and minimum display values are standard controls for this sort of display program. Experiment with them if you like. The scale display entry box at the bottom won't seem to do anything. Leave it alone or set it to 1.0

If you move the cursor over the image, the little box second down at top left of the window will show you the pixel you're over and it's data value. That's all standard stuff too.

Now for something different. Left-click somewhere on the image and move the cursor - SLOWLY! You should see something like this:

AAOG n6770 rotated

and now you start to see some of what AAOGlimpse can do. Your image is being displayed as a 3D surface, with the height scaled by the value of the data. The default orientation is face-on, so you're looking directly down on it, which it why it looks 2D. Spin it around. If it seems to get out of control, try command-R (for 'reset') or select 'Reset orientation' from the 'File' menu, which will return you to the original face-on display.
Back to contents

Control keys and cursor

The controls you can use when changing the view of the image are as follows: (it's worth reading this bit, because these are not really obvious in the way that menu options are.)

Left-click and drag: Lets you move the image surface around. The way to think of this is to imagine the image surface is enclosed in a large glass sphere (which is there, but which you can't see). When you click on it, you put your hand on this sphere and roll it around. You can spin it horizontally, or vertically, pretty much any way you want. You can turn it right over and look at it from the other side. Play with it and you'll get the idea. (If you are within a highlit area selected with the mouse, dragging changes the highlit area - see later. The assumption is that in this case you don't really want to move the image surface. This is a slight change in behaviour introduced in version 0.6)

Right-click and drag: Lets you move the image around on the screen. The displayed image should move with the cursor.

Center-click and drag: Zooms in on the image in response to the Y position of the cursor. This accomplishes more or less the same thing as using the scroll wheel, but is less convenient. It's listed here only for completeness. (Control left-click and drag has the same effect if you have a one-button mouse or keypad.)

Scroll in Y: Zooms in and out of the image, about the currently displayed center. (You can use a scroll wheel, or two fingers on the keypad.)

Shift and drag: Draws a rectangular selection box over the area selected. (You need to have the display face on - otherwise the position of the cursor is ambiguous. If you see the cursor position readout changing as you move over the image, you are face on. If not, use command-F or command-R to set the display face on. Prior to version 0.6 you had to shift, left-click and drag to select an area, which was too fiddly.) Plots of the summed data over the selected area, in both directions, are drawn along with the selected area. Command-delete will clear these plots and the selection box. Once a selection box has been drawn, you can move it, expand it or contract it and even rotate it using the mouse. See the section on working with highlit areas for more details. (If you turn the image face-on and still don't see the cursor readout working properly, your data may have an odd world coordinate setup that AAOGlimpse can't handle. It's worth trying the 'use pixel coordinates' menu option in this case.)  This works for all faces of a data cube that can be brought face-on using command-F (so still doesn't support selection on the top and bottom faces of a data cube).

Shift scroll in Y: Collapses the display in Z. This is particularly useful as you tilt the surface over - it looks better in general with the Z scale lowered when you do this. (You can use a scroll wheel, or two fingers on the keypad.) If you increase the scale too much, the display starts to get clipped at the high values.  If you decrease it to zero, you get a flat image surface, which you can still rotate and tilt as usual. If you decrease it further, you are allowed to go slightly negative, but not very far negative. You may like the effect. Or not. (There is an optical illusion where the image appears to rotate as you go through the zero point. It isn't rotating, it's inverting, and if you blink you can sometimes see the image pop in an out between a rotated an inverted image. Try it.) The scale factor is shown in the 'Data Scale' box of the scaling window, and can also be set explicitly from there. (Scrolling works much more conveniently, and the 'Data Scale' box will probably go in a future release.)

When you're moving the image around using these controls, you may also find the following key combinations useful: ('command' means the Apple command key - one either side of the spacebar on most keyboards)

Command-R: resets the display to the way it was when the file was first loaded, ie face towards you, centered in the display. This is useful when you've got yourself a bit lost and aren't quite sure which way round the image is now. This is also available from the 'File' menu.

Command-F: turns the display to face on. This means you're looking directly 'down' on the image. The important thing about this is that it means it's clear which pixel is beneath the cursor, and so it's only when the display is face on that the cursor readout and subset selection features work. This is also available from the 'File' menu. (At the moment, this works for the front and back of a data cube, and the left and right sides, but not the top or bottom.)

Command-I: Toggles the information display - the display of the camera view parameters - turning it alternately on and off. This is mainly a diagnostic, although it can be useful when determining parameters for programmed animations using the 'animateTo' socket command. (The information available changed with version 0.8, and this would normally be run with the information display disabled - it can also make animations slightly jerky when enabled.)

Command-H: Hides the whole program, which is standard behaviour for OS X programs. If you do this by mistake, click on the AAOGlimpse dock icon to bring it back. (Originally, just 'h' would toggle the display of a central 'help' box but it wasn't very helpful and this was dropped from version 0.8.)

Command-A: Toggles animation of the display. This just sets the display rotating around, and is mainly for show.

+ and -: If the axis grid is being displayed, '+' raises the level at which it is displayed and '-' lowers it. (I don't think there is much scientific information to be gained from the use of '+' and '-', but it's a neat trick, and it was useful when debugging the axis code.)

Up-arrow, shift-up-arrow,down-arrow,shift-down-arrow: If a data cube is being displayed, these can be used to pull planes from the top and bottom of the displayed data and put them back. Down arrow removes planes, up-arrow replaces them. If the shift key is held down, high-numbered planes are affected, otherwise low-numbered planes are affected. This is described in more detail in the section on 3D data.

1, 2, 3: If there is a secondary data set loaded, these control just how the two are combined to produce the display. This is covered in more detail in the section on working with two images.

All the other features of the program are accessed through the menu system or the control panels, and what they do should be fairly obvious.
Back to contents

Menu Options

The program provides File, Windows and Help menus, and a Colours and Plug-outs menu.

File menu options

Open: Allows you to open a new FITS file. This will close down the display of the previously open data. The open file dialogue will allow you to try to open any file with a '.fits' or a '.fit' extension.

Open secondary: Allows you to open a second FITS file to compare with the main data. This is covered in more detail in the section on working with two images.

New from selection: Closes down the display of the current image, and opens a new image created from the selected area of the current image. This is useful when there is only a limited section of the image that is of interest, although Display only selected area does almost the same thing, and allows you to return to the whole of the data without reopening the data file. New from selection is most useful when homing in on a part of the data prior to collapsing it. (And will really come into its own when a 'save' function is implemented.)

New from collapse in: Allows you to collapse the data in the X,Y or Z directions and open the new data that this creates. If you have a 3D data cube, collapsing in any of these directions will give you a 2D image. If you have a 2D image, collapsing in Z does nothing (it's already collapsed in Z), collapsing in X or Y will give you a 1D summed cross-section.

Use Pixel Coordinates: Although traditionally radio data is pedantically correct about world coordinates, optical data may not be. Even if your data has correct world coordinate data from the FITS header in the input file, it may be sufficiently complex that it triggers problems for this early version of AAOGlimpse. In any case, there may be times when you want to work with just plain pixel numbers for your axis values. If 'Use pixel coordinates' is selected, any current data is redisplayed with pixel numbers used for the axes. (This often clears up problems with cursor readout in particular.) Moreover, if the program opens a new image with 'Use pixel coordinates' still selected, it will ignore the WCS information in the header. (Apart from anything else, this can make large images noticeably faster to open.)

Display only selected area: Restricts the display to showing only that subset of the data currently selected. This is useful when there is only a limited section of the image that is of interest. It is particularly useful for reducing the number of planes of a cube that are to be displayed.

Display all data: switches back to displaying the whole of the current data rather than just the selected area.

Info: Toggles the information display - this is the same as command-I, as described above.

Animate: Toggles animation of the display - this is the same as command-A, as described above.

Surfaces: Toggles on and off the display of the data surface or surfaces (for a cube). Usually, you want the surface display on. However, if you have contours or wires enabled, you may want to see them by themselves, without the underlying surface. In this case, you can either select the invisible colour option for the surface, in which case the grid or contours will appear in a hidden-line mode, or you can disable the surface altogether in which case you see all the wires or contours transparently. Also, if you have two images, you can enable just the surface of one and just the contours of the other.

Wires: Toggles on and off the display of a wire grid drawn between the individual image pixels. Note that the grid lines intersect in the center of a pixel. This is only really useful if you are zoomed in t show only a small section of the image. Otherwise the grid lines take over the whole display.

Contours: Toggles on and off the display of contour lines around the data. At the moment there is very limited control over the actual contour levels. The program picks ten levels equally spaced between the current maximum and minimum display levels for the data.

Axes: Toggles on and off a display of the axes for the data. See above for the effect of the '+' and '-' keys when axes are being displayed.

Data histogram: Displays a plot of the histogram of the data values, either in the whole of the data or in the currently selected area. If the selected area is moved, the histogram changes to reflect this, and the plot also shows the current display limits and allows these to be changed by dragging the limits.

Reset orientation: Resets the display to they default when the file was opened - this is the same as command-R, as described above.

Snap to face on: Turns the display face on, so the cursor can be read unambiguously - this is the same as command-F, as described above.

Display single planes: If a data cube is being displayed, this toggles a mode where only a single plane is displayed at a time. This makes it much easier to fly through the planes of a cube while displaying them in a full 3D mode (ie other than just face-on). In this mode, there is only a single limit line shown in the graph through the planes, and this can be used to fly through the cube, displaying a single plane at a time.

Surface by cubes: Toggles the way the surfaces are built up. The default, faster, option is by 'planes', with the surface built from quadrilaterals drawn between the centers of each group of four adjacent pixels. The slower, but in a way more 'traditional' option is by 'cubes' (strictly 'cuboids') where each pixel is drawn as a rectangular block. ('Cubes' provides 3D equivalent of the 'histogram' plots provided by PGPLOT's PGBIN() routine, while 'planes' is the equivalent of the 'join-the-points' plots produced by PGLINE(), if that analogy helps.) If you have a lot of points in your image, you probably won't see the difference and should use the faster default option. If you have very few points in one or more dimensions (for example, a 2D set of spectra) you may prefer the 'cubes' option.

Clear overlays: Clears any display of the selected area and the plots of the data through it - this is the same as command-delete, as described above.

Remove spikes: Is a bit of an oddity, because it modifies the data. It passes a spike rejection filter through the data, replacing any single pixel whose data differs from the mean of the eight surrounding pixels by more than 3-sigma by that mean value. I had some early test data that really needed this, which is why it's in.

Note that there is no print option. (Print would be useful, but for the moment I've been using the 'Grab' utility to take screenshots of the display window and print them from that. Sometimes they come out much darker than they look on the screen - the image at the top of this page was saved from Grab and then quickly lightened in Photoshop.)

Back to contents

Colours menu options

The items in the colours option control the colour look-up table used to set the colour of each pixel on the basis of its data - as scaled by the current scaling settings. This is all pretty standard for an image display, so should be pretty familiar.

Set Figaro default colours: Sets the colour look up table to the one I usually use from the Figaro data reduction system. This is the table called 'grjt' - see the acknowledgements section.

Set Skycat default colours: Sets the colour table to one based on the default 'heat' colour table used by Skycat.

Open LUT file: Puts up an open file menu that allows you to select a file with a '.lut' or a '.ascii_lut' extension that specifies a colour look up table. At the moment, .lut files have to be in the Figaro binary format, and .ascii_lut files have to be in the Figaro ascii lut file format, so most people won't have many of these lying around. (The .ascii_lut format is simple: 256 different levels are specified each with a red, green and blue value, each integers in the range 0..255. Lines starting '*' are ignored, and all other lines have to have 8 integers in them, separated by spaces. The first 256 values are the red values, the second 256 are the green values, and the last 256 are the blues values.)

Use gray scale: Switches to a gray scale look-up table, with colours scaled linearly between black for the minimum displayed data value and white for the maximum displayed value.

Negative: Inverts the current look-up table.

Invisible: Not the most obviously useful option! It actually sets all the look up entries to the background colour, and the result is an image that can't be seen. It becomes a useful option if wires or contours are being displayed, as it produces a display of just the contours in a hidden-line mode. Try it to see what I mean.
Back to contents

Plug-outs menu options

'Plug-outs' are small separate utility programs that can be used with AAOGlimpse. They can be written in any language (Python, C/C++, shell scripts, etc) and can communicate with AAOGlimpse using the socket interface. When AAOGlimpse starts up, it looks for a 'Glimpse' sub-directory in the user's home directory, and if that exists it looks in there for any executable files with a '.glimpse' extension. Each such file will appear in the 'Plug-outs' menu, and can be run by selecting it from this menu.

This means that the contents of this menu can be controlled by the user, and it may well be empty.

More details on the use of 'plug-out' programs can be found in a separate section on the use of plug-out programs with AAOGlimpse.

Window menu options

The Minimize, zoom, and bring all to front options are standard OS X options.

FullScreen: sets the program into full screen mode, where the main display window takes over the whole screen. The menus can no longer be seen, but appear when the mouse is moved to the top of the screen. To get out, use the 'ESC' key, or select the FullScreen menu item again.

Show scale strip: toggles the display of the scale strip at the top of the main window.

Show selected area strip: toggles the display of the control strip that displays the details of the current highlit (selected) area, and allows you to switch various aspects of the display in or out. For more details, see the section on working with highlit areas.

Show navigation and zoom windows: toggles the display of the two additional windows on the right hand side of the main display window that show a zoomed view of the area under the cursor and an overall view of the data with a box showing the area displayed in the main window.

Show console: toggles display of a separate window that can be used to log messages from the program. Any error messages should appear here.

Back to contents

Working with highlit areas

When the displayed data is face on (use the 'snap to face on' option in the file menu, or the command-F key combination) the position of the cursor is clearly defined, at least in the plane that is being displayed. (Its position in the third axis is of course completely undefined.) Moving the cursor under these circumstances will result in the display of the current cursor position and the position and data value of the pixel under the cursor.

If you have the data face on and drag the cursor while holding the shift key down, a rectangular area will be highlit in the display. This serves two purposes:

As you drag the cursor, the size of the highlit area will change, and two plots will appear showing the data in the selected pixels, collapsed along the axes of the selected rectangle.

Once you release the shift key, the highlit area remains displayed. You can now modify the position and size of the highlit area using the cursor. Move the cursor over the highlit area. You will see orange arrows appear, as follows:

If you select the 'show selected area panel' option from the window menu, a control panel will appear that displays the size and orientation of the highlit area (at present, only in pixels). This also has a number of check boxes that allow you to switch in or out a number of optional aspects of the display of the highlit area. These are:

(If you switch in the 'wires' display using command-W, you can see the exact position of the pixels in the display. Note that the wires are usually drawn through the centers of the pixels - you might expect them to be drawn around the pixel boundaries, but they aren't. That's a consequence of the way the surfaces are constructed by default. You can change to surfacing using 'cubes' if you want to see the wires around the pixel boundaries.)
Back to contents

Working with JPEG images

The 'open' file menu command will now allow files with .jpg or .JPG extensions to be opened. These are displayed as surfaces with the height of the surface given by the sum of the R,G,B components for each pixel, and the colour as specified in the JPEG file. (The colour fidelity is not a good as a proper image display program will provide, as it uses a colour map with a limited number of different colours. However, this is tuned to the colours actually used in the image - a big thanks to the developers of libjpeg.) The colours are unchanged by changes to the image scaling, but will be lost if a new colour table is applied - in most cases, you don't want to do this, unless you like the unnatural effects you get, although applying a gray-scale colour table is sensible, and the default skycat colour table results in something akin to a rather bright sepia image. Negative colour tables look like negatives.
Back to contents

Working with two images

You can load and display one image using the 'Open' option in the 'File' menu, and then load a second image using the 'Open secondary' option. When the main file is opened, the data it contains is displayed centered in the window, a mapping having been set up between the coordinate system used for the display and the world coordinates of the data. When the secondary file is opened, the same mapping is used to display it. The result is that the two images overlap as determined by their world coordinate data - which means that if the world coordinates of the two images differ markedly, the second one may be displayed a very long way from the first. Clearly, for this to be useful, the two images need to have coordinates that at least overlap. It does mean that two slightly different images, perhaps one optical and one radio, can be superimposed properly according to their sky positions. Similarly, two spectra would be overlayed properly in wavelength. (The data is always displayed on a linear coordinate system, pixels being stretched as needed.)

The display of the two images can be switched using the '1','2', and '3', as follows:
'1': Displays the main image.
'2': Displays the secondary image.
'3': Displays the two images superimposed. Note, not added, simply sharing the same display space. At any given point, it will be the pixel from the image with the larger scaled data value that is seen.

When there are two images in play, the scale panel affects the one currently displayed, as does the 'colour' menu. This means that the scaling for each image can be adjusted independently, and different colour tables used for each. Also, the 'Surfaces', 'Wires', 'Contours' and even the 'Axes' options in the 'File' menu apply only to the displayed image. This means you can use '1' to display just the first image, then make sure only 'Surfaces' are enabled, then use '2' to display just the second image and then enable only 'Contours'. If you then use '3' to display both, you will get the surface of the first and the contours of the second, superimposed. A slightly different and less flexible scheme was used prior to version 0.5, which supported only 4 specific ways of combining the two images. This current scheme takes a little more setting up, but is much more flexible. (And you may have a reason for wanting to superimpose the wires on one image on the contours of the other. If you do, you can now do it.)

Two images shown with various display options. The two single images are at the top, and at the bottom are shown the two superimposed, and then the first with the contours of the second - only the contours for the peaks show above the 2nd image, and this probably isn't an ideal pair of images to use. (They have no astronomical significance - they are out of focus images from some optical tests.) The first has a black and white colour table and linear scaling, the second has the default colour table and square root scaling, just to show that the two images can be coloured and scale independently.)

For a more astronomical example of working with two images, here are two adjacent DSS images displayed by AAOGlimpse. The first screenshot shows the first image, the second shows the second image loaded using 'Open secondary'. The two are displayed on the same coordinate system, so they are offset in the display. The third screenshot shows the two images displayed together. The overlap area can be seen clearly when running the program and blinking between the two images, and the alignment in this case appears to be perfect (as one would hope).

1st DSS imageDSS image 2

DSS images combned
Back to contents

Limitations and problems

Of course, there are a number of limitations, even to the small set of features currently available. Here are some of the ones I've noticed:

Back to contents

3D data cubes

If you read in a 3D data cube, AAOGlimpse will display it as a stack of XY surfaces. When you open a new data set, you start by looking at it in the Z direction, so all you see is the surface created from the plane with the highest Z value. If you rotate the cube, you can see it from all sides. Command-F will turn the nearest face directly towards you, and the cursor should provide you with a readout of coordinates and data values. If you are not looking orthogonal to the direction in which the planes are being created then it is not clear which pixel you are looking at, and the data value cannot be shown. At the moment, AAOClimpse only displays XY planes through the data, but XZ and YZ planes will be an option in later versions.

In the scaling panel is a check box called "Clip low data". This can have quite a dramatic effect.

3D cube with clipping

This image shows a 3D data cube where the Z axis represents wavelength, with a galaxy in the center. The most obvious feature of the image, apart from the galaxy stretched out in wavelength along the central axis, is the plane that corresponds to the night sky line at 5577 Angstroms. It can take a bit of experimentation with the maximum and minimum levels in the scaling panel to get the effect you want. Without data clipping, all you see is a rectangular box.

Note that if you look orthogonal to the XY planes you are looking at all the planes edge on, and if there are a lot of planes (the image above has 2048) you can get some strange Moire effects with the pixels of the display. It can help to switch on the wire grid - wires always take up one pixel on the display, and so tend not to show this effect - although they do tend to dominate the display.

You can turn the cube so that you have one of the left or right sides face on, and then use the cursor to select a subset of the data. You can use this to select all of the cube in Y but only a subset of the Z-planes. If you then use the 'Display only selected data' option from the File menu, only those planes will be displayed. You can then use the up and down arrow keys to pull planes off the top and bottom of the cube and replace them. By holding down the arrow keys, you can get a fly-through of the planes in your selected subset. (You don't have to select a subset first, but the fly-through will run faster the fewer planes the program has to redisplay each time a plane is added or removed. It also runs much faster if you have the display face-on, because only the visible face needs to be redrawn each time things change. The 'Display single planes' option in the File menu allows you to get the same effect without needing to have the display face-on.)

AAOGlimpse allows you to plot a cut through the data planes over a selected part of the image, and to use this plot to provide interactive control over which planes are displayed. To use this feature:

Turn the image face on (use command-F).
Move the cursor to the top left corner of the part of the image you want to select.
Press the shift key, and drag the cursor while continuing to hold the shift key down. Release the shift key when you have selected the required part of the image.
If the 'selected area control' panel isn't visible, select the 'Show selected area panel' item in the 'Window' menu. Click on the check box labeled 'Show graph through planes'

You should now see a plot of the summed data over the selected area in each plane.

bluecube showing plot

In this image, because the upper face of the cube is a uniform blue, I've titled the displayed cube using the mouse after generating the plot. The plot shows the spectrum through the galaxy. (You can tell the selected area is centered on the galaxy, because the summed data plots that accompany the selected area box show a peak in both axes.) The 5577 line is a plane close to the top of the box - you can see the blue line at the edge of the cube - and is the first sharp peak in the plot as you go along the spectrum from the right. The plot itself does not rotate with the image - it is what AAOGlimpse calls a 'face-on' plot.

The orange lines show the range of planes being displayed at the moment. By dragging them, you can adjust the range of planes being displayed. If 'Display single planes' has been selected from the File menu, there is only one orange line shown, and this indicates (and can be used to change) the single plane that is being displayed.

If a huge data cube is being read in, a red line along the bottom of the graph shows those sections of the cube that are still to be read. It serves as a progress bar for the background thread that does the reading of the data.

Future plans

Obviously, there a lots of ways to extend a program like this. I have my own list, but I'm interested to hear from potential users about features they'd find useful. Here are just a few possibilities:

Back to contents

The socket interface

This allows command line control of some aspects of the program, and more generally allows a program written in any language to interact with AAOGlimpse. The interface is particularly easy to use from Python. The details of how to do this are documented separately under the AAOGlimpse socket interface.
Back to contents


This program only exists because of a lot of really good and useful stuff people have made available on the Web. I need to go through the code to see just what I have made use of, but here are some:
Bill Pence's fitsio library.
Mark Calabretta's wcslib.
The Hershey fonts and Charles Schwieters, John Stone, Peter Holzmann, Jim Hurt for code that included the Hershey font data and showed how to make use of it.
Tim Pearson's pgplot - some of the algorithms for the axes came from there, although the implementation is only partial - in particular the number formatting is lacking (so the look of the axes is my fault; real pgplot axes look much better.).
The people at Apple who wrote the OpenGL example program on the developer website. (I kept the trianguloid trefoil it displays as the start-up surface - this is credited to Roger Bagula.)
Paul Bourke for the contouring algorithm. (He also gets a credit from the Apple people for some of the display techniques used.)
Richard S. Wright Jr.'s math3d library (this is part of the example code for the OpenGL SuperBible by Wright, Haemel, Sellers and Lipchak, published by Addison-Wesley).
Henry Maddocks, Sam Hocevar, and Sean Morrison for the FTGL OpenGL text library.
John Tonry is the 'jt' in the 'grjt' default Figaro colour table name, and provided the original colour table. (The 'gr' is for Grinnell: one of the first image display devices.)
This software is based in part on the work of the Independent JPEG Group - the authors of libjpeg, used here for JPEG file access.
The people at TrollTech and later at Nokia who developed and maintain Qt.
Back to contents