Table of Contents

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.

Functions   
treatargs
  treatargs 
treatargs ()

Treat command line arguments. The main program.

Classes   
AverageBounds

Scale between 0.9 and 1.25 times the data average.

BinLarge

An ImageFilter that bins large images down.

BoundedScale

Map scale of data between two bounds

LinearScale

Linear scale

LogScale

Logarithmic scale

MedianBounds

Scale between 20-80 percent of the pixel values.

PgmSink

Write incoming images to a PGM style graphic file

Scale

Parent class for all Mapping types


Table of Contents

This document was automatically generated on Fri Jul 3 09:28:36 2009 by HappyDoc version WORKING