Not only can you specify sections in terms of pixel indices but also in terms of more-tangible co-ordinates such as right ascension and declination, wavelength, frequency, and time. Section locations in such world co-ordinate systems (WCS) are indicated by non-integer values; whereas integer values in an NDF section are intepreted as pixel indices. Here an integer value is defined as one neither containing a decimal point nor an exponent. The WCS bounds of each section are converted to the nearest pixel indices in order to specify the included data elements.
Since there may be many co-ordinate systems that could represent your desired section, some rules are necessary to decide how to interpret the section limits. First, to retain backwards compatibility (with pre-V1.8 KAPPA), if your NDF has AXIS components then non-integer values will refer to axis co-ordinates (see ``Co-ordinate Frames, Axes and Domains'' for a description). Otherwise the values are specified within the co-ordinate system represented by the current Frame in the NDF's FrameSet . Command NDFTRACE will show whether or not an NDF has AXIS components, and if so, it reports their extents, labels, and units. NDFTRACE also summarises the properties of the current WCS Frame (or optionally all the WCS Frames present), if the NDF has a WCS component. You can change the current Frame with WCSFRAME.
World co-ordinates:
The standard formats used to specify WCS co-ordinates apply.See AST_UNFORMAT
sections ``Frame Input Format'' and``SkyFrame Input Format''
for details and examples.
Here are some examples of WCS co-ordinates defining NDF sections.
spectrum(9000:2E4)
This could specify a region of a spectrum between 9000 and 20000 Ångstrom.
image(12h59m49s4.5m,27.5d:28d29.8m)
This could refer to a region approximately one degree on each side
centred the Coma Cluster. The section is 4.5 minutes of time along
the right-ascension axis centred at
, and
extends from
to
in declination.
ifu(1h34m10.1s:1h34m12.4s,-2d35m:-2d35.5m,6563)
This might specify a region of sky 2.3 seconds of time by 0.5 arcminutes
in
light from an integral-field unit.
It is possible to use a colon to separate the fields in sexagesimal celestial and time co-ordinates, as in the following example that defines the equivalent section as the preceding Coma Cluster example.
image(12:57:34;13:02:04,27:30:00;28:29:48)
There is a cost; you must use a semicolon to demarcate lower and upper bounds. This is to enable differentiation of the two uses of the colon.
Using the colon as co-ordinate field separator can leave some degree of ambiguity. For instance, a subscript expression of ``12:34'' could mean ``use pixel indices 12 to 34'', or could mean ``use the single declination value 12:34''. It is also harder to read, is an extra rule to remember, and could be error prone. For these reasons, the strong recommendation is to use the dms and hms notation for celestial and time co-ordinates.
Even given no sky co-ordinate range as in this example,
cube(12:34:56.7,-41:52:09,-100.0;250.0)
do not mix colons for the two uses in the same expression. Hence
there is a semicolon to define the range in the third co-ordinate.
The semicolon expression delimiter works with all classes of
co-ordinate system. This example might extract a spectrum from a cube
at the right ascension
declination
between
and 250 km s
velocity.
You should also be aware that the non-integer co-ordinates within an NDF section apply to WCS axes, in contrast to integer bounds that define pixel indices along pixel axes. These are not necessarily the same. For example, the WCS axes may be rotated or permuted. If the WCS axes are rotated, the NDF section actually used will be a box just large enough to hold the requested range of WCS-axis values. Be careful.
Axis co-ordinates:
For axis co-ordinates double-precision arithmetic is used to process the
section values, but either double- or single-precision notation may be used
when supplying them. Both linear and non-linear axis
co-ordinates are supported, the values supplied being automatically
converted into the corresponding pixel indices before use. For
instance,
spectrum(6500.0:7250.0)
could be used to select the appropriate region of a spectrum calibrated in Ångstroms, while
spectrum(6000.0500.0)
would select a region of the spectrum approximately from 5750 to 6250.0 Ångstroms (the exact extent depending the values of the axis co-ordinates), and
spectrum(5500.021)
would select a 21-pixel-wide region of the spectrum centred on 5500 Ångstroms.
KAPPA --- Kernel Application Package