STScI Logo

selftest imred.dtoi


NAME · USAGE · PARAMETERS · DESCRIPTION · EXAMPLES

NAME

selftest -- test routine to verify dtoi transformation

USAGE

selftest nbits

PARAMETERS

nbits = 12
Dymanic range of data to test.
device = "stdgraph"
Plotting device for graphical output.
verbose = no
A table of density, intensity values is printed if verbose = yes.
ceiling = 30000.
Maximum intensity to output.
max_raw = 0
The maximum raw data value. Needed only if nbits equals something other than 12, 15 or 0.
scale = 0.0
The raw data value to density scale value. Needed only if nbits equals something other than 12, 15, or 0.

DESCRIPTION

Task selftest is a test program for the dtoi package. Its output can be examined to see if numerical errors are introduced during the density to intensity transformation. It also evaluates truncation errors produced when an output image with integer pixels is written.

Many different PDS setups can be investigated with task selftest . Setting parameter nbits = 12 indicates PDS format data, with data range 0 to 3071. Setting nbits = 15 indicates FITS format data, with data range 0 to 24575. The special value of nbits = 0 means a small test data range from 1 to 144 is investigated. If any other value of nbits is entered, the user is queried for the max raw data values and the raw data to density scaling factor.

An intensity vector is generated from a density vector in two different ways. The first method uses the density vector and known coefficients to compute the intensity. The second method uses the curfit package to generate a look up table of intensities as done in task HDTOI . The residual of the two intensity vectors is plotted. Ideally, the difference between the known intensities and calculated intensities is zero.

The second plot output by selftest shows intensity as a function of density. Two lines are overplotted; integer intensity versus density and real intensity versus density. Because truncation errors are most pronounced at low density values, the plot covers only the lowest 5% of the density range. The user should investigate the plot with the cursor zoom and expand capabilities to determine if truncation errors are significant.

In verbose mode, selftest produced a three column table of raw data value, density and calculated intensity.

EXAMPLES

Run task selftest for 12 bit data with plots appearing on the terminal.

	cl> selftest

Run selftest in verbose mode, spooling the output to file ditable. This file is then run through the fields task to extract the density and intensity columns which are piped to plot. The results in a plot of the look up table.

	cl> selftest ver+ > ditable
	cl> fields ditable 2,3 | graph xlab=Density ylab=Intensity

Source Code · Search Form · STSDAS