Note
Go to the end to download the full example code.
The Config#
ATK uses a config file to manage many default behaviours. For a list and description of all available config keys, see the next tutorial.
Opening the Config#
The config can be opened in the default text editor, either from the commandline:
$ ATKconfig open
or from inside a script:
from ATK.Config import CONFIG
CONFIG.open()
Viewing the Config#
To print the config to the terminal, use:
$ ATKconfig show
or:
from ATK.Config import CONFIG
CONFIG.show()
[global_settings]
unit_format = symbol
[plot_settings]
cache_time = 3600
size = 500
backend = canvas
toolbars = True
grids = True
titles = False
font = Helvetica
font_size = 14
[query_settings]
query_radius = 3
image_size = 30
default_scale = arcsec
[overlay_settings]
crossmatch_radius = 5
simbad_radius = 3
[datapage_settings]
grid_size = 150
font = Helvetica
font_size = 6
Editing the config#
The value of a key in a given section of the config can be set as follows:
$ ATKconfig set <section> <key> <value>
Resetting the Config#
The config can also be reset to its default state:
$ ATKconfig reset
from ATK.Config import CONFIG
CONFIG.reset()
Download this Tutorial
Total running time of the script: (0 minutes 0.004 seconds)