Документ взят из кэша поисковой машины. Адрес оригинального документа : http://xmm.vilspa.esa.es/sas/8.0.0/doc/colimplot/node8.html
Дата изменения: Wed Jul 2 06:05:52 2008
Дата индексирования: Fri Sep 5 20:52:54 2008
Кодировка:
Flux scaling XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


colimplot (colimplot-3.13.2) [xmmsas_20080701_1801-8.0.0]

Forcing to `thermal' colours Colour manipulations Distribution of colours Home Index

Meta Index / Home Page / Description / Colour manipulations

Flux scaling

This is achieved via the parameters gainstyle, usergain, pixelfraction, tofluxfraction and nhotpixels. If gainstyle=`user', the gain is entered directly. A gain value of 1 will leave the image in the default situation in which the pixel with the largest net flux is saturated, ie has an RGB with at least one of its three values equal to 1.0. However it is often the case that the brightest few pixels in an image are contributed by a single strong source, or even that they are `hot' pixels of the ccd, and that most of the sources of interest are considerably fainter. In this case it is desirable to multiply all the pixel values by a gain value $>1$ in order to increase the brightness.

The algorithm which is employed to apply the gain is more complicated than just a simple multiplication by a scalar gain value. It is necessary to ensure that all RGB values remain less than or equal to 1. A hyperbolic transform


\begin{displaymath}
f_{\rm new} = \frac{g \ f_{\rm old}}{1 + f_{\rm old}(g - 1)},
\end{displaymath} (1)

where $f = I/I_{\rm max}$ is flux fraction and $g$ is the gain, is used to accomplish this. The effect of this for small flux values is to approximately multiply them by $g$, but $f_{\rm old}$ values just below 1 never become larger than 1 for any positive gain value. The colour saturation of each pixel decreases smoothly with increase in gain, but the hue is maintained at a constant value.

Since images can vary widely in the difference between their brightest pixel and the brightness of the features of interest, it can be difficult to choose a correct value for the gain without several time-consuming trials. The task contains two mechanisms that help make choosing the gain easier. Firstly, the user can set the expected number of `hot' pixels via the parameter nhotpixels. Say this value is set to $N$. The image is then pre-scaled so that the saturation level is no longer set to the flux of the brightest pixel, but the $N$th brightest. An under-estimate of nhotpixels can result in an image which is mostly way too dim, but a mild overestimate is fairly innocuous.

The second feature is complete automatic scaling, actuated by setting gainstyle to `auto'. In this setting the task attempts to calculate the best gain value itself. At present this is computed depending upon the distribution of pixels as a function of flux, and is designed to scale the image so that the background is just visible. The user can exert some control over this via the parameters pixelfraction and tofluxfraction. This is done as follows. In the case that gainstyle=`auto', colimplot does two things: first, it creates (internally) a histogram of numbers of image pixels against net flux; using the histogram, it then estimates a value of net flux, call it $I(p)$, such that pixelfraction pixels fall below this value. The value of gain is then chosen so that $I(p)$ becomes equal to tofluxfraction of the saturated level of net flux. From equation 1, this is given by


\begin{displaymath}
g = \frac{f_{\rm tff} \ (1 - f(p))}{f(p) \ (1 - f_{\rm tff})}
\end{displaymath}

where $f_{\rm tff}$ = tofluxfraction and $f(p) = I(p) / I_{\rm max}$. For example, suppose that pixelfraction=0.5 and tofluxfraction=0.4. Further suppose that, after constructing the histogram, colimplot estimates that the flux fraction $f(0.5)$ in the unscaled image is 0.25. In other words, the dimmest 50% of pixels are found to have net flux values of less than 0.25 of the maximum net flux value. The necessary gain is then


\begin{displaymath}
g = \frac{0.4 \ (1 - 0.25)}{0.25 \ (1 - 0.4)}
\end{displaymath}

ie, equal to 2.0.


Forcing to `thermal' colours Colour manipulations Distribution of colours Home Index

XMM-Newton SOC/SSC -- 2008-07-02