# Configuration System Overview¶

## Preamble¶

Users organize their TraP runs into projects, which define the basic operational TraP parameters, for example which database to use. All the configuration and log files relating to a particular project are stored in the same directory hierarchy.

Within a project, the user is able to configure multiple pipeline runs, which are referred to as jobs. For example, the user could use a single project to repeatedly re-analyse a particular set of images with a range of different sourcefinder settings, with each analysis constituting a particular job. Alternatively, a project might be dedicated to a multi-epoch survey, with each job corresponding to a different epoch. The fundamental point is that the basic control structures such as the database and task distribution system remain the same, but, within those limits, the user is free to organize their work as they please.

## Creating a Project Directory¶

Use trap-manage.py to create a project directory:



## Configuration file syntax¶

Several of the TraP’s configuration files – pipeline.cfg, inject.cfg, job_params.cfg – use the Python ConfigParser file format. This is defined by the Python standard library, and you should refer to its documentation for a comprehensive reference. However, it is worth noting a few salient points that may be of relevance to the TraP user.

These files are divided into named sections: the name comes at the top of the section, surrounded by square brackets ([ and ]). Within a section, a simple name = value syntax is used. ; indicates a comment (# may also be used for commenting, but only at the start of a line).

Variable substiution is performed using the notation %(name)s: this will be expanded into the value of the variable name when the file is read. Variables used in expansion are taken either from the same section of the file, or from the special DEFAULT section. For example:

[DEFAULT]
a = 1

[section_name]
b = 2
c = %(a)s
d = %(b)s


Would set the values of a and c to 1, and b and d to 2. In some cases, the TraP provides additional variables which may be used in expansions in a particular file: these are noted in the documentation for that file.