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.summary - Function Up: image - Tool Previous: image.twopointcorrelation - Function


image.subimage - Function



Package general
Module images
Tool image


Create a (sub)image from a region of the image


Synopsis
subimage(outfile, region, mask, dropdeg, overwrite, list)


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
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
list in List informative messages to the logger
    Allowed: T or F
    Default: T


Returns
Image tool or fail



Description

This function (short-hand name subim) copies all or part of the image to another (there is also a subimage constructor).

If outfile is given, the subimage is written to the specified disk file. If outfile is unset, the Image tool actually references the input image file (i.e. that associated with the Image tool to which you are applying this function). So if you deleted the input image disk file, it would render this tool useless. When you destroy this tool (with the done function) the reference connection is broken.

Sometimes it is useful to drop axes of length one (degenerate axes). Use the dropdeg argument if you want to do this.

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.



Example
- im := image('myfile')
- im2 := im.subimage()                                        # a complete copy
- r1 := drm.box([10,10],[30,40],[5,5])                        # A strided pixel box region
- im3 := im.subimage(outfile='/tmp/foo', region=r1)           # Explicitly named subimage





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