|
|||
NRAO Home > CASA > CASA Cookbook and User Reference Manual |
|
1.4.5.5 The saveinputs Command
The saveinputs command will save the current values of a given task parameters to a Python (plain ascii) file. It can take up to two arguments, e.g.
The first is the usual taskname parameter. The second is the name for the output Python file. If there is no second argument, for example,
a file with name <taskname>.saved (in this case ’clean.saved’ will be created or overwritten if extant. If invoked with no arguments, e.g.
it will use the current values of the taskname variable (as set using inp <taskname> or default <taskname>). You can also use the taskname global parameter explicitly,
For example, starting from default values
CASA <2>: vis=’ngc5921.demo.ms’
CASA <3>: saveinputs
CASA <4>: !more ’listobs.saved’
taskname = "listobs"
vis = "ngc5921.demo.ms"
selectdata = True
spw = ""
field = ""
antenna = ""
uvrange = ""
timerange = ""
correlation = ""
scan = ""
intent = ""
feed = ""
array = ""
observation = ""
verbose = True
listfile = ""
#listobs(vis="ngc5921.demo.ms",selectdata=True,spw="",field="",
antenna="",uvrange="",timerange="",correlation="",scan="",intent="",
feed="",array="",observation="",verbose=True,listfile="")
To read these back in, use the Python execfile command. For example,
and we are back.
An example save to a custom named file:
You can also use the CASA tget command (see § 1.4.5.6 below) instead of the Python execfile to restore your inputs.
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