pconfig - configure parameter files to user defaults
pconfig [-h] [-f config file] [-d pfiles dir]
pconfig configures one or more parameter files as described by the entries in the pconfig configuration file (described below). If no command line options are specified, pconfig assumes that the configuration file is in the current directory and named "param.config", and that the parameter files to be modified are also in the current directory.
The configuration file stores the parameter file values in a format that is very similar to the parameter files themselves. In fact, in constructing a configuration file, you may want to simply append a parameter file to the end of your configuration file and edit it's values appropriately. Only those tasks which need modification should be included in the configuration file.
The format of the configuration file is as follows:
taskname: param1,[val1],[val2],[val3],[val4],[val5],[val6],[val7] param2,[val1],[val2],[val3],[val4],[val5],[val6],[val7] param3,[val1],[val2],[val3],[val4],[val5],[val6],[val7] ... <blank line> taskname: param1,[val1],[val2],[val3],[val4],[val5],[val6],[val7] param2,[val1],[val2],[val3],[val4],[val5],[val6],[val7] param3,[val1],[val2],[val3],[val4],[val5],[val6],[val7] ... <blank line> ... <EOF>
Each taskname token causes the file <taskname>.par to be opened and modified. The param# tokens, following the taskname token, indicate the names of the parameters in the <taskname>.par file which need to be modified. Finally, the optional val# tokens specify the values which should appear in the corresponding field of the <taskname>.par file.
For example, the following configuration file entries would cause the "outfile", "columns" and "rows" parameters of the fdump parameter file to be hidden:
fdump: outfile,,h,,,, columns,,h,,,, rows,,h,,,,
If no value is present for a particular field then no modification is made to the corresponding field in the parameter file.
Each taskname/parameter group must be followed by an empty line, except the last which should be followed by an end-of-file marker. Note that no blank lines should appear before the first "taskname:" token.
Lines beginning with a "#" character will be ignored.
The following example runs the pconfig script with the default arguments -- param.config is in the current directory along with all the parameter files to be modified.
example% cd $LOCPFILES example% pconfig fdump: fhelp:
This example modifies the parameter files stored in $FTOOLS/bin without having to be in the same directory as the parameter files, nor the same directory as the configuration file.
example% pconfig -f ~/pfiles.config -d $FTOOLS/bin fdump: fhelp:
This script creates temporary files of the name <taskname>.tmp in the parameter file directory.
This script was written by Ron Zellar, NASA/GSFC, Hughes STX. If you use this script, or have suggestions for it's improvement, please let us know at ftoolshelp@milkyway.gsfc.nasa.gov.