next up previous 78
Next: Standard Figaro directories
Up: Error propagation
Previous: My data are full of cosmic rays how do I get rid of them?

Zero Variances

Some Figaro routines use the variance arrays to weight the data values during fitting. When a zero variance is found (e.g. because `bclean', `sclean' and/or `cset' were used), the data will not be given infinite weight! Instead, some routines (such as `polysky') will set the weight of such a point to be zero. Some routines (e.g. `ff') may revert to using uniform weighting in this situation.

To be absolutely sure that the variances are used to weight a fit, one might wish to set zero variances to some high value. (The reason that a large value is not set by default is to prevent numerical overflows in later stages of the reduction process). The way this is achieved is using the KAPPA routines `setmagic' and `nomagic':

   % setmagic comp=v in=file1 out=file2 repval=0

This replaces any zeros in the file called `file1.sdf' with a `bad' value and writes the output to `file2.sdf'.

   % nomagic comp=v in=file2 out=file3 repval=1.0e+20

replaces the `bad' values with a high value (1.0e+20).

Now the fitting routine may be run, giving a very low weight to the previously bad pixels. Finally,

   % thresh comp=v in=file3 out=outfile thrlo=0 thrhi=0.99e+20 newlo=0 newhi=0

replaces the high values with a zero value. Any remaining stages of data reduction can now be carried out without the worry of encountering numerical overflow from the variances. Note that any variances which were bad for any reason other than being set as bad by the user will also be returned to zero.



next up previous 78
Next: Standard Figaro directories
Up: Error propagation
Previous: My data are full of cosmic rays how do I get rid of them?

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