XVista manual page

NAME

div - divide image files

SYNOPSIS

div file1 [file2] [const=] [mul=] [dark=] [flat] [box=] [outfile=]

DESCRIPTION

This routine computes the quotient of the data in file1 and (if specified) file2. The full evaluation is

file1 = ((file1 - dark)*mul*flat) / ((file2-dark))

if file1 is divided by another image, or

file1 = ((file1 - dark)*mul) / (const)

if the division is by a constant instead. If not specified, `dark' defaults to zero and `mul' to one. If the keyword flat is specified the quotient is rescaled by the mean of the file2 (which must be computed by a prior mn command). The computed quotient is stored in file1. If the number of pixels per horizontal line is different in the two files a non- fatal error message is issued.

A 32 bit integer buffer is used for each pixel. The divisor specified by const must be an integer, so to divide by a non-integral quantity, one must use both const and MUL, as illustrated below.

The box switch restricts the range of the division to the area of the image(s) inside the specified box.

EXAMPLE

div alphalyr redflat flat

divides the image `alphalyr.fts' by the image `redflat.fts' and multiplies the result by the mean of `redflat'

div alphalyr const=5 mul=2

divides the image `alphalyr' by 2.5 - this is the only way to divide by a non-integral number.

div alflyr const=sky box=1

divides the variable SKY to file alflyr over the range specified in box number 1. It is assumed that the variable SKY was set by a prior sky command.

The data are written into file1 unless overridden by the outfile option.

SEE ALSO

add sub mul mn and XVista.