|NRAO Home > CASA > CASA Toolkit Reference Manual||
image.summary - Function
1.1.1 Summarize basic information about the image
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
- radio: 1 - F
- optical: -1 + 1∕F
- true: (1 - F2)∕(1 + F2)
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:
- Dimension of the image.
- Length of each axis in the image.
- Shape of the chunk which is most efficient for I/O.
- Name of each axis.
- Reference pixel for each axis (0-relative)
- Reference value for each axis.
- Increment for each axis.
- Unit name for each axis.
- Brightness units for the pixels.
- True if the image has a mask.
- The name of the mask which is applied by default.
- The names of all the masks stored in this image.
- The restoring beam(s) if present.
- 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.
If there is a spectral axis, list velocity too, with this doppler definition
List the summary to the logger
List axis descriptors in pixel or world axis order
Give a full listing of beams or just a short summary? Only used when the image has multiple beams.
print "\t----\t summary Ex 1 \t----"
ia.summary() # summarize to logging only
s = ia.summary(list=F) # store header in record
if s[’header’][’ndim’] == 2: # program using header values
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