|
|||
NRAO Home > CASA > CASA Cookbook and User Reference Manual |
|
1.4.5.4 The inp Command
You can set the values for the parameters for tasks (but currently not for tools) by performing the assignment within the CASA shell and then inspecting them using the inp command. This command can be invoked in any of three ways: via function call inp(’<taskname>’) or inp(<taskname>), without parentheses inp ’<taskname>’ or inp <taskname>, or using the current taskname variable setting with inp. For example,
...
CASA <2>: inp ’clean’
----------> inp(’clean’)
...
CASA <3>: inp(clean)
...
CASA <4>: inp clean
----------> inp(clean)
...
CASA <5>: taskname = ’clean’
CASA <6>: inp
----------> inp()
all do the same thing.
When you invoke the task inputs via inp, you see a list of the parameters, their current values, and a short description of what that parameters does. For example, starting from the default values,
# 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
gain = 0.1 # Loop gain for cleaning
threshold = ’0.0mJy’ # Flux level to stop cleaning. Must include units
psfmode = ’clark’ # method of PSF calculation to use during minor cycles
imagermode = ’’ # Use csclean or mosaic. If ’’, use psfmode
multiscale = [] # multi-scale deconvolution scales (pixels)
interactive = False # use interactive clean (with GUI viewer)
mask = [] # cleanbox(es), mask image(s), and/or region(s)
imsize = [256, 256] # x and y image size in pixels
cell = [’1.0arcsec’, ’1.0arcsec’] # x and y cell size. default unit arcsec
phasecenter = ’’ # Image phase center: position or field index
restfreq = ’’ # rest frequency to assign to image (see help)
stokes = ’I’ # Stokes params to image (eg I,IV, QU,IQUV)
weighting = ’natural’ # Weighting of uv (natural, uniform, briggs, ...)
uvtaper = False # Apply additional uv tapering of visibilities.
modelimage = ’’ # Name of model image(s) to initialize cleaning
restoringbeam = [’’] # Output Gaussian restoring beam for CLEAN image
pbcor = False # Output primary beam-corrected image
minpb = 0.1 # Minimum PB level to use
async = False # If true the taskname must be started using clean(...)
Figure 1.1 shows how this will look to you on your terminal. Note that some parameters are in boldface with a gray background. This means that some values for this parameter will cause it to expand, revealing new sub-parameters to be set.
_________________________________________________________________________________________
CASA uses color and font to indicate different properties of parameters and their values:
Parameter and Values in CASA inp
Text Font | Text Color | Highlight | Indentation | Meaning | |
Parameters: | |||||
plain | black | none | none | standard parameter | |
bold | black | grey | none | expandable parameter | |
plain | green | none | yes | sub-parameter | |
Values:
| |||||
plain | black | none | none | default value | |
plain | blue | none | none | non-default value | |
plain | red | none | none | invalid value | |
Figure 1.2 shows what happens when you set some of the clean parameters to non-default values. Some have opened up sub-parameters, which can now be seen and set. Figure 1.3 shows what happens when you set a parameter, in this case vis and mode, to an invalid value. Its value now appears in red. Reasons for invalidation include incorrect type, an invalid menu choice, or a filename that does not exist. For example, since vis expects a filename, it will be invalidated (red) if it is set to a non-string value, or a string that is not the name of a file that can be found. The mode=’happy’ is invalid because its not a supported choice (’mfs’, ’channel’, ’velocity’, or ’frequency’).
_________________________________________________________________________________________
_________________________________________________________________________________________
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