Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://xmm.vilspa.esa.es/sas/6.5.0/doc/colimplot/node9.html
Дата изменения: Tue Aug 16 04:42:09 2005 Дата индексирования: Sat Dec 22 10:10:13 2007 Кодировка: Поисковые слова: active galaxy |
Since XMM images are typically several hundred pixels on a side, there can be tens of thousands of separate colours on the image. Unfortunately the pgplot library allocates only 8 bits to colour names and hence is limited to 256 colours. If pgplot output is desired, a way must therefore be found to bin up the thousands of colours into at most 256. To see how this is done, it helps to visualise the colours as points inside a cube with edges 1 unit in length. Each pixel is associated with a different point in the cube. The task of allocating these colours is equivalent to constructing 256 boxes inside the cube, each box to contain a subset of the thousands of colour points. Clearly it is inefficient to have boxes that either overlap or that are much larger than the spread of the points they contain. The boxes are assigned within the task using an algorithm called a kd-tree. At present the boxes are allocated so that they all tend to be of equal size, but it may make more sense to allocate them so that they all tend to contain equal numbers of points. This may be explored in a future version of colimplot.
There is one parameter that affects this process, namely rgbsysstyle. If this is set to `polar', the cartesian RGB triplets are transformed to cylindrical polar coordinates, the value representing net flux or brightness, the radius
representing colour saturation and the angle
being proportional to the hue. Use of this basis for binning up the colours helps to prevent jitter in the average hue of the boxes with increase in brightness over the final image, since the pixels that correspond to a single source, for instance, tend to be aligned closely in their values of
and
. It may be of use to investigate other transforms which help to maximize the fineness of separation of colours in the middle range of brightness values.