Space Telescope Science Institute
DrizzlePac 2012 Handbook
Table of Contents Previous Next Index Print

The DrizzlePac Handbook > Chapter 5: Introduction to the drizzlepac Interface > 5.5 Configuration Files (cfg)

Sharing parameter values with collaborators can be daunting for large tasks like astrodrizzle and tweakreg. That is why configuration files were created; these are ASCII text files containing parameter names and corresponding values for a task.
A task configuration file containing specific parameter values can be loaded into the TEAL GUI to execute that task. To load a particular configuration file, click on the “Open” pull-down menu at the top left of the TEAL window. If the configuration file is already listed, simply click on it. Otherwise, click “Other” to open a window for loading the file.
Configuration files can also be run from the Python command-line by using the configobj parameter name. If many specific tweakreg parameter settings are required, specifying them as a Python command would look quite untidy. Instead of listing all parameters in one line of code, a separate uniquely-named configuration file (e.g., a file called “tweakreg_example.cfg”) could be created with custom settings, and passed to the task using configobj parameter.Configuration files can also be run from the Python command-line by using the configobj parameter name.
A sample configuration file for tweakreg is shown below. Users who wish to create their own custom configuration files for a specific task can create one by opening a task in TEAL and saving the parameters and their values to a file. (To start off with default values, be sure to reset the parameters by clicking on the Defaults button before saving the configuration file. The Save As button is under the File menu item.) Alternately, a configuration file can be retrieved from the ~/.teal directory in the user’s home directory–this directory and a default-setting configuration file were created when the software was first used by the user.
These are the contents of a customized teal configuration file, called tweakreg_example.cfg, that matches the last tweakreg command example above.
The tweakreg command in the example program would now be much shorter, and the code cleaner.

Table of Contents Previous Next Index Print