Colorspec -- Generate Photorealistic Color Spectra from Digital Data




These programs were developed to produce realistic color spectra from digital data. The RGB color map is created from an analytical approximation to the visual response of the eye. The expressions used here were derived from synoptic eye response curves, and adjusted empirically to produce a spectrum on a CRT monitor that subjectively matched a grating spectrum of an incandescent lamp.

Colorspec takes as input a digital spectrum ASCII file, space delimited in two columns with wavelength from low to high in Angstroms and relative flux in any units. It produces by default an 800x50 PPM format 24-bit RGB image which can be displayed by most image viewers, and modified as needed or converted to other formats with image processing programs such as Gimp. A simple change of parameters in the source code would enable it to create spectra of any size.

Solar is a companion program that reads a line list from the Moore Tables of the Rowland Atlas of the Sun and creates a spectrum based on the wavelength and equivalent width of the tabulated features. It is useful for creating illustrations of spectra that have selected lines.

The distribution contains the original source code for Colorspec and Solar in C, a version of Solar written in Fortran, the NSO solar flux atlas in a format suitable for use with Colorspec, the Moore Tables, and a few sample spectra.






Last update: August 23, 2004
kielkopf at louisville dot edu