Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: image.haslock - Function Up: image - Tool Previous: image.getslice - Function


image.hanning - Function



Package general
Module images
Tool image


Convolve one axis of image with a Hanning kernel


Synopsis
hanning(outfile, region, mask, axis, drop, overwrite, async)


Arguments

outfile in Output image file name
    Allowed: String
    Default: unset
region in Region of interest
    Allowed: Region tool
    Default: Whole image
mask in OTF mask
    Allowed: Boolean LEL expression or mask region
    Default: None
axis in Axis to convolve
    Allowed: Positive integer
    Default: Spectral axis if there is one
drop in Drop every other pixel on output ?
    Allowed: Bool
    Default: T
overwrite in Overwrite (unprompted) pre-existing output file ?
    Allowed: T or F
    Default: F
async in Run asynchronously?
    Allowed: Bool
    Default: !dowait


Returns
Image tool or fail



Description

This function performs Hanning convolution ( z[i] = 0.25*y[i - 1] + 0.5*y[i] + 0.25*y[i + 1]) of one axis of an image. The convolution is done in the image domain (i.e., not with an FFT). You can optionally drop every other pixel on output. If you do this, the first output pixel is centred on the second input pixel.

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.

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, sepconvolve and convolve.



Example
- dowait := T
- im := image('x')
- im2 := im.hanning(outfile='x.hann')

This would Hanning smooth the spectral axis of the image associated with the image tool im, if there is one. Every other pixel on the convolution axis is dropped on output, by default.





next up previous contents index
Next: image.haslock - Function Up: image - Tool Previous: image.getslice - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01