About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: 1 Dec 2006
Hardcopy (PDF): A4 | Letter

Introduction to CIAO

[CIAO 3.4 Science Threads]



Overview

Last Update: 1 Dec 2006 - updated for CIAO 3.4: CIAO, ChIPS, and Sherpa versions

Synopsis:

A basic introduction to using CIAO, the Chandra Interactive Analysis of Observations software package.

Proceed to the HTML or hardcopy (PDF: A4 | letter) version of the thread.




Contents



Get Started

For illustration, this thread utilizes the ObsID 1843 (ACIS-I, G21.5-0.9) data that was downloaded in the How to Download Chandra Data from the Archive thread.

If this is your first time using CIAO, please read the Starting CIAO thread to ensure that your environment is configured properly. That thread also contains details on running multiple versions of CIAO and avoiding conflicts with FTOOLS.



Dictionary of terms

CIAO uses a number of specialized terms some of which are common in X-ray astronomy data analysis, but not used elsewhere, and some of which are new to CIAO. We have provided a dictionary for some of these terms.



Command-line Completion

From the unix% prompt it is not necessary to type the full name of a tool, application, or filename. <ESC><ESC> or <TAB> will complete the name as long as sufficient letters/numbers are given for it to be unique:

unix% dml<TAB> --> dmlist

and

unix% cel<ESC><ESC> --> celldetect

This will work when calling tools from within Sherpa and ChIPS, but does not work on plotting commands; i.e. curv<TAB> in ChIPS won't finish the word curve for you.

Note that command-line completion is a function of the shell, not CIAO. This will not work in Bourne shell (and perhaps others).



Special Characters

As in most systems, there are restrictions on the use of special characters. Special characters are symbols that are reserved for use by the system or have special meaning to the application. The standard set (defined as special by most operating systems) of "special" characters is:

  & ( ) [ ] ; | * ? ' " ` $ < > ; { } ^ # / \ (space character)

Sherpa and ChIPS have additional restrictions on the use of the following:

  :  +

In general, files and directories should not contain these characters. Sherpa and ChIPS specifically have trouble operating in directories which have the ":" or "(" characters in them (see the Sherpa or ChIPS bugs pages for more info).



Header Keywords

There are many header keywords in the Chandra FITS files. The most important ones for data analysis are described here:

  • Identification

    • SEQ_NUM (sequence number): the primary number used for identification, unique to each observation
    • OBS_ID (observation identification number): a unique identifier used by the processing system
    • OBJECT: name of the target
    • OBSERVER: name of the Principal Investigator
  • Pointing information

    • RA_NOM: nominal right ascension in J2000 coordinates, decimal degrees
    • DEC_NOM: nominal declination in J2000 coordinates, decimal degrees
  • Timing information

    • DATE-OBS: time and date of start of observation
    • DATE-END: time and date of end of observation
    • TSTART: time of start of observation in seconds since 1998 Jan 1 00:00:00
    • TSTOP: time of end of observation in seconds since 1998 Jan 1 00:00:00
    • MJDREF: modified Julian Date of the time zero point (1998 Jan 1 00:00:00)
    • DTCOR: deadtime correction
    • ONTIME: sum of time in GTIs in seconds
    • LIVETIME: ONTIME multiplied by DTCOR
    • EXPOSURE: final exposure time, including all corrections
  • Instrument Information

    • MISSION: AXAF
    • TELESCOP: Chandra
    • INSTRUME: the instrument used for the observation
    • DETNAM: the chip number(s) of the observation, if relevant. The ACIS chip numbering scheme is provided in Table 1.
    • DATAMODE: mode in which the instrument was used
    • GRATING: grating used (or NONE)
Table 1. ACIS chip numbering scheme
Number
(DETNAM)
0 1 2 3 4 5 6 7 8 9
Name I0 I1 I2 I3 S0 S1 S2 S3 S4 S5

Also see Figure 6.1 of the POG for an illustration of the ACIS focal plane.



Parameter Files

Most CIAO tools make use of parameters, which are stored in parameter files; some of the tools that do not make use of parameter files are firstlook, ChIPS, and Sherpa). Parameters may be set by editing the parameter file or by specifying parameter settings on the command line; see the Using Parameter Files thread for details and examples.

A few things to know about using CIAO parameter files:

  • If you wish to use FTOOLS as well as CIAO, then start FTOOLS before you start CIAO; this is discussed in detail in the CIAO startup thread.
  • The default directory in which CIAO stores parameter files is $HOME/cxcds_param. To check the current setting for parameter-file storage in your environment

    unix% echo $PFILES
    /home/username/cxcds_param;/soft/ciao/param
    

    The default parameter files for each tool are stored in $ASCDS_INSTALL/param; in the example above, this is the /soft/ciao/param directory.

  • The filename of a tool's parameter file is the tool name with a .par extension. When you edit a parameter file or run a tool, the tool's parameter file is placed and/or updated in $HOME/cxcds_param by the software.

  • One way to view the contents of a parameter file is to use plist:

    unix% plist dmlist
    
    Parameters for /soft/ciao/param/dmlist.par
    
            infile =                  Input dataset/block specification
               opt = data             Option
          (outfile = )                Output file (optional)
             (rows = )                Range of table rows to print (min:max)
            (cells = )                Range of array indices to print (min:max)
          (verbose = 0)               Debug Level(0-5)
             (mode = ql)              
    
    Those parameters not within parentheses are called "positional parameters;" those parameters that are within parentheses are called "hidden parameters."
  • Parameters are set with the pset command:

    unix% pset dmlist infile=acisf01843N001_evt2.fits
    unix% plist dmlist
    
    Parameters for /home/username/cxcds_param/dmlist.par
    
            infile = acisf01843N001_evt2.fits Input dataset/block specification
               opt = data             Option
          (outfile = )                Output file (optional)
             (rows = )                Range of table rows to print (min:max)
            (cells = )                Range of array indices to print (min:max)
          (verbose = 0)               Debug Level(0-5)
             (mode = ql)              
    

Further information and examples are available in the Using Parameter Files thread.



Running a Tool

  • All the CIAO tools that make use of parameter files are directly executed from the command line:

    unix% dmlist
    Input dataset/block specification (acisf01843N001_evt2.fits): 
    Option (data): block
     
    --------------------------------------------------------------------------------
    Dataset: acisf01843N001_evt2.fits
    --------------------------------------------------------------------------------
     
         Block Name                          Type         Dimensions
    --------------------------------------------------------------------------------
    Block    1: PRIMARY                        Null        
    Block    2: EVENTS                         Table        14 cols x 475869   rows
    Block    3: GTI7                           Table         2 cols x 1        rows
    Block    4: GTI0                           Table         2 cols x 1        rows
    Block    5: GTI1                           Table         2 cols x 1        rows
    Block    6: GTI2                           Table         2 cols x 1        rows
    Block    7: GTI3                           Table         2 cols x 2        rows
    Block    8: GTI6                           Table         2 cols x 1        rows
    
  • The Sherpa and ChIPS tools possess their own command-line interfaces. Issuing the command sherpa or chips will place the user in the tool's environment:

    unix% sherpa
    
    -----------------------------------------------------
    Welcome to Sherpa: CXC's Modeling and Fitting Program
    -----------------------------------------------------
    Version: CIAO 3.4
    
    Type AHELP SHERPA for overview.
    Type EXIT, QUIT, or BYE to leave the program.
    
    Notes:
        Temporary files for visualization will be written to the directory: 
        /tmp
        To change this so that these files are not deleted when you exit Sherpa,
        edit $ASCDS_WORK_PATH in your 'ciao' setup script.
    
        Abundances set to Anders & Grevesse
    
    sherpa> exit
    Goodbye.
    

    and

    unix% chips
    
    
    Welcome to ChIPS, version CIAO 3.4
    Copyright (C) 1999-2003, Smithsonian Astrophysical Observatory
    
    chips> exit
    
  • The firstlook, filtwin, prism, and peg tools possess their own graphical user interface (GUI) environments. For example, the following command launches the firstlook GUI:

    unix% firstlook 
    Initializing firstlook CIAO3.0 ...
    Looking for resources ...
    Initializing toolbar ...
    Scanning environment for observation index files ...
    

    Choose "Exit" from the GUI's "File" menu to quit.



Session Management & GUIs

A "session" is a conceptual notion of the integrated data-analysis environment formed by the interaction of CIAO applications. Most of this interaction is "under-the-hood" and not seen by the user, such as when filtwin reads a region drawn on an image displayed in ds9. Presently, only ChIPS, filtwin, and prism provide the ability to save and restore the current state of the session.

The user-configurable preferences for session support are stored in ciao.par; documentation on this parameter file, the CIAO guis, and the session concept can be accessed using

The appearance of the GUI applications can be controlled by the .CXCdefaults file in your home directory. Start by copying the version from the CIAO installation into your home directory with:

unix% cp $ASCDS_INSTALL/config/system/CXCdefaults ~/.CXCdefaults

and then make your changes. While it contains many configuration options, it is most useful for defining the colors used by the GUI applications; see the colormap FAQ for an example.



Accessing CIAO Help

CIAO Help is available from the command line or from the "Help" button on the graphical interfaces. The command to access CIAO Help is ahelp and one of the following arguments may be added to it:

  • ahelp -s dmlist
    returns a synopsis and the tool's syntax
  • ahelp -m dmlist
    returns a synopsis, the syntax, and examples
  • ahelp -l dmlist
    returns the maximum amount of text-based help, describes all parameters in detail
  • ahelp -i dmlist
    directs the user's browser to the full help stored at http://cxc.harvard.edu/ciao/ahelp/.
  • ahelp -w dmlist
    as with "-i" but use the version contained in the local CIAO installation (it may not be as up-to-date as the "-i" version).
  • ahelp -k list
    returns a list of subjects that are cross-referenced to the help string (akin to unix's apropos command).

The user may find the following special help commands useful:

  • ahelp dmintro - an introduction to the Data Model
  • ahelp dmsyntax - an overview of the Data Model syntax
  • ahelp chips - ChIPS commands
  • ahelp sherpa - Sherpa commands
  • ahelp tools - all CXC tools (such as dmcopy, csmooth, or lightcurve)
  • ahelp acis - ACIS tools
  • ahelp hrc - HRC tools
  • ahelp detect - Detect tools
  • ahelp grating - grating tools
  • ahelp convolution - convolution tools
  • ahelp timing - timing tools


Further Assistance and Reporting Bugs

Further assistance is available from the Helpdesk, the Chandra Users email list, or the CIAO FAQ. Bug reports and suggestions should be submitted to the Help Desk, but please check the Bug List first to see if the problem is already known.

When reporting bugs, please include the version of CIAO you are using. This can be found using the ciao alias used to start CIAO:

unix% ciao -v
This script sets the user's CIAO environment to utilize:
 CIAO version     :  CIAO 3.3.0.1 Wednesday, January 4, 2006
 Proposal Toolkit version :  Cycle 8 Wednesday, November 16, 2005
 bin dir          :  /soft/ciao/bin

If CIAO is already running in the window, you will see:

unix% ciao -v
The current environment is configured for:
 CIAO version     :  CIAO 3.3.0.1 Wednesday, January 4, 2006
 Proposal Toolkit version :  Cycle 8 Wednesday, November 16, 2005
 bin dir          :  /soft/ciao/bin


Additional Software

The CXC provides two additional software resources:

  1. A number of command-line scripts, which are designed to simplify repetitive tasks, or work around bugs in the system.
  2. A Software Exchange Page, which contains user-contributed code.


History

04 Jan 2005 updated for CIAO 3.2: version numbers
01 Dec 2005 updated for CIAO 3.3: version numbers
01 Dec 2006 updated for CIAO 3.4: CIAO, ChIPS, and Sherpa versions

Return to Threads Page: Top | All | Intro
Hardcopy (PDF): A4 | Letter
Last modified: 1 Dec 2006


The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.