[fitsbits] Re: Reading floating point FITS files

LC's No-Spam Newsreading account nospam at ifctr.mi.cnr.it
Wed Nov 12 03:19:08 EST 2003


On 10 Nov 2003, John Green wrote:

> Hello all, I am a software developer and I was assigned the task of
> importing FITS files. Among the files that I have got are 32, 64
> floating point files. I don't know how to extract the R,G,B values
> from the flaoting point data.

I assume you refer to FITS images and not to other kind of FITS data
(tabular). The "I" in FITS originally meant "Image" but nowadays it
means just "Interchange" !

> I don't know how is the RGB values stored in the 32, 64 floating point
> data types of FITS files.

There is no such thing as "RGB values". The content of the image is some
arbitrary physical quantity (could be number of photons, flux, magnitude
[which in itself is proportional to log flux] or anything else).

The way it is usually displayed is first to apply some physical
transformation (e.g. applying low and high cut, then transforming the
values using a linear, log or other scale as some form of histogram
equalization into an array of integer values from 0 to n, say n=255).

Then apply a lookup table which makes a correspondence between the index
n and a triplet of RGB. But this purely for display. All the physics and
the capabilities of the observer are in the image content and in the
physical transformation !

There are many popular families of lookup tables. One could have a pure
grayscale ( R=G=B=n), other monochrome grayscales (e.g. R=0 G=n B-0), or
other conventional scales like a "heat" scale, a "rainbow" scale etc.
Each package has its own set of scales.

-- 
----------------------------------------------------------------------
nospam at ifctr.mi.cnr.it is a newsreading account used by more persons to
avoid unwanted spam. Any mail returning to this address will be rejected.
Users can disclose their e-mail address in the article if they wish so.




More information about the fitsbits mailing list