next up previous 79
Next: Cube manipulation
Up: Specdre
Previous: Graphics


Slicing data sets

Specdre uses the NDF routines to access data in Starlink Data Files (SDF). This allows the user to specify sections of NDFs rather than whole (i.e. base) NDFs. Some applications need one-dimensional input data, but by themselves offer no means to take a subset of a larger or multi-dimensional data set. The desired effect can, however, be achieved by NDF. As an example, fitgauss will fit a spectrum only and rejects two-dimensional input. You still can use a 2-D data set by specifying a section thereof as input to fitgauss:

   ICL> fitgauss in=myndf(,5)               { 5-th row of 2-D input
   ICL> fitgauss in=myndf(5,)               { 5-th column
   ICL> fitgauss in=myndf(20:30,5)          { pixels 20 to 30 of 5-th row
   ICL> fitgauss in=myndf(6540.0:,5)        { pixels beyond coordinate 6540.0
   ICL> fitgauss in=myndf(6450.0~10.0,5)    { coordinate range 6540.0 +- 5.0

(For fitgauss the sub-setting within the row is not necessary, because it does its own masking of the given 1-D data.)

It should be mentioned here that the NDF fed into an application need not be at the top level of its container file. Once your NDF got a Specdre Extension with fit results in it, you can e.g. plot the second fit parameter versus the row number:

   ICL> specplot in=myndf.more.specdre.results(2,1,)



next up previous 79
Next: Cube manipulation
Up: Specdre
Previous: Graphics

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:starlink@jiscmail.ac.uk

Copyright © 2013 Science and Technology Facilities Council