next up previous 78
Next: Getting error information into a file
Up: Error propagation
Previous: Error propagation

How is the error information stored?

For NDF format files, the default is to store the error information as an array of variance values (i.e., the uncertainties squared). If error information in your data is not stored as variances, some routines will not propagate the errors properly (this will be true of the old Figaro DST format which uses uncertainties).

Note that in Figaro the variance array must not contain bad values. `goodvar' can be used to clean up an offending data set.

To check that a variance structure exists use the command `hdstrace'. If your data already contains a variance array, the output from `hdstrace' will look something like this:

   NDF  <NDF>

      DATA_ARRAY     <ARRAY>         {structure}
         DATA(1021,200)  <_REAL>        204.8,180.48,225.28,230.4,245.76,
                                        ... 586.24,587.52,753.92,710.4,684.8
         ORIGIN(2)      <_INTEGER>      1,1

      TITLE          <_CHAR*11>      'PG 1157 +00'
      UNITS          <_CHAR*9>       'ELECTRONS'
      VARIANCE       <ARRAY>         {structure}
         DATA(1021,200)  <_REAL>        642.6113,618.2913,663.0913,668.2113,
                                        ... 1025.331,1191.731,1148.211,1122.611
         ORIGIN(2)      <_INTEGER>      1,1

      MORE           <EXT>           {structure}
         FITS(174)      <_CHAR*80>      'SIMPLE  =                    T','BI...'
                                        ... '15TELE  =       ...','PACKEND','END'
         CCDPACK        <CCDPACK_EXT>   {structure}
            DEBIAS         <_CHAR*24>      'Tue Apr 29 21:11:48 1997'

   End of Trace.

This trace indicates that there is a 1021x200 element object labelled `VARIANCE'.

If the output for one of your files does not contain the VARIANCE line, your file contains no usable error information.

Only some Figaro applications propagate error values. The full list of Figaro routines which propagate the variances is:

   ABCONV     ADJOIN     BBODY      BCLEAN     BSMULT      CSET
   COMBINE    ERRCON     EXTRACT    FF         FIGSFLUX    FSCRUNCH
   FWCONV     GAUSS      GROWX      GROWY      IADD        IALOG
   ICADD      ICDIV      ICMULT     ICSUB      IDIV        ILOG
   IMULT      IPOWER     IREVX      IREVY      IRFLAT      IRFLUX
   IROT90     ISEDIT     ISHIFT     ISUB       ISUBSET     ISXADD
   ISXDIV     ISXMULT    IXSMOOTH   ISXSUB     ISYADD      ISYDIV
   ISYMULT    ISYSUB     OPTEXTRACT POLYSKY    PROFILE     REMBAD
   SFIT       YSTRACT

Note that if you use an application which does not propagate the variances, you will see the following message:

   Warning: The data in the reference SPECT have been re-shaped but the variance
   array was never updated. It will now be deleted.

What this means is that since the variance array is now no longer correct, it has been deleted to prevent its use. Running `hdstrace' on the new file shows that the variance structure is gone. The obvious lesson from this is to stick to those Figaro routines which keep the variance structure intact wherever possible. Alternatively, Starlink packages such as KAPPA offer other error-propagating tasks.



next up previous 78
Next: Getting error information into a file
Up: Error propagation
Previous: Error propagation

FIGARO A general data reduction system
Starlink User Note 86
Keith Shortridge, Horst Meyerdierks,
Malcolm Currie, Martin Clayton, Jon Lockley,
Anne Charles, Clive Davenhall,
Mark Taylor, Tim Ash, Tim Wilkins, Dave Axon,
John Palmer, Anthony Holloway and
Vito Graffagnino
2004 February 17
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council