next up previous 530
Next: Changing Dimensionality
Up: NDF Sections
Previous: Using World or Axis Co-ordinates to Specify Sections


Specifying Fractional Extents

A further form for the subscript expression involves specifying a fractional position along each dimension as a percentage, as follows

name( p%$ \sim$q%, r%:s%, ... )

where `p%$ \sim$q%' specifies the centre and extent as percentages, and `r%:s%' specifies a percentage range. Thus,

image(25%:75%,50%:$ \sim$50%)

would refer to the central quarter of the image. Both sections are equivalent. The percentages are converted to the nearest pixel centre to decide the centre and extents of the sections.

The rules concerning omitted values before or after the delimiting $ \sim$ apply. Thus,

image(40%$ \sim$, $ \sim$50%)

could be used to refer to a full-width, half-height section centred at the (40%, 50%) fractional position.

A percentage value is not limited to the range 0-100%. In such circumstances the areas beyond the bounds of the NDF are set to bad. For example,

image($ \sim$110%, -5%:105%)

would give an enclosing border of bad pixels, extending 5% of the original dimensions. Both sections are equivalent.


next up previous 530
Next: Changing Dimensionality
Up: NDF Sections
Previous: Using World or Axis Co-ordinates to Specify Sections

KAPPA --- Kernel Application Package
Starlink User Note 95
Malcolm J. Currie & David S. Berry
2010 February 26
E-mail:ussc@star.rl.ac.uk

Copyright © 2010 Science and Technology Facilities Council