next up previous 530
Next: Quality Names
Up: Using Quality Names
Previous: Using Quality Names

Introduction

As described in ``Masking, Bad Values, and Quality'', an NDF may optionally contain a component called QUALITY. If this component exists, it will be an array with the same bounds as the main DATA array. Each element in the QUALITY array can be used to store several flags that are associated with the corresponding element in the DATA array. These flags may be used to indicate that the DATA value holds some specified property. For instance, one of the flags may be used to indicate if the corresponding DATA values are saturated, another may be used to indicate if the DATA value lies within a background area, and so on.

You are free to use the flags in whatever way seems most suited to the particular process being performed. You can set (or reset) any of the flags within any sub-region of the NDF using application SETQUAL. Each of the flags is referred to by a Quality Name specified by the user. Names that reflect the nature of the quality should be used, e.g. the quality name SATURATED could be used to flag saturated data values. These quality names get stored within the NDF and can be used to refer to the quality flag when running later applications. The terminology adopted here is that an element of the DATA array `holds' the quality SATURATED (for instance) if the flag that is associated with the quality name SATURATED is set for the corresponding element within the QUALITY array.

The number of quality names that can be stored within an NDF is limited, and therefore it may become necessary to remove quality names that are no longer needed to make room for new ones. The applications SHOWQUAL and REMQUAL allow you to do this. SHOWQUAL displays a list of the quality names currently defined within an NDF, and REMQUAL removes specified quality names from an NDF.

Some applications have a Parameter QEXP, which may be used to specify that the application is only to use data values that hold a specified selection of qualities. As an example, when running QUALTOBAD you could (for instance) specify a value of BACKGROUND for the QEXP parameter. This means that only those data values for which the flag associated with the quality name BACKGROUND is set, are to be set bad. The quality name BACKGROUND must previously have been defined and assigned to the appropriate data values using application SETQUAL.

The specification of the data values to be used by an application can be more complex than this, and can depend on several qualities combined together using `Boolean' operators. For instance, assigning the value .NOT. (SOURCE_A .OR. SOURCE_B) would cause the application to use only those data values that hold neither of the qualities SOURCE_A and/or SOURCE_B. These sort of strings are known as quality expressions.


next up previous 530
Next: Quality Names
Up: Using Quality Names
Previous: Using Quality Names

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