Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.astro.louisville.edu/software/archive/colorspec/colorspec-1.0/README
Дата изменения: Tue Aug 24 00:39:11 2004
Дата индексирования: Thu Feb 27 20:50:30 2014
Кодировка:

Поисковые слова: astro-ph
Programs to generate color spectra
==================================

These programs were developed to produce realistic color spectra from
digital data. The RGB color map (see wl2rgb for an example) is
an analytical approximation to the visual response of the eye.
The expressions used in the wl2rgb code 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.

The distribution here contains the original source code for colorspec and solar
in C, and a version of solar written in Fortran. To generate binaries

cd src
make
make install

and the executable versions will be placed in bin. Copy these to a location
in your search path such as /usr/local/bin in most Linux distributions.

Sample spectra created with colorspec and solar are in the examples
directory. Most of these are in the original ppm format, but a few are also in
tif. See NOTES for more information. The directories solar and procyon
contain original data and README files with credits.

If you have spectral data in ascii format in a file such as star.dat, then to
create a color spectrum the command is

colorspec star.dat star.ppm

Note that colorspec requires two-column space delimited data with wavelength in
Angstroms and flux in arbitrary units. Data outside the visible spectrum will
be ignored. It is best to convert to jpg format using Gimp or another image
processing program that will apply a smoothing algorithm, and use little if any
compression. Otherwise, artifacts will appear that detract from the visual
quality of the original.



colorspec.c and colorspecpan.c
------------------------------

These take as input a digital spectrum ascii file, space delimited in
two columns: wavelength, relative flux. The program expects wavelengths in
increasing order, and positive flux. It will produce a color spectrum of any
digital spectrum. Modify the parameters NW and NH to change the width
and height. The 800x50 image solarflux.ppm was generated by colorspec
and the file fluxatlas.dat, a reformatted NSO Solar Flux Atlas
in the data directory. A similar 2560x50 image solarfluxpan.ppm
has higher resolution and is effective for large screen panoramic display.


solar.c
-------

Takes as input the Rowland line list from Moore's tables and produces
a ppm uncompressed image. The program expects wavelength in Angstroms
and equivalent width in milliAngstroms between 3800 and 7800 A. Parameters
in the source code define the output image size, which is by default
800 pixels wide and 50 pixels high.

The data files include the Moore tables (originally from NOAO), and
subsets of selected elements. Both the subset tables and the original list
suffer from multiple entries which result from overlapping identifications
in the original print tables. These could be removed by clever programming,
or by hand, but they do not interfer with the visual power of the
images. An added benefit is that the NA D-lines are stronger than in the
real spectrum, which helps for classroom use.

The resulting 800x50 ppm images are in the ppm directory, and the corresponding
tif images are in the tif directory. Other image formats may be
generated by running Gimp, using ImageMagick's convert, or a commercial program
such as Photoshop. To make images in other sizes, change the default
NW and NH parameters in the source code, compile, and run with an appropriate
database. Sampling issues will make images that are rescaled from these
less satisfactory. If you prefer a jpeg format, try using no compression
(the encoding will still save a great deal of space) and using some smoothing
to minimize the noise of the algorithm.


The most recent versions of these programs are available at

http://www.astro.louisville.edu


John Kielkopf (kielkopf@louisville.edu)
August 22, 2004