Much astronomical data is in the form of 2D images. It is critical to understand how to display such data and be able to see all of the information it contains. This is an issue because in most cases, the data will contain more information that can be displayed on a screen at any one time. There are two issues: spatial resolution and, probably more importantly, dynamic range.
Note that many modern detectors have larger pixel dimensions than many computer displays. This means that it's not possible to see all of the pixels at one time; you can either see a subframe of the entire image at full spatial resolution, or the entire image at reduced spatial resolution; generally software does reduced spatial resolution by displaying every other, every 3rd, every 4th, etc. pixel value, so it is possible to miss features!
Most image displays provide only 8-bits of display range in intensity, giving only 256 possible intensities; I don't think the human eye can distinguish many more (or even that many) with any reliability. Most astronomical images can have up to 16-bits of dynamic range, 256 times more levels! Any image with more dynamic range must somehow be compressed into 8-bits before it can be displayed. This can be done either by sampling the true image coarsely (in intensity), which allows viewing of the whole dynamic range but can lead to the apparent loss of intensity detail, or by fully sampling only a part of the true image range, which leads to the loss of ability to view detail outside the chosen range, or by something in between. Most packages will use some default algorithm to make this choice automatically, so you have to be careful to understand what is being done, and what information might be lost in what you are looking at. Any decent display package will give you control over how to display the image, and you need to understand in detail how you can see different things in images when you display them in different way. To be able to choose reasonable display parameters, you will need to know something about the intensity values in your images, so most display packages will allow you to directly see pixel intensities. This is also useful so you can make sure that the values are somewhere around the levels that you expect!
Image scaling parameters are generally specified by a low and a high data value (or a low value and a range) which give the limits in the true data which will be scaled into 8-bits. In old-imaging parlance, the brightness is set by the choice of value that will correspond to the darkest pixel, and the contrast is set by the difference between the darkest and lightest pixel.
Common choices for automatic scaling might be to display an image such that the pixel with the lowest data value in an image will appear black, and the pixel with the highest data value will appear white; this is sometimes called 100% scaling. However, many images can have defects which might appear as very low or very high data values, so often this choice will set display parameters non-optimally. Alternative autoscaling might be determined from the low and high data values of the middle 99% of the data values (i.e. exclude the 0.5% lowest and highest data values), or 98%, etc., etc.
To change the display scaling factors, the data values must be rescaled and the image redisplayed. On modern machines, this is generally still quite fast. However, there is a faster way to partially get the same result, see below.
Note you can also use a nonlinear scaling to sample a larger (or smaller) range. Example: logarithmic, square root scaling, asinh scaling.
Once an intensity subsection is chosen, it can be displayed with any choice of ``color map'', which specifies the colors to be assigned to each of the display levels. These can be various shades of grey (greyscale) or some other color, or some arbitrary color scheme (pseudo-color). Note that most packages allow the user to manipulate the color table, allowing users to change the contrast and brightness of a displayed subsection; for this reason, it is usually reasonable to chose a range with a significantly larger range than 256 data values.
Most packages will allow the user to inspect individual data values based on a cursor location. Beware, however, of packages which give data readout based on scaling parameters and 8-bit display number only: these are unable to give correct values outside of the scaled region of the image.
The color map is implemented at a lower level and can generally be changed very rapidly. One use of this is to "stretch" or "roll" the color map to change the brightness and/or the contrast in the image.
True color images obviously require information about colors of the objects in the picture, so they cannot be made from an image taken through a single filter. Generally, three independent filters are used to create true color images, e.g. RGB images. The image in each individual filter must be properly scaled if one wants to make the true color image match what would be seen with the eye, i.e. correct white balance.
One can also use images in multiple filters to construct ``pseudo-true'' color images, e.g. emission line regions in one color, continuum in another, etc.
Other useful display tools include zoom, blink, interactive image analysis (peak, valley, fwhm, etc), marking of objects, etc.
FITS format. Two parts in one file: header plus data. Header contains ASCII information, data is in binary format. Beware that headers must conform to specific lengths: don't use an editor on a FITS file! Headers have a small amount of required information, plus there are lots of possibilities for optional information.
These are all installed on the Astronomy cluster; you should be able to install them on your laptop via the links above if you want to.
Of course, any image processing package will generally include a display tool as part of the package, and we will use these extensively. But, in dicussing principles of image display, perhaps it's best to start with standalone display tools. These can be very useful for quick-look analysis.
We will be looking at some images taken at APO with various instruments. Generally, data taken at astronomical observatories are numbered sequentially with some index number that is embedded in the file name. Sometimes, files have "descriptive" names about their contents, other times they may just identify the date of the observations. The standard format for astronomical images is the FITS format, for which the standard file extension is .fits or .fit.
The images we will be looking at can all be found under /home/apo/a535 from machines on the cluster. If you want to transfer them to your laptop, see http://astronomy.nmsu.edu/holtz/a535/data
ds9 /home/apo/a535/spicam/UT061215/SN17135_r.0103.fits or
gaia /home/apo/a535/spicam/UT061215/SN17135_r.0103.fits