Squashes or stretches an NDF
!
)
value is supplied for AXIS, a squash or stretch factor must be supplied for each axis
in the manner indicated by the MODE parameter. If a non-null value is supplied for
AXIS, it should be the integer index of the axis to be squashed or stretched (the first
axis has index 1). In this case, only a single squash or stretch factor should be
supplied, and all other axes will be left unchanged. If MODE is set to PixelScale"
,
then the supplied value should be the index of a WCS axis. Otherwise it should be the
index of a pixel axis. [!]
"Centre"
–- The WCS co-ordinates at the centre of the output NDF are the same as those
at the centre of the input NDF.
"Origin"
–- The WCS co-ordinates at the pixel origin of the output NDF are the same as
those at the pixel origin of the input NDF.
["Centre"]
TRUE
, then the output pixel values
will be scaled in such a way as to preserve the total data value in a feature on the
sky. The scaling factor is the ratio of the output pixel size to the input pixel size.
This ratio is evaluated once for each panel of a piece-wise linear approximation
to the Mapping, and is assumed to be constant for all output pixels in the
panel. [FALSE]
"Factors"
. It defines the factor by which each dimension will be distorted to
produce the output NDF. A factor greater than one is a stretch and less than one
is a squash. If no value has been supplied for Parameter AXIS, the number of
values supplied for FACTORS must be the same as the number of pixel axes in the
NDF. If a non-null value has been supplied for Parameter AXIS, then only a
single value should be supplied for FACTORS and that value will be used to
distort the axis indicated by Parameter AXIS. "Bounds"
. It specifies the lower pixel-index values of the output
NDF. If no value has been supplied for Parameter AXIS, the number of values
supplied for LBOUND must be the same as the number of pixel axes in the NDF.
If a non-null value has been supplied for Parameter AXIS, then only a single
value should be supplied for LBOUND and the supplied value will be used as
the new lower bounds on the axis indicated by Parameter AXIS. If null (!
) is
given, the lower pixel bounds of the input NDF will be used. "Auto"
–- Equivalent to "BlockAve"
with an appropriate PARAMS for squashes by a factor
of 2 or more, otherwise equivalent to "Linear"
.
"Nearest"
–- Nearest-neighbour sampling.
"Linear"
–- Linear interpolation.
"Sinc"
–- Sum of surrounding pixels weighted using a one-dimensional
$\mathrm{\text{sinc}}\left(\pi x\right)$
kernel.
"SincSinc"
–- Sum of surrounding pixels weighted using a one-dimensional
$\mathrm{\text{sinc}}\left(\pi x\right)\mathrm{\text{sinc}}\left(k\pi x\right)$
kernel.
"SincCos"
–- Sum of surrounding pixels weighted using a one-dimensional
$\mathrm{\text{sinc}}\left(\pi x\right)cos\left(k\pi x\right)$
kernel.
"SincGauss"
–- Sum of surrounding pixels weighted using a one-dimensional
$\mathrm{\text{sinc}}\left(\pi x\right){e}^{-k{x}^{2}}$
kernel.
"BlockAve"
–- Block averaging over surrounding pixels.
In the above, $\mathrm{\text{sinc}}\left(z\right)=sin\left(z\right)/z$.
Some of these schemes will require additional parameters to be supplied via the PARAMS
parameter. A more-detailed discussion of these schemes is given in the "Sub-Pixel
Interpolation Schemes"
section below. ["Auto"]
"Factors"
–- the FACTORS parameter will be used to determine the factor by which each
dimension should be multiplied.
"Bounds"
–- the LBOUND and UBOUND parameters will be used to get the lower and upper
pixel bounds of the output NDF.
"PixelScale"
–- the PIXSCALE parameter will be used to obtain the new pixel scale to
use for each WCS axis.
["Factors"]
"PixelScale"
. It should be supplied as a
comma-separated list of the required new pixel scales. In this context, a pixel scale
for a WCS axis is the increment in WCS axis value caused by a movement of one
pixel along the WCS axis, and are measured at the first pixel in the array.
Pixel scales for celestial axes should be given in arcseconds. An asterisk,
"$\ast $"
,
can be used instead of a numerical value to indicate that an axis should retain its
current scale. The suggested default values are the current pixel scales. If no value
has been supplied for Parameter AXIS, the number of values supplied for PIXSCALE must
be the same as the number of WCS axes in the NDF. If a non-null value has been supplied
for Parameter AXIS, then only a single value should be supplied for PIXSCALE and that
value will be used as the new pixel scale on the WCS axis indicated by Parameter AXIS.
!
) value causes the input
title to be used. [!]
"Bounds"
. The upper pixel index values of the output NDF. If no
value has been supplied for Parameter AXIS, the number of values supplied for
UBOUND must be the same as the number of pixel axes in the NDF. If a non-null
value has been supplied for Parameter AXIS, then only a single value should be
supplied for UBOUND and the supplied value will be used as the new upper bounds on
the axis indicated by Parameter AXIS. If null (!
) is given, the upper pixel
bounds of the input NDF will be used. "Auto"
) this
is done using linear interpolation, unless it is a squash of a factor of two
or more, in which case a block-averaging scheme which averages over 1/FACTOR
pixels. For many purposes this default scheme will be adequate, but for greater
control over the resampling process the METHOD and PARAMS parameters can be used.
Detailed discussion of the use of these parameters can be found in the “Sub-pixel
Interpolation Schemes” section of the AST_RESAMPLE documentation. By default,
all interpolation schemes preserve flux density rather than total flux, but
this may be changed using the CONSERVE parameter. The LABEL, UNITS, and HISTORY components, and all extensions are propagated. TITLE is controlled by the TITLE parameter. DATA, VARIANCE, AXIS and WCS are propagated after appropriate modification. The QUALITY component is also propagated if nearest-neighbour interpolation is being used.
Processing of bad pixels and automatic quality masking are supported.
All non-complex numeric data types can be handled.
There can be an arbitrary number of NDF dimensions.