Last modified: April 2020

URL: https://cxc.cfa.harvard.edu/ciao/ahelp/ciaorc.html
AHELP for CIAO 4.15

ciaorc

Context: concept

Synopsis

The .ciaorc file provides user-configuration options for CIAO

Description

When CIAO is started up - by sourcing the ciao.*sh file - it uses the .ciaorc file in your home directory to see if you have over-ridden any of the default values the location of various applications (such as ipython or ds9). If the file does not exist, a default version is created by the CIAO configuration script. The .ciaorc file is a simple text file that can be edited in a text editor. Blank lines and ones beginning with the '#' character are ignored.

Changing the version of Python used by CIAO

By default, CIAO uses the versions of Python and ipython that are packaged with CIAO. The PYTHON, IPYTHON, and PYTHON_PATH settings can be changed to point to different versions of these programs. These settings should only be changed by expert users.

Due to how the CIAO executables are called via wrapper scripts, the output "which python" (e.g. $ASCDS_INSTALL/bin/python) will look like the CIAO version is still being used no matter what value the settings have. To see which version of Python is actually being accessed, start Sherpa and use the sys.executable command:

sherpa-1> import sys
sherpa-2> sys.executable
         '/soft/ciao/ots/bin/python'

or

sherpa-2> sys.executable
         '/usr/local/bin/python'

Note that CIAO does not set the PYTHON_PATH when CIAO is sourced, only when an application that requires it is called. This makes it possible to use Python in a CIAO window without modifying the .ciaorc file by using the full path, e.g. /usr/bin/python.

PYTHON_PATH: postpend and prepend

The postpend or prepend option specifies how the CIAO additions should be added to an existing PYTHON_PATH. Only the "prepend" value is allowed when using CIAO Python, to make sure a function that CIAO needs is not accidentally superseded.

Changing the value to "postpend" is useful if you have a specialized Python environment and you are concerned that CIAO functions (e.g. numpy or CIAO Python functions) might have a name that is already defined in your system. In this case, the CIAO function will be unavailable but your function will work. Only advanced Python users may need this option.

Changing the version of DS9

The default version of the ds9 display program used by CIAO is the one included within the CIAO distribution. The DS9 and XPA settings can be changed to point to different versions of these tools.


Contents of default .ciaorc file

The default .ciaorc file contains the following entries:

# Uncomment line to force CIAO to use a specific version of tool
# Only the following tools are supported.

# PYTHON_PATH Default is prepend. Can only postpend if users copy 
# of python is used and line is uncommented.
#PYTHON_PATH postpend

# Replace CIAO with path to python to force use of local python
#PYTHON CIAO

# Replace CIAO with path to ipython This is only checked if a
# non-CIAO copy of python is being used.
#IPYTHON CIAO

# Replace /usr/local/bin with path to ds9 to force use of local ds9
#DS9 /usr/local/bin

# Replace CIAO with path to xpa to force use of local xpa
#XPA CIAO

# app variables control the variables the versions of software
# that the internal CIAO tools use (such as sherpa)
# Modify these at your own risk. To modify uncomment out the
# line and replace CIAO with the path to your copy of the tool
#APP_PYTHON CIAO
#APP_IPYTHON CIAO

See Also

calibration
caldb
chandra
coords, level, pileup, times
concept
autoname, ciao, ciao-install, history, parameter, stack, subspace
dm
dm, dmascii, dmbinning, dmfiltering, dmmasks, dmopt, dmregions
gui
gui
paramio
paramio