DAX : ds9 Analysis eXtensions

dax is a collection of ds9 analysis scripts which allows users to perform some simple CIAO tasks directly from within ds9 with minimal inputs. Many of the dax tasks are specific to Chandra data analysis; however, some tasks are generic.


download_chandra_obsid 635 evt1,asol,pbk,bias,flt,fov,stat,mtl,msk,dtf,bpix
chandra_repro 635 out=./
In [1]:
cd Dax
In [2]:
# In notebook the ots/bin/ds9 is in PATH first.  Need to run wrapper explicitly

$ASCDS_INSTALL/bin/ds9 acisf00635_repro_evt2.fits -bin factor 4 -scale log -scale limits 0 100 &
[1] 3416
In [3]:
import -window "SAOImage ds9" dax_01.png 
display < dax_01.png

The Analysis menu (right hand side) contains a lot of functionality.

At the bottom will be the CIAO sub-menu. This is dax.

In [4]:
# Tear off Analysis menu
sleep 5

import -window "Analysis" dax_02.png 
display < dax_02.png

The dax tasks are divided into several groups

  • Statistics : Number of counts, centroid
  • Histograms : Spectra, Lightcurves
  • Coords : Convert to Chandra specific coordinate systems
  • Detect : Source detection tools
  • Regions : Different ways to create regions
  • Sherpa : Spectral fitting and 2D image fitting
  • Image Processing : Generic image processing tools (smoothing, threshold)
In [5]:
# Open, Tear Off CIAO menu
sleep 2

import -window "CIAO" dax_02.png 
display < dax_02.png


Net Counts

In [6]:
xpaset -p ds9 regions command "circle(3814,3466,45)"
In [7]:
xpaset -p ds9 analysis task '{Net Counts}'
sleep 5
# Resize window

import -window "Net Counts" dax_04.png 
display < dax_04.png

In [8]:
xpaset -p ds9 regions command "{circle(3878,3742,80) # background}"
In [9]:
xpaset -p ds9 analysis task '{Net Counts}'
sleep 5
# Resize window

import -window "Net Counts" dax_05.png 
display < dax_05.png

Source Fluxes

In [10]:
xpaset -p ds9 regions select all

xpaset -p ds9 analysis task '{Photometry (srcflux)}'
In [11]:
# Wait for srcflux ~1min

# Resize window
sleep 3

import -window 'Photometry (srcflux)' dax_05a.png
display < dax_05a.png


In [12]:
xpaset -p ds9 analysis task '{G-L Vary}'
In [13]:
sleep 2

# Click on chips window
import dax_06.png
display < dax_06.png

In [14]:
# Right Click
# Show GUI
# Click on Histogram

sleep 5
import -window 'ChIPS GUI Panel' dax_07.png
display < dax_07.png


In [15]:
# Tear Open and Tear off Sherpa menu 
sleep 5

import -window 'Sherpa' dax_08.png
display < dax_08.png

Spectral Fit

In [16]:
xpaset -p ds9 regions select all
In [17]:
xpaset -p ds9 analysis task '{Spectral Fit}'
In [18]:
# Wait for fit to complete ~ 20 sec

import -window 'Spectral Fit' dax_09.png
display < dax_09.png

In [19]:
# Click on Chips Window
sleep 3

import dax_10.png
display < dax_10.png

2D Image Fit

In [20]:
xpaset -p ds9 analysis task '{2D Image Fit}'
In [21]:
xpaset -p ds9 tile 

import -window "SAOImage ds9" dax_11.png
display < dax_11.png

In [22]:
import -window "2D Image Fit" dax_12.png
display < dax_12.png

In [23]:
xpaset -p ds9 quit

In [ ]: