next up previous 405
Next: Testing for bad pixels
Up: Obtaining dataset attributes
Previous: Available attributes


Does the dataset have variance/quality/axis/history information?

Suppose you have an application which demands that variance information be present, say for optimal extraction of spectra, you could test for the existence of a variance array in your FITS file called dataset.fit like this.

     #  Enable automatic conversion
     convert         # Needs to be invoked only once per process
     
     set file = dataset.fit
     ndftrace $file > /dev/null
     set varpres = `parget variance ndftrace`
     if ( $varpres == "FALSE" ) then
        echo "File $file does not contain variance information"
     else
        <process the dataset>
     endif
The logical results parameters have values TRUE or FALSE. You merely substitute another component such as quality or axis in the parget command to test for the presence of these components.



next up previous 405
Next: Testing for bad pixels
Up: Obtaining dataset attributes
Previous: Available attributes

C-shell Cookbook
Starlink Cookbook 4
Malcolm J. Currie
2006 November 26
E-mail:ussc@star.rl.ac.uk

Copyright © 2009 Science and Technology Facilities Council