Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | image |
outfile | in | Output image file name | |
Allowed: | String | ||
Default: | unset | ||
axes | in | Axes to convolve | |
Allowed: | Vector of integers | ||
Default: | [1,2,...] | ||
types | in | Type of convolution kernel | |
Allowed: | Vector of strings from `boxcar', `gaussian', and `hanning' | ||
Default: | 'gaussian' | ||
widths | in | Convolution kernel widths | |
Allowed: | Vector of numeric, quantity or string | ||
scale | in | Scale factor | |
Allowed: | Float | ||
Default: | Autoscale | ||
region | in | Region of interest | |
Allowed: | Region tool | ||
Default: | Whole image | ||
mask | in | OTF mask | |
Allowed: | Boolean LEL expression or mask region | ||
Default: | None | ||
overwrite | in | Overwrite (unprompted) pre-existing output file ? | |
Allowed: | T or F | ||
Default: | F | ||
async | in | Run asynchronously? | |
Allowed: | Bool | ||
Default: | !dowait |
This function (short-hand name sc) does Fourier-based convolution of an image file by a specified separable kernel.
If outfile is given, the image is written to the specified disk file. If outfile is unset, the Image tool is associated with a temporary image. This temporary image may be in memory or on disk, depending on its size. When you destroy the Image tool (with the done function) this temporary image is deleted.
You specify which axes of the image you wish to convolve, by what kernel of what width. The kernel types can be shortened to `gauss', `hann' and `box'.
You specify the widths of the convolution kernels via the argument widths. The values can be specified as a vector of three different types.
The interpretation of widths depends upon the kernel type.
The scaling of the output image is determined by the argument scale. If you leave it unset, then autoscaling will be invoked which means that the convolution kernels will all be normalized to have unit volume to as to conserve flux.
If you do not leave scale unset, then the convolution kernel will be scaled by this value (it has peak unity before application of this scale factor).
Masked pixels will be assigned the value 0.0 before convolution. The output mask is the combination (logical OR) of the default input pixel mask (if any) and the OTF mask. Any other input pixel masks will not be copied. Use function maskhandler if you need to copy other masks too.
See also the other convolution functions convolve2d, convolve and hanning.
- dowait := T - im := image('xyv') - im2 := im.sepconvolve(outfile='xyv.con', axes=[2,3], types="gauss box", widths=[10,20])