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.regrid - Function Up: image - Tool Previous: image.putregion - Function


image.rebin - Function



Package general
Module images
Tool image


rebin the image by the specified factors


Synopsis
rebin(outfile, bin, region, mask, dropdeg, overwrite, async)


Arguments

outfile in Output image file name
    Allowed: String
    Default: unset
bin in Binning factors for each axis
    Allowed: Vector of integers
region in The region of interest
    Allowed: Region tool
    Default: Whole image
mask in OTF mask
    Allowed: Boolean LEL expression or mask region
    Default: None
dropdeg in Drop degenerate axes
    Allowed: T or F
    Default: F
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 rebins the current image by the specified integer binning factors for each axis. The output pixel value is just the average of the input pixel values. The output pixel will be masked bad if there were no good input pixels. You cannot rebin a Stokes axis.

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.

Sometimes it is useful to drop axes of length one (degenerate axes). Use the dropdeg argument if you want to do this. It will discard the axes from the input image. Therefore the output shape and Coordinate System that you supply must be consistent with the input image after the degenerate axes are dropped.



Example
- im := imagemaketestimage();
- im2 := im.rebin(bin=[2,3]);





next up previous contents index
Next: image.regrid - Function Up: image - Tool Previous: image.putregion - 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