Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: December 2009

URL: http://cxc.harvard.edu/sherpa/ahelp/prof_delchi.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.9 Sherpa v1

prof_delchi

Context: contrib

Synopsis

Plot a radial or elliptical profile of the residuals (data - model)/error to imaging data.

Syntax

prof_delchi( [id], [model=None, rstep=None, rmin=None, rmax=None,
rlo=None, rhi=None, xpos=None, ypos=None, ellip=None, theta=None,
group_counts=None, group_snr=None, label=True, recalc=True,
overplot=False] )

Description

The prof_delchi command calculates the radial - or elliptical - profile of the residuals to imaging data (data - model)/error and plots it. The profile is defined by the existing model compenents, although it is possible to over-ride these values.

The residual values are calculated as

(data - model) / error

The prof_resid() command can be used if you want to plot

data - model

Loading the routine

The routine can be loaded into Sherpa by saying:

from sherpa_contrib.profiles import *

Argument options

The argument options are the same as for the prof_data() command, and are described in its ahelp page.

Errors

See the ahelp file for the prof_data() for a discsussion of how errors are calculated:

unix% ahelp -b DESC prof_data

Changing the plot defaults

The get_delchi_prof_prefs() returns the current plot preferences used by prof_delchi(). Changing these settings will therefore change the appearance of any new plots created by prof_delchi(). For example

sherpa> get_delchi_prof_prefs()["xlog"] = True

will cause any new residual plots to use logarithmic scaling for the X axis. A full list of the preferences can be found by saying

unix% ahelp get_delchi_prof_prefs

Example 1

sherpa> prof_delchi()
sherpa> log_scale(X_AXIS)
...
sherpa> prefs = get_delchi_prof_prefs()
sherpa> prefs["xlog"] = True
sherpa> prof_delchi()

The preferences are set so that the x axis should be drawn using log scaling. Setting the get_delchi_prof_prefs values only affects plots made after the change; to change an existing plot you need to use ChIPS commands such as log_scale() and linear_scale().

Example 2

sherpa> prof_delchi(group_snr=15)

The residuals are plotted after the bins have been grouped so that each bin has a signal to noise ratio of 15 or more, where the calculation is done using the data and not the residual values.

Example 3

sherpa> prof_delchi(rlo=[0,10,20,40,60,100,200])

Calculate the residual profile in radial bins with low/high limits of 0-10, 10-20, 20-40, 40-60, 60-100, 100-200.

Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

contrib
get_data_prof, get_data_prof_prefs, get_delchi_prof, get_delchi_prof_prefs, get_fit_prof, get_model_prof, get_model_prof_prefs, get_resid_prof, get_resid_prof_prefs, get_source_prof, get_source_prof_prefs, plot_chart_spectrum, prof_data, prof_fit, prof_fit_delchi, prof_fit_resid, prof_model, prof_resid, prof_source, sherpa_profiles
data
get_arf_plot, get_bkg_plot
modeling
normal_sample, t_sample, uniform_sample
plotting
get_energy_flux_hist, get_lrt_plot, get_lrt_results, get_photon_flux_hist, get_pvalue_plot, get_pvalue_results, get_split_plot, plot, plot_arf, plot_bkg, plot_cdf, plot_chisqr, plot_data, plot_delchi, plot_energy_flux, plot_fit, plot_model, plot_model_component, plot_order, plot_pdf, plot_photon_flux, plot_pvalue, plot_ratio, plot_resid, plot_scatter, plot_source, plot_source_component, plot_trace, set_xlinear, set_xlog, set_ylinear, set_ylog
psfs
plot_kernel
statistics
get_chisqr_plot, get_delchi_plot
visualization
contour_resid

Last modified: December 2009
Smithsonian Institute Smithsonian Institute

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