[fitsbits] Processor cache friendly processing of RGB FITS image.

Lucio Chiappetti lucio at lambrate.inaf.it
Thu Feb 13 10:09:45 EST 2020


On Thu, 13 Feb 2020, David C. Partridge via fitsbits wrote:

> If I want to access the RGB tuple for location 1,1, there's a problem...

As I just subscribed you to the mailing list, I suspect you are a 
software analyst and not an astronomer ...

... it is unclear to me whether you want to read existing images from an 
astronomical archive or create them yourself. In the first case I suspect 
a misunderstanding ...

... there is strictly no such thing as an "RGB FITS image". FITS does not 
store the image "to be looked at" on the screen. An image (a plain 2-d 
image) is a matrix of arbitrary "scientifically relevant" content.

Usually the x-y axes in the image map to some sky-coordinates (look for 
"WCS") but they could be anything (say, hydrogen column density NH and 
photon spectral index \Gamma). Similarly the z content of each pixel 
(assuming z(x,y)) is usually (for a sky image) some form of intensity but 
this can be any quantity like a magnitude, a flux, a number of photons, an 
ADC readout ... or even, who knows, chi-square as function of NH and 
\Gamma).

These z-values can therefore be integer or floating point values according 
to the BITPIX value, in an arbitrary intensity range according to the 
type.

In order to display them it is a matter of the user to decide the ITT 
(Intensity Transfer Table, say a lin scale, a log scale, an histogram 
equalized scale, which converts them e.g. to a 0-255 scale) and the LUT 
(colour LookUp Table, which converts 0-255 to RGB).

If you visualize an arbitrary image with a viewer like SAO ds9 
http://ds9.si.edu/site/Home.html you will see that the value you get 
mousing over a pixel is the actual content of the FITS file while ... 
what you have on the screen is what you asked for.

There could be conventional ways by which one takes three images in three 
different wavelength bands, and tries to display all them together "in 
false colours" (mapping separately the arbitrary intensity in each band to 
conventional R, G, B), but they are just display artifacts at the 
preference of the user.


-- 
Lucio Chiappetti - INAF/IASF - via Corti 12 - I-20133 Milano (Italy)
For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html



More information about the fitsbits mailing list