next up previous 530
Next: SHADOW - Enhances edges in a two-dimensional NDF using a shadow effect
Up: Specifications of KAPPA applications
Previous: SETUNITS - Sets a new units value for an NDF data structure


SETVAR - Sets new values for the VARIANCE component of an NDF data structure

Description:
This routine sets new values for the VARIANCE  component of an NDF  data structure. The new values can be copied from a specified component of a second NDF or can be generated from the supplied NDF's data array by means of a Fortran-like arithmetic expression. Any previous variance information is over-written with the new values. Alternatively, if a `null' value (!) is given for the variance, then any pre-existing variance information is erased.

Usage:
setvar ndf variance

Parameters:
COMP = LITERAL (Read)
The name of an NDF array component within the NDF specified by Parameter FROM. The values in this array component are used as the new variance values to be stored in the VARIANCE component of the NDF specified by Parameter NDF. The supplied value must be one of "Data" or "Variance". ["Data"]
FROM = NDF (Read)
An NDF data structure containing the values to be used as the new variance values. The NDF component from which to read the new variance values is specified by Parameter COMP. If NDF is not contained completely within FROM, then the VARIANCE component of NDF will be padded with bad values. If a null (!) value is supplied, the new variance values are determined by the expression given for Parameter VARIANCE. [!]
NDF = NDF (Read and Write)
The NDF data structure whose variance values are to be modified.
VARIANCE = LITERAL (Read)
A Fortran-like arithmetic expression giving the variance value to be assigned to each pixel in terms of the variable DATA, which represents the value of the corresponding data array pixel. For example, VARIANCE="DATA" implies normal $ \surd N$ error estimates, whereas VARIANCE="DATA + 50.7" might be used if a sky background of 50.7 units had previously been subtracted.

If a `null' value (!) is given for this parameter, then no new VARIANCE component will be created and any pre-existing variance values will be erased.


Examples:
setvar ngc4709 data
This sets the VARIANCE component within the NDF structure ngc4709 to equal its corresponding data-array component.
setvar ndf=arcspec "data - 0.31"
This sets the VARIANCE component within the NDF structure arcspec to be its corresponding data-array component less a constant 0.31.
setvar cube4 Variance=!
This erases the values of the VARIANCE component within the NDF structure cube4, if it exists.

Notes:
  • All of the standard Fortran 77 intrinsic functions are available for use in the variance expression, plus a few others (see SUN/61 for details and an up-to-date list).

  • Calculations are performed using real arithmetic (or double precision if appropriate) and are constrained to be non-negative.

  • The data type of the VARIANCE component is set to match that of the DATA component.


Related Applications :
KAPPA: ERRCLIP; FIGARO: GOODVAR.



next up previous 530
Next: SHADOW - Enhances edges in a two-dimensional NDF using a shadow effect
Up: Specifications of KAPPA applications
Previous: SETUNITS - Sets a new units value for an NDF data structure

KAPPA --- Kernel Application Package
Starlink User Note 95
Malcolm J. Currie & David S. Berry
2013 February 14
E-mail:starlink@jiscmail.ac.uk

Copyright © 2013 Science and Technology Facilities Council