Run CIAO tasks from the ds9 Analysis menu
A number of common CIAO tasks are available from the ds9 Analysis menu. This menu addition allows users to get source counts, smooth an image, and create a histogram - among many other things - from the ds9 program in CIAO. The analysis menu tasks are known as "dax" (ds9 analysis extensions).
The commands are stored in the file $ASCDS_INSTALL/contrib/config/ciao.ds9 and are automatically loaded when ds9 is launched within CIAO.
The user can also explicitly point to the file in the ds9 -analysis switch:
unix% ds9 -analysis $ASCDS_INSTALL/contrib/config/ciao.ds9 ...
Using the Tools
Under ds9's Analysis menu, at the bottom will be a "CIAO tools (DAX)" option. Selecting "CIAO tools (DAX)" will display the category of CIAO tasks :
- Statistics: use the defined regions to calculate counts, centroid, min pixel value, max pixel value, etc.
- Histograms: create spectra, lightcurves, and radial profiles, for example.
- Coordinates: Obtain coordinates for a region center or crosshair in various Chandra coordinate systems: chips, detector, sky, celestial.
- Detect: run source detection tools on images.
- Regions: generate regions that enclose a fraction of flux, magic-wand style source selector (local contouring).
- Sherpa: extract and fit spectra, 2D images, or radial profiles.
- Image Processing: adaptive smooth (including csmooth), adaptive bin, smooth (various kernels), non-linear filtering (median), fill in where sources have been removed (dmfilth), and more options.
Calculating the Statistics
The options under the Statistics item use the combination of all defined regions to calculate the quantities. To exclude certain areas, define a region and use the "Region -> Properties" menu to set it to "exclude". If no regions are defined, the calculations are run on the entire image created at the current binning value.
Plotting is done using the built in ds9 "BLT" plotting package. User can use the menu bar on the plot window to change the axes to log scale, change fonts and colors, etc.
Changes in the 4.12.2 (April 2020) release
Updated the Regions -> PSF Fraction task to force regions in ds9 format. This update prevents dax from hanging when users have modified their preferences to save regions in ciao format.
Changes in the 4.11.3 (May 2019) release
This release includes major changes to dax affecting most of the individual analysis tasks.
Users can now select the directory where they want the DAX output file to be written. There is a new dax.par parameter file where users can specify the default output directory, outdir. Alternatively, user can set the DAX_OUTDIR environment variable, or they can change the output directory via the new 'Change DAX output directory' analysis task.
- Removed individual dmstat statistics
- Reformatted dmstat output
- Reformatted moments output
- Removed centroid snap task from menu
- Improved Help
- Net counts are now computed for the selected regions (if any) or all regions if none are selected. Also now uses the image as currently displayed rather (eg smoothed, filtered).
All of the histogram plots are now created using ds9 built-in "BLT" plotting package. Users can use the options in the menu bar to save (print) the figure and adjust the plot style (linear|log, fonts, colors). All of the tasks also now save the output file in the DAX_OUTDIR (as discussed above).
- New `convert_ds9_region_to_ciao_stack` script replaces old awk script to expand ds9 regions: panda, epanda, bpanda, mutli-radii annulus, multi-radii ellipse, mutli-radii box. Also handles excluded regions.
- Radial profile task now uses image as displayed (eg smoothed/etc) instead of original file on disk.
- User can now select pixels are arcsec for radial profile task
- Extract along polygon now also plots data vs row-number, x, y, radius, or angle.
- Improved Help
- Removed individual coordinates; now always display all coordinates.
- Reformatted 'All' coordinates
- Coordinates are now computed at: The location of the crosshair, if in crosshair mode; Or, the center of the 1st selected circle|box|ellipse|annulus; Or, the center of the 1st non-selected circle|box|ellipse|annulus.
- Chandra Field-of-View task now run inside a wrapper script so that any error messages/etc are shown.
- Improved Help
- All detect tasks are now run with data as displayed rather than going back to file on disk.
- All detect tasks are now run inside a wrapper script so that any error messages/etc are shown.
- celldetect is now run with fixedcell=12
- Improved Help
- All region tasks are now run with data as displayed rather than going back to file on disk.
- All region tasks are now run inside a wrapper script so that any error messages/etc are shown.
- New `contour` task runs `dmcontour` to create regions at specified levels. Interior holes are automatically excluded.
- Improved error checking in PSF Size task
- Improved Help
- Replaced chips plots with native ds9 blt plots.
- Spectral fit now gives user the choice of statistic (chi2gehrels|chi2xspecvar|cash|cstat|wstat), minimization method (levmar|neldermead|moncar), absorption model(xswabs|xsphabs)
- Removed clean cache task
- 2D Image fit now saves output model, residuals, and fitting commands. Model and Residuals are now displayed in separate, tiled, frames.
- New Radial Profile Fit task. Computes and fits radial profile with 1 or 2 additive model components from gauss1d|beta1d|const1d|lorentz1d|polynom1d|powlaw1d
- Improved Help
- All tasks are now run inside a wrapper script so that any error messages/etc are shown.
- Updated Source Fill task to no longer rely on user Grouping source and background regions. The script now requires 1-to-1 src-to-background region matches.
Change DAX output directory
New task to allow users to change DAX output directory during the current analysis session. The directory selected is not saved. Use
pset dax outdir=directory
to permanently change the output directory.
Changes in the 4.11.1 (December 2018) release
Clarified error messages to indicate that users must have regions selected to perform spectral or spatial fits. Additional internal changes to use python scripts to perform sherpa fits rather than using sherpa IPython wrapper.
Changes in the 4.10.3 (October 2018) release
Updated to ensure that on systems where ds9 autoloads funtools or zhtools analysis tools, that it is still able to start the chipsServer in the background.
Internal updates to support ds9 v8.
Change in the 4.8.4 (September 2016) release
Several tasks have been updated to ensure that the desired region format is retrieved from ds9 instead of relying on the assumed defaults.
Changes in the 4.6.7 (November 2014) release
A new "Net Counts" option has been added that emulates the FUNTOOLs 'Counts in a region' functionality. This provides net counts and rates individually for each region.
The Aperture Photometry task has been renamed and moved. It is now available as the "Statistics -> Photometry (srcflux)" task.
The "All" statistics have been renamed "dmstat" to make it more clear which task is being run.
About Contributed Software
This script is not an official part of the CIAO release but is made available as "contributed" software via the CIAO scripts page. Please see this page for installation instructions - such as how to ensure that the parameter file is available.
- The stacked shapes (panda, annulus, elliptical annulus, box annulus, etc.) only work with the radial profile task.
See the CIAO website for an up-to-date listing of known bugs.
Refer to the CIAO bug pages for an up-to-date listing of known issues.