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

1.1.1 Summarize basic information about the image


Description

This function summarizes miscellaneous information such as shape, Coordinate System, restoring beams, and masks.

If called without any arguments, this function displays a summary of the image header to the logger; where appropriate, values will be formatted nicely (e.g. HH:MM:SS.SS for the reference value of RA axes).

For spectral axes, the information is listed as a velocity as well as a frequency. The argument doppler allows you to specify what velocity doppler convention it is listed in. You can choose from radio, optical and true. Alternative names are z for optical, and beta or relativistic for true. The default is radio. The definitions are

where F = ν∕ν0 and ν0 is the rest frequency. If the rest frequency has not been set in your image, you can set it via a Coordsys tool with the function setrestfrequency.

If the output of summary is saved to a variable, then the header field (for instance, mysummary[’header’]) has the following fields filled in:

ndim
Dimension of the image.
shape
Length of each axis in the image.
tileshape
Shape of the chunk which is most efficient for I/O.
axisnames
Name of each axis.
refpix
Reference pixel for each axis (0-relative)
refval
Reference value for each axis.
incr
Increment for each axis.
axisunits
Unit name for each axis.
unit
Brightness units for the pixels.
hasmask
True if the image has a mask.
defaultmask
The name of the mask which is applied by default.
masks
The names of all the masks stored in this image.
restoringbeam
The restoring beam(s) if present.
imagetype
The image type.

For an image with multiple beams, the restoringbeam field is a dictionary of dictionaries with keys of names ”*” followed by the channel number, if the image has a spectral coordinate, or the polarization number if it does not. That is, the keys have names ”*0”, ”*1”, ”*2”, etc. If the image has both a spectral and a polarization coordinate, each of these dictionaries is a dictionary with keys of the same form which range from 0 to the number of polarizations minus 1; ”*0”, ”*1”, ... The dictionaries pointed to by the channel and/or polarization number contain information for the beam at that position.

If you set list=F, then the summary will not be written to the logger. The return value of the function, in the header field is a vector string containing the formatted output that would normally have gone to the logger.

If verbose is True and the image contains multiple beams, the formatted output, whether it is written to the logger or placed in the output record, will have information on every beam in the dataset. If verbose=False and the image has multiple beams, only a summary of beams for each polarization is listed. In this case, the beams with the maximum area, the minimum area, and the median area for each polarization are listed. However, all the beams can still be found in the restoringbeam field of the returned dictionary. If the image does not have multiple beams, verbose is not used.

Arguments





Inputs

doppler

If there is a spectral axis, list velocity too, with this doppler definition

allowed:

string

Default:

RADIO

list

List the summary to the logger

allowed:

bool

Default:

true

pixelorder

List axis descriptors in pixel or world axis order

allowed:

bool

Default:

true

verbose

Give a full listing of beams or just a short summary? Only used when the image has multiple beams.

allowed:

bool

Default:

false

Returns
record

Example

 
 
"""  
#  
print "\t----\t summary Ex 1 \t----"  
ia.maketestimage(’myim1’, overwrite=true)  
ia.summary()                 # summarize to logging only  
s = ia.summary(list=False)       # store header in record  
if s[’header’][’ndim’] == 2: # program using header values  
  print s[’header’][’axisnames’]  
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