|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
image.shape - Function
1.1.1 Length of each axis in the image
Description
The shape of an image is a vector holding the length of each axis of the image.
Although this information is also available in the summary function, it is so
useful that it can be obtained directly. Both Float and Complex valued images
are supported.
Arguments
intArray
Example
"""
#
print "\t----\t shape Ex 1 \t----"
ia.fromshape(shape=[10,20,30])
imshape = ia.shape()
print imshape
#[10L, 20L, 30L]
# npixels = imshape[0]*imshape[1]*...*imshape[n-1]
npixels=1
for i in range(len(imshape)):
npixels=npixels*imshape[i]
ia.close()
#
"""
__________________________________________________________________
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