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.

Configuration files can 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. 

A sample configuration file for tweakreg is shown below. 

_task_name_ = tweakreg
input = *flt.fits
refimage =
expand_refcat = False
enforce_user_order = True
exclusions =
writecat = True
clean = False
interactive = True
verbose = False
runfile = "tweakreg.log"
 
[UPDATE HEADER]
updatehdr = False
wcsname = TWEAK
reusename = False
 
[HEADERLET CREATION]
headerlet = False
attach = True
hdrfile = ""
clobber = False
hdrname = ""
author = ""
descrip = ""
catalog = ""
history = ""
 
[OPTIONAL SHIFTFILE OUTPUT]
shiftfile = False
outshifts = shifts.txt
outwcs = shifts_wcs.fits
 
[COORDINATE FILE DESCRIPTION]
catfile =
xcol = 1
ycol = 2
fluxcol = ""
maxflux = None
minflux = None
fluxunits = counts
xyunits = pixels
nbright = None
 
[REFERENCE CATALOG DESCRIPTION]
refcat =
refxcol = 1
refycol = 2
refxyunits = degrees
rfluxcol = ""
rmaxflux = None
rminflux = None
rfluxunits = mag
refnbright = None
 
[OBJECT MATCHING PARAMETERS]
minobj = 15
searchrad = 1.0
searchunits = arcseconds
use2dhist = True
see2dplot = True
separation = 0.5
tolerance = 1.0
xoffset = 0.0
yoffset = 0.0
 
[CATALOG FITTING PARAMETERS]
fitgeometry = rscale
residplot = both
ylimit = None
labelsize = 8
nclip = 3
sigma = 3.0
 
[_RULES_]