Next: Specdre Extension v.0.7
Up: The Specdre Extension
Previous: Design
Using the Specdre Extension
The demonstration script (demo_specdre) shows the use of the
Specdre Extension. There is a tool
editext to look at or manipulate the
Extension. resamp will usually store some limited amount of
information about the interdependence of post-resample pixels in the
Extension. If you try to fitgauss such re-sampled data, that
application will pick up and use the information in the Extension.
fitgauss
or
fitpoly
will store their fit results in the Extension. In conjunction with
the
NDF sections
you can work your way through the rows of a CCD long-slit spectrum,
store each row's fit in the Extension and fill the result storage
space. The collection of all fits is again an NDF (located in the
Extension) and can be fed into other applications like specplot, ascout, or indeed KAPPA's
display.
The Extension also provides a place to store a full-size array for
the wavelength or frequency etc. of each pixel. This array of
spectroscopic values may be created by grow, and is used by arcdisp to apply individual dispersion curves for the rows of an image.
The image may be a long-slit spectrum, or the rows may be extracted
fibre spectra or échelle orders.
There is some potential for confusion here. You may tend to count
pixels in your data starting at 1, you may use NDF pixel indices, NDF
pixel coordinates, a vector of pixel centre values, or an
N-dimensional array of spectroscopic values.
- Pixel indices along an axis in an NDF are counted from the
lower bound to the upper bound. The lower bound is also
known as the origin. It is not necessarily 1. Say, if an NDF
has bounds 1 ... N, a section of it may have bounds 5 ... (N-6), or
-5 ... (N+6) etc. If the section is made permanent in a new file, it
will still have origin other than 1. Usually it is these pixel
numbers - or the section bounds - that are used to specify NDF
sections in parameter values like ndf(-25:32,4:).
- The centres of pixels in an NDF have pixel coordinates that
are the pixel number minus 0.5. So if the bounds are 5 ... 95 then
the pixels have centre coordinates 4.5 ... 94.5. The beauty of
these coordinates is that, if you give each pixel an extent of
0.5 on either side, then the sequence of pixels 1 .... N cover the
coordinate range [0;N]. These are only default coordinates, but
they are worth mentioning because they are similar, but not equal, to
the pixel indices.
- Each axis of the NDF may have an explicit vector with the
coordinates of the pixel centres. These can run non-linear,
backwards, or in loops. You may find that some software cannot cope
with the weirder of these options. These centres can be used
to specify NDF sections. You simply give a floating point bound
instead of an integer bound. Note that this works only because each
axis has a vector of pixel centres as long as the NDF axis, not
an N-dimensional array of pixel centres.
- For Specdre it is useful to have in addition an
N-dimensional array where for example a wavelength calibration can be
stored for each row of an image or a cube individually. For this
purpose there may exist an array of spectroscopic values in the
Specdre Extension to the main NDF. That array is an NDF with the
same bounds as the main NDF. Where the main NDF stores the count
rate, brightness etc. of a pixel, the spectroscopic values' NDF
stores the wavelength, frequency, radial velocity etc. for that
pixel. This information is recognised only by Specdre. You cannot
expect Kappa's linplot to use it for axis labelling, Specdre's
specplot does use it of course. You also cannot use this array
to specify an NDF section in a parameter value.
- There is no rule as to what happens to the centres of the
spectroscopic axis when N-D spectroscopic values are created or
modified. Both arrays may lead rather independent lives.
Next: Specdre Extension v.0.7
Up: The Specdre Extension
Previous: Design
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