This is an interface to an IRAF/FTOOLS parameter file.
Constructor
Accessors
- name()
Get or set the name of the parameter file.
- pget()
Get or set the name of the program used to read the parameter file.
- pset()
Get or set the name of the program used to write to the parameter file.
- log()
Get or set the name of the Util::Log object.
returns a new Util::NoLog object if there is no Log.
- ftools(ftools)
Set the parfile reader and writer (pget and pset) given the
FTOOLS instalation directory.
Methods
- set_ld_library_path()
Prepare the LD_LIBRARY path for running pset or pget.
- restore_ld_library_path()
Return LD_LIBRARY path to its value the last time set_ld_library_path
was run.
- clear_param_cache()
Parameter values are chached internally to save time when
doing multiple reads of the same parameter. This can cause
problems if the parameter is modified by some other means, so this method
can be used to wipe out all cached values.
- read(param, accuracy)
Read a value from the parfile.
Note that parameter values are chached - see "clear_param_cache".
For real values parameters, the optional
accuracy argument specifies the number of decimal places to round to.
For example accuracy=0.01 would round to the nearest hundredth.
- has(param)
Check if a particular parameter exists in a parfile, and
return the number of times that the specificed parameter
apears.
- error(message)
Internal error handler.
- set({name1=>value1, name2=>value2 ...})
Set a parameter in the parfile.
Note the parameters are given as reference to a hash.
- increment(param, increment)
Increments a parameter by a given amount (defaults to 1)
the user must make sure it is a numerical parameter.