User Giude
User Guide
2. Displaying catalog images 1. 1. contents 3. 3.
2.1 Graphics file formats
2.2 Image viewers on various computers
2.3 Look-up-table generation for the GIF and JPEG images
2.4 Adjusting your monitor
 
2.1 Graphics file formats

We had to keep two types of users in mind when selecting the appropriate file type to store the images in the catalog. First, we had to store the data in the usual FITS format so that scientists can take full advantage of the pictures. We also had to select a format - for non-professionals - that does not require special software to display and takes considerably less time to download over slow network connections.

Our goal in publishing this catalog is to provide scientific-quality data for astronomers who may find these galaxy images useful for research or teaching purposes. The FITS file format (Flexible Image Transport System) is the de facto standard for image and data interchange among astronomers worldwide. It was designed to make data transport easy from one machine to another. FITS files consist of header keys and binary data. Several data types are supported, 8-, 16-, and 32-bit integer, plus 32- and 64-bit floating point numbers. Our catalog images are stored in 16-bit twos-complement signed binary integer format. Header keys specify the pixel-resolution of the image, the data type, some information about the actual observation, including the date, time, telescope, camera, observer, filter used, integration time, and coordinates of the object. Also recorded are information about the data: the sky level, the sky sigma, minimum and maximum values in the pixels; as well as extra information about the target galaxy, among others: the Hubble type, size, orientation on the sky, and distance. For more details see the section 3 of this User Guide or the AJ paper published about this catalog.

We also think that the galaxy images in this catalog can be interesting for a wider audience. Some people who want to use the data may not have access to image analyzer programs with FITS capabilities. We decided to provide the catalog images in a format that can be readily used on most personal computers: Macintoshes, or IBM PC compatible machines, or any kind of a UNIX system. The two file formats generally supported are GIF and JPEG, one of the two formats being better for one or another application.

Our FITS files contain 16 bits of information per pixel, therefore we can represent 65,536 shades of grey between black and white in these pictures. Although we do not use the total possible range, many images cover more than 10,000 levels of grey. To present the same image in the GIF or JPEG format, we have to transform these images so that they will not use more than 256 levels of grey. This number is the limit for both file formats. JPEG is a "true" color format: the red, green, and blue components take up 8 bits each, providing the 24 bits/pixel color information. However, to make a shade of grey, the brightness in all three channels must be the same. This means that the maximum number of grey levels one can achieve is only 256. GIF is based on indexed color. There is a palette of 256 colors in the file, and one of these colors is assigned to each pixel in the picture. Obviously, even if all the palette colors are shades of grey, the maximum number of greys is 256. See the discussion below on how to reduce the 16 bits/pixel information in the FITS files to 8 bits/pixel for storage in the GIF or JPEG format.

To store and reproduce information in a picture, the GIF file format utilizes a lossless compression algorithm. If we start out with a file that has only 256 colors, GIF can compress and fully restore such a picture. GIF is not intended for color photographs because of the 256-color limitation, and because it cannot compress photographs into a sufficiently small file. GIF is much better with line art, charts, or drawings: 256 colors are usually sufficient, and compression is much better.

JPEG is a lossy compression. The method is designed to compress color photographs (24 bits/pixel) into a small file, and reproduce the image so that the losses are not apparent to the observer. A color photograph can be compressed to a much smaller size with the JPEG algorithm than with GIF, and it is hard to find apparent losses in the restored picture. Some information is available about JPEG image compression - in the form of Frequently Asked Questions - on the Web.

Based on the above discussion it is evident that color-composite images in this catalog should be stored in JPEG format. GIF could not store all the colors nor could it provide a small file for quick downloads. In JPEG, during compression, a quality index can be specified. A low index will result in a very small file, but possibly with apparent losses. A higher index will make a larger file, but image quality will be better. We used index 75 percent to compress our color images since many experts agree that above the 75 percent quality index, improvements in image quality are hardly noticeable.

For our grey-scale pictures the GIF format is actually better than the JPEG format. GIF can represent 256 grey levels, and JPEG can not do better. On the other hand, GIF is lossless, JPEG is lossy. It is true that GIFs of these images will be larger files than JPEGs, so we decided to provide both on the Web. If you want to take a quick look at a grey-scale picture, a JPEG file will download three times faster than a GIF, but if you want to be sure that you got all the information (whatever remained after the FITS file was transformed from 16 bits/pixel to 8 bits/pixel), GIF will serve you this information. On the CD-ROM, where download time is not an issue, GIFs are always the better choice, but JPEGs are still there so that you do not have to convert them if you need to use them in that format.

Typical file sizes in the catalog are as follows: FITS: 200kb to 1Mb, GIF: 30kb to 500kb, JPEG: 10kb to 130kb and color JPEG: 5kb to 100kb. Color JPEGs are smaller files than grey-scale JPEGs since the background sky was set to black in color files (these large black regions compress well), while the sky is a bit noisy (you can see some detail) in the grey-scale images. The 257 FITS files take up about 85Mb; GIFs are about 27Mb, the 257 grey-scale JPEG pictures are 10Mb, and the 113 color-composite JPEGs are 3Mb in total.

 
2.2 Image viewers on various computers

Perhaps you already have an appropriate viewing program installed on your computer that you can use to display the galaxy images on your screen. In case you need them, executable files - and occasionally source code - can be obtained from the locations we list here. You may not find some of the links active after a certain period of time, but you will be able to locate these programs without trouble, using common search engines on the Web.

The FITS Support Office, operated under the guidance of the Astrophysics Data Facility at the NASA Goddard Space Flight Center, provides information on image viewing and manipulation programs. Software has been developed to read and write FITS files in Fortran or C. The FITSIO package contains routines that can be incorporated into software systems, or simple image display programs.

All major astronomical image processing packages support the FITS file format: the Astronomical Image Processing System (AIPS), developed by the National Radio Astronomy Observatory (NRAO); the European Southern Observatory's Munich Image and Data Analysis System (MIDAS), and the Image Reduction and Analysis Facility (IRAF), which is from the National Optical Astronomy Observatories (NOAO).

Software written in IDL, the Interactive Data Language, to read and write FITS files is also available as part of the IDL Astronomy User's Library. Native FITS support is also available in SAOimage, and the new version, SAOtng (SAOimage: The Next Generation), of the Smithsonian Astrophysical Observatory.

There is a stand-alone program to display FITS files, fv. This software is part of the FTOOLS package. XV also supports the FITS format. The Extended Portable Bitmap Toolkit (PBMPLUS) can convert FITS files to many other file formats. Since they were not intended originally for FITS manipulation, both XV and PBMPLUS should be used with some caution. FITS files can store information in the header keys that sophisticated image processing packages use to extract pixel-data and display images with the correct look-up-table to show as much visual detail as possible. We converted FITS files to GIF and JPEG files with a software that reads the header keys. These files are included in this catalog, and these, rather than the FITS originals should be viewed with XV or similar packages to obtain the best result. GIMP has a plug-in to import FITS files.

IMDISP and FITSview run on IBM PC compatible computers. FITSview is also available for Macintosh and UNIX platforms. Macintosh software include MacFITSview and an extension to GraphicConverter, which can be used to convert FITS files to other formats.

Since GIF and JPEG files are much easier to display than FITS files, we have provided them here. Although the above list of programs capable of displaying FITS files is extensive, those programs are mainly for UNIX workstations, which are complicated software systems, and are not usually installed on an IBM PC or a Macintosh. GIF and JPEG viewers, however, are certainly there already.

Free, or shareware GIF and JPEG software for UNIX platforms include Xpaint, Xloadimage, XV, Xli, and ImageMagick. For the PC, try Lview31, PSP (Paint Shop Pro), QPV, ACDSee, LView Pro, or ImageMagick. For Macintosh computers, GIFConverter, GraphicConverter, Image32, and again, ImageMagick are available. We cannot guarantee that we included all possible software, or your personal favorite. Our intention was only to give a starting point.

Both major Web browser software, Netscape and Internet Explorer, support GIF and JPEG natively, and one of these browsers surely is already installed on most computers these days. This gives the easiest opportunity to browse through the GIF and JPEG images in this galaxy catalog.

 
2.3 Look-up-table generation for the GIF and JPEG images

CCD devices record a wide range of brightness levels, usually more than 10,000 shades of grey in our images. CCDs are linear devices, whose resulting picture stores information proportional to the flux of light arriving from a distant object. Computer monitors usually cannot display more than 256 shades of grey, and they are non-linear (the brightness of the pixel on the monitor is not linearly proportional to the brightness stored in our CCD-recorded files). We have to convert images for optimal viewing.

Computer monitors, like televisons, use Cathode Ray Tubes (CRTs), which do not produce light intensities proportional to the input voltage. The brightness of a pixel equals the input voltage raised to a certain power, which we call gamma. CRT gamma is around 2.5, which is due to the physical design of the electron gun. TVs are corrected for gamma before the signal is broadcasted. Some computers, like SGIs, correct for gamma in the monitor hardware. Macintosh gamma is corrected so that gamma is 1.8; the system is still very much non-linear, but matches closely the "gamma" of laser printers. Because of dot-gain, printers have the same artifact: ink spreads on the paper, and the resulting dot is usually larger than intended. The size is a non-linear function of the information sent to the printer. By setting Macintosh gamma to be the same as the printers' gamma, a document displayed on the screen will look very similar when printed.

Many UNIX machines and PC computers do not adjust for gamma at all. Due to the great number of these machines, pictures intended for Web-use are usually corrected for gamma=2.2, this being an "average" gamma considering the uncorrected (gamma=2.5) and slightly corrected Macintosh (gamma=1.8) systems. We adopted the same value when converting our pictures from the 16 bits/pixel FITS format to the 256-shades-of-grey GIF and JPEG formats. Effective gamma in a dimly lit room with an uncorrected CRT is actually closer to 2.2 than to 2.5. On a Macintosh it may be possible to change the system gamma (and we suggest to set it to 2.2 if our pictures appear a bit bright). Adobe Photoshop, for example, comes with a Knoll gamma corrector.

Gamma correction is a simple task: we have to raise all picture intensities to the power of 1/gamma. This will make darker regions of our galaxy images appear relatively brighter, and bright galaxy-centers appear relatively dimmer, which allows the large dynamic range of the galaxy to be presented in a form where all parts of the galaxy are detailed enough even when using only 256 shades of grey. In the process we had to set a lower and an upper threshold in each image. All pixels darker than the lower threshold should be black, and all pixels above the upper threshold should be white. Gamma correction was done between these two cutoffs.

We adjusted the lower cutoff so that the background sky is black, and the upper cutoff so that the brightest parts of the galaxy saturate to white. The lower cutoff was set to the sky level plus 0.2 times the sigma of the sky. Thus the background pixels are black, and only a few are slightly brighter. We chose this cutoff so that all parts of the galaxy are visible. Even the darkest regions close to the edge of galaxies should be brighter than this threshold and are made visible by the gamma correction (and a proper setting of your monitor's black level and picture; see below). The lower cutoff was set to sky plus 0.7 times the sigma of sky in case of the color JPEG images. Color images are for show only, and a slightly higher setting results in a "cleaner" picture (gamma correction can make ugly, colorful, saturated pixels out of the random noise in the sky).

Upper cutoff was set to half the maximum value found in the picture, or to the sky plus 50 times the sigma of the sky, whichever is lower. Almost all images turned out to be converted well by our automatic procedure. Only 17 of them had to be adjusted slightly, interactively. Five (NGC 2541, NGC 4242, NGC 4861, NGC 5204, and NGC 5334) showed too much noise in the background, so we corrected them by increasing the value of the lower cutoff (to sky plus 0.7-0.9 times sigma). Twelve (NGC 2903, NGC 3031, NGC 3368, NGC 3486, NGC 4258, NGC 4593, NGC 4826, NGC 5033, NGC 5055, NGC 5377, NGC 5701, and NGC 6384) were dark at the outskirts, so we lowered the lower cutoff, even at the expense of making the sky a bit noisy to make all the faint parts of the galaxies visible (the lower cutoff was usually set to sky minus 0.5 times sigma).

 
2.4 Adjusting your monitor

To take full advantage of the total dynamic range stored in our picture files you must maximize the contrast ratio of your monitor. You should try to make black as dark as possible, and white as bright as possible. Obviously, black pixels cannot be presented any darker than the darkness of the picture tube when the monitor is turned off. Still, ambient light in the room and strong reflections can contribute to making the picture tube look considerably brighter than it should be. Try to minimize reflections: look at the monitor screen when turned off; look for any strong reflections and try to correct the problem. Re-orient your monitor if necessary. It is best to have windows to the left or right, but not directly behind you. Facing the window is not good either; this provides a very bright surround.

The next step is to adjust the black level (sometimes called brightness) of your monitor. Turn down the "contrast" as much as possible, display a completely black picture on the screen (save this image and display it on the full screen with some external program, like XV under UNIX), and adjust the black level, so that the picture is really as black as possible. However, do not set it any darker than necessary. If black pixels show up brighter than the lowest possible brightness on you monitor, you immediately lose contrast. If you set it very low, not only blacks, but low grey levels will show up as black, too.

After setting the blacks as black as possible by correcting reflection problems and adjusting the black level, the next step is to adjust the picture (sometimes called contrast) of your monitor so that white pixels show up as white as possible. Try to display a white picture on your screen and start to increase picture until you stop noticing any further increase in brightness. Do not turn the knob to any higher value! This would wash out bright grey levels, increase the sense of flicker, and be plain uncomfortable.

For further details on monitor adjustment, including surround, LCDs, proper viewing distance, color convergence, etc, see the Web review by Charles Poynton. IBM has a nice page about healthy computing, too.

1. 1. contents 3. 3.

Copyright © 1999 by Princeton University Press.
Created by Zsolt Frei and James E. Gunn. Email remarks to frei@astro.princeton.edu
This page was last updated on June 16, 1999.