SUN/261.3

Starlink Project
Starlink User Note 261.3

D.S. Berry & Malcolm J. Currie

7th October July 2019

Copyright © 2009 Science and Technology Facilities Council.


IRQ — Handling of QUALITY in NDFs

Version 5.0

User’s Guide



Abstract

This library is a set of Fortran routines for manipulation of quality information within NDFs. In particular it uses names that will be more memorable than bits to assign and set quality attributes of data values within an NDF.

Contents

1 Introduction to QUALITY
2 Introduction to the facilities provided by the IRQ library
3 A Set of Four Typical IRQ Applications
 3.1 SETQUAL
 3.2 REMQUAL
 3.3 SHOWQUAL
 3.4 QUALTOBAD
4 Quality Names
5 Quality Expressions
6 Using IRQ routines
 6.1 Constants and Error Values
 6.2 Initialising an NDF for use with IRQ
 6.3 Using previously initialised NDFs within IRQ
 6.4 Accessing the quality names information stored in an NDF
 6.5 Assigning and removing qualities to and from NDF pixels
 6.6 Finding NDF pixels which satisfy a quality expression
7 Compiling and Linking with IRQ
 7.1 Standalone Applications
 7.2 ADAM Applications
A Routine Descriptions
B Classified List
 B.1 Gaining Access to Quality Name Information Within an NDF
 B.2 Storing, Retrieving and Deleting Quality Names
 B.3 Handling Quality Expressions
 B.4 Assigning Qualities to Selected Pixels
 B.5 Enquiring Pixel Quality
C Full Routine Specifications
IRQ_ADDQN – Define a new quality name
IRQ_ANNUL – Release an IRQ identifier
IRQ_CHKQN – Check a specified quality name to see if it is defined
IRQ_CLOSE – Close down the IRQ identifier system
IRQ_CNTQ – Count the number of pixels which are set in each bit-plane of the QUALITY component
IRQ_CNTQ8 – Count the number of pixels which are set in each bit-plane of the QUALITY component
IRQ_COMP – Compile a quality expression
IRQ_DELET – Delete all quality-name information from an NDF
IRQ_FIND – Find quality name information within an NDF
IRQ_FXBIT – Assign a fixed bit number to a quality name
IRQ_GETQN – Search for a specified quality name
IRQ_GETQX – Get a quality expression from the user and check for syntax errors
IRQ_NEW – Create a new structure to hold quality name information within an NDF extension
IRQ_NUMQN – Return number of defined quality names
IRQ_NXTQN – Return the next quality name
IRQ_RBIT – Reserve a bit number for a given quality name
IRQ_REMQN – Remove the definition of a specified quality name
IRQ_RESQ – Remove a given quality from all pixels in the NDF
IRQ_RESQL – Remove a quality from a list of pixels, leaving unlisted pixels unchanged
IRQ_RESQL8 – Remove a quality from a list of pixels, leaving unlisted pixels unchanged
IRQ_RESQM – Remove a quality from pixels selected using a mask image, leaving unselected pixels unchanged
IRQ_RESQM8 – Remove a quality from pixels selected using a mask image, leaving unselected pixels unchanged
IRQ_RLSE – Release a temporary structure created by IRQ_NEW or IRQ_FIND
IRQ_RWQN – Get and/or set the read-only flag for a quality name
IRQ_SBADx – Set pixels ‘bad which satisfy a given quality expression
IRQ_SBADx – Set pixels ‘bad which satisfy a given quality expression
IRQ_SETQ – Assign a given quality to all pixels in the NDF
IRQ_SETQL – Assign a given quality to a list of pixels, leaving unlisted pixels unchanged
IRQ_SETQL8 – Assign a given quality to a list of pixels, leaving unlisted pixels unchanged
IRQ_SETQM – Assign a quality to pixels selected using a mask image, leaving unselected pixels unchanged
IRQ_SETQM8 – Assign a quality to pixels selected using a mask image, leaving unselected pixels unchanged
IRQ_SYNTX – Check the syntax of a quality expression

D HDS Data Structures
 D.1 Quality names information stored in an NDF
 D.2 Temporary structures used to hold compiled quality expressions
E Examples of Using IRQ
 E.1 Adding a new quality name
 E.2 Finding pixels which satisfy a quality expression
F Packages Called by IRQ
G IRQ Error Codes
H Changes Introduced in Version 3.0 of this Document
I Changes Introduced in Version 4.0 of this Document
J Changes Introduced in Version 5.0 of this Document