STScI Logo

flatfield stsdas.hst_calib.fos.y_calib


NAME · USAGE · DESCRIPTION · PARAMETERS · EXAMPLES · BUGS · REFERENCES
HELP · SEE_ALSO_

NAME

flatfield -- Compute the flat field response.

USAGE

flatfield input mask1 mask2 flatfield ffmask fit

DESCRIPTION

The flat field response is computed from an input continuum spectrum by optionally fitting a least squares cubic spline through the data and then dividing the fit into the raw data to give the photocathode granularity. Two optional data masks can be supplied for the input data. The first gives locations of bad data points where no flat field response can be computed; these locations include bad detector elements and spectral features. The second mask can be used to identify photocathode blemishes that are to be excluded when performing the least squares spline fit. Masked points are, however, used in the division to compute the output flat field response vector.

The task allows for interactive examination of the spline fit, with the option of adding or deleting nodes and refitting. Available cursor commands are:


   a - add a node
   d - delete a node
   e - evaluate the spline at current nodes
   : - issue an IRAF command
   ? - print list of cursor commands

At task start-up, the spline nodes may be specified either as a set of n equally spaced nodes using the parameter nodes, or by reading the node positions and values from a text table named via the parameter nodefile.

PARAMETERS

input [file name]
Name of the input continuum spectral data file. This file may be in units of either counts or count rates. If necessary, a paired-pulse correction should be performed before running this task.
mask[file name]
Optional mask file specifying bad data points to exclude when performing the spline fit and computing the flat field response.
mask[file name]
Optional mask file specifying photocathode blemishes to exclude when fitting the smooth spline curve.
flatfield = "flatfield" [file name]
Name for the output file containing the flat field response vector for use by the Routine Science Data Processing (RSDP) system.
ffmask = "ffmask" [file name]
Name for the output mask file corresponding to flatfield. Pixels where no response could be computed, as specified by mask1 or minval, are flagged. This mask file can be used to average multiple flat field data sets for the same observation mode.
fit = "fit" [file name]
Name for the output file that will contain the smooth fit through the input data. This file can be used to evaluate the fit, and if necessary, to adjust the number of nodes.
(minval = 0.0) [real, min=0.0, max=INDEF]
Threshold value specifying the minimum input value to be used in computing a flat field response. This parameter can be used to exclude data having a counting statistical error greater than the photocathode granularity. Output flat field values are set to 1.0 and are flagged in the ffmask mask file if the input value is less than minval. Values less then minval are used in the least squares spline fit.
(index= 1) [integer]
Specifies the first data point that is to be processed. This parameter can be used to limit the area in the input data that is used in computing the flat field response. Values at positions less than index1 are not used in the spline fit, and their output flat field value is set to 1.0.
(index= 2500) [integer]
Specifies the last data point to process. Values at positions greater than index2 are not used in the spline fit, and their output flat field value is set to 1.0.
(dofit = yes) [boolean]
Perform spline fit to the input data?
(nodes = 15) [integer, min=2, max=30]
Number of equally spaced nodes to be used in performing the least squares spline fit.
(nodefile = "") [file name]
Name of text table containing node positions and values.
(niter = 10) [integer, min=1]
Maximum number of iterations of the least squares fit that are to be performed.
(template = "fos$templates/yfftemplate.r1h" [file name]
Name of the input template file used for constructing the output flat field response file.
(useafter = "") [string]
Value of the "useafter" keyword date to be stored in the flatfield file.
(device = "stdgraph") [string]
Plotting device name.
(cursor = "") [graphics cursor]
Graphics cursor input. When null the standard cursor is used, otherwise the specified file is used.

EXAMPLES

1. Compute the flat field response for an input file called ffin. The file mask1 provides locations of bad pixel values and mask2 provides locations of photocathode blemishes. The flat field value is set to 1.0 when the input count is less than 20,000.


   fo> flatfield ffin mask1 mask2 minval=20000

2. Recompute the flat field using 12 nodes.

   fo> flatfield ffin mask1 mask2 minval=20000 nodes=12

BUGS

REFERENCES

Howard Bushouse, STSDAS

HELP

For assistance using this or any other tasks, please contact help@stsci.edu or call the help desk at 410-338-1082.

SEE ALSO


Source Code · Search Form · STSDAS