|
|||
NRAO Home > CASA > CASA Cookbook and User Reference Manual |
|
1.4.5.2 The default Command
Each task has a special set of default parameters defined for its parameters. You can use the default command to reset the parameters for a specified task (or the current task as defined by the taskname variable) to their default.
Important Note: The default command resets the values of the task parameters to a set of “defaults” as specified in the task code. Some defaults are blank strings ’’ or empty lists [], others are specific numerical values, strings, or lists. It is important to understand that just setting a string parameter to an empty string ’’ is not setting it to its default! Some parameters do not have a blank as an allowed value. See the help for a particular task to find out its default. If ’’ is the default or an allowed value, it will say so explicitly.
For example, suppose we have been running CASA on a particular dataset, e.g.
---------> inp(’clean’)
# clean :: Deconvolve an image with selected algorithm
vis = ’ngc5921.demo.src.split.ms.contsub’ # name of input visibility file
imagename = ’ngc5921.demo.cleanimg’ # Pre-name of output images
field = ’0’ # Field Name
spw = ’’ # Spectral windows:channels: ’’ is all
selectdata = False # Other data selection parameters
mode = ’channel’ # Type of selection (mfs, channel, velocity, frequency)
nchan = 46 # Number of channels (planes) in output image
start = 5 # first input channel to use
width = 1 # Number of input channels to average
interpolation = ’nearest’ # Spectral interpolation (nearest, linear, cubic)
niter = 6000 # Maximum number of iterations
...
and now we wish to switch to a different one. We can reset the parameter values using default:
---------> default()
CASA <42>: inp
---------> inp()
# clean :: Deconvolve an image with selected algorithm
vis = ’’ # name of input visibility file
imagename = ’’ # Pre-name of output images
field = ’’ # Field Name
spw = ’’ # Spectral windows:channels: ’’ is all
selectdata = False # Other data selection parameters
mode = ’mfs’ # Type of selection (mfs, channel, velocity, frequency)
niter = 500 # Maximum number of iterations
...
It is good practice to use default before running a task if you are unsure what state the CASA global variables are in.
ALERT: You currently can only reset ALL of the parameters for a given task to their defaults. In an upcoming update we will allow the default command to take a second argument with a specific parameter to default its value.
More information about CASA may be found at the
CASA web page
Copyright © 2010 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