Next: SETNORM - Sets a new value for one or all of an NDF's axis-normalisation flags
Up: Specifications of KAPPA applications
Previous: SETLABEL - Sets a new label for an NDF data structure
SETMAGIC
- Replaces all occurrences of a given value in an NDF array with
the bad value
- Description:
- This task flags all pixels that have a defined value in an
NDF with the standard bad (`magic')
value. Other values are
unchanged. The number of replacements is reported. SETMAGIC's
applications include the import of data from software that has a
different magic value.
- Usage:
-
setmagic in out repval [comp]
-
- Parameters:
-
COMP = LITERAL (Read)
-
The components whose values are to be flagged as bad. It
may be "Data", "Variance", "Error", or "All".
The last of the options forces substitution of bad pixels in both
the data and variance arrays. This parameter is ignored if the
data array is the only array component within the NDF.
["Data"]
-
IN = NDF (Read)
-
Input NDF structure containing the data and/or variance array
to have some of its elements flagged with the magic-value.
-
OUT = NDF (Write)
-
Output NDF structure containing the data and/or variance array
that is a copy of the input array, but with bad values flagging
the replacement value.
-
REPVAL = _DOUBLE (Read)
-
The element value to be substituted with the bad value. The
same value is replaced in both the data and variance arrays
when COMP="All". It must lie within the minimum and maximum
values of the data type of the array with higher precision.
The replacement value is converted to data type of the array
being converted before the search begins. The suggested
default is the current value.
-
TITLE = LITERAL (Read)
-
Title for the output NDF structure. A null value (!)
propagates the title from the input NDF to the output NDF. [!]
- Examples:
- setmagic irasmap aitoff repval=-2000000
- This copies the NDF called irasmap to the NDF aitoff, except
that any pixels with the IPAC blank value of
2000000 are
flagged with the standard bad value in aitoff.
- setmagic saturn saturnb 9999.0 comp=All
- This copies the NDF called saturn to the NDF saturnb, except
that any elements in the data and variance arrays that have
value 9999.0 are flagged with the standard bad value.
- Notes:
- The comparison for floating-point values tests that the
difference between the replacement value and the element value is
less than their mean times the precision of the data type.
-
Related Applications
:
- KAPPA: CHPIX,
FILLBAD,
GLITCH,
NOMAGIC,
SEGMENT,
SUBSTITUTE,
ZAPLIN;
FIGARO: GOODVAR.
- Implementation Status:
-
Next: SETNORM - Sets a new value for one or all of an NDF's axis-normalisation flags
Up: Specifications of KAPPA applications
Previous: SETLABEL - Sets a new label 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