Capturing Return Values

From CASA Guides
Revision as of 13:30, 6 June 2010 by Lchomiuk (talk | contribs) (Created page with 'Some tasks return information to the interface. For example, the imstat task returns a Python dictionary with the image statistics in it. To catch these return statistics, yo…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Some tasks return information to the interface. For example, the imstat task returns a Python dictionary with the image statistics in it. To catch these return statistics, you must assign a variable to the task call. For example:

xstat=imstat('ngc5921.clean.image')

To see what is in the dictionary, type the variable name (in this case, xstat) at the command line.