| Module: kcd2pgm | filetype/kcd2pgm.py | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Reduce dynamic range of image files for visualisation.The dynamic range of a diffraction file is normally around 16 bits. The human eye can only see about 6 bits of dynamic range, and a computer screen can only display about 8 bits. For proper visualization we therefore need tricks to "compress" the dynamic range. We can do 2 kinds of compression: - We can clip the top and bottom ranges of the intensities because none, or very few pixels have these extreme value. - We can make a non-linear mapping (e.g. a logarithmic scale) Both these operations are implemented in this module. It is used by the "ndisp" program for image display, but can also be used (following the name of the module) as a standalone program to convert image files to PGM-type graphics files.
|