NRAO Home > CASA > CASA Toolkit Reference Manual
image.insert - Function

1.1.1 Insert specified image into this image


Description

This function inserts the specified image (or part of it) into the image referenced by this tool. The specified image may be given via argument infile as a disk file name (it may be in native CASA, FITS, or Miriad format; Look ?? for more information on foreign images).

If the locate vector is not given, then the images are aligned (to an integer pixel shift) by their reference pixels.

If locate vector is given, then those values that are given, give the absolute pixel in the output (this) image of the bottom left corner of the input (sub)image. For those values that are not given, the input image is symmetrically placed in the output image.

The image referenced by this tool is modified in place; no new image is created. The method returns True if successful.

Arguments





Inputs

infile

Name of image to be inserted.

allowed:

string

Default:

region

Region selection. Default is to use the full image.

allowed:

any

Default:

variant

locate

Location of input image in output image. Default is centrally located.

allowed:

doubleArray

Default:

-1

verbose

Emit informational messages to logger?

allowed:

bool

Default:

false

Returns
bool

Example

 
 
"""  
#  
print "\t----\t insert Ex 1 \t----"  
ia.maketestimage(’myfile.insert’,overwrite=true)  
ia.close()  
ia.fromshape(shape=[200,200])  
ia.insert(infile=’myfile.insert’)       # Align by reference pixel  
ia.newimagefromfile(’myfile.insert’)  
ia.insert(infile=im2.name(), locate=[]) # Align centrally  
# This time align axis 0 as given and axis 1 centrally  
ia.insert(infile=’myfile.insert’, locate=[20])  
ia.close()                                    # close default tool and  
"""  
 

__________________________________________________________________


More information about CASA may be found at the CASA web page

Copyright © 2016 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search