nraonrao
 
 NRAO Home > CASA > CasaDocument
image.insert - Function

1.1.1 Insert specified image into this image
Description

This function inserts the specified image (or part of it) into this image. 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.

Arguments





Inputs

infile

Image file name.

allowed:

string

Default:

region

The region of interest of the input image. Default is whole image.

allowed:

any

Default:

record

locate

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

allowed:

doubleArray

Default:

-1

Returns
casaimage

Example

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

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2007 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

Updated daily during alpha development.