Plot-related functions for Sherpa.
plot_rprofr();
plot_rprofd();
plot_eprofr();
plot_eprofd();
lpfd();
lpfr();
and the variables:
_sherpa_plotfns_version_string
_sherpa_plotfns_version
The sherpa_plotfns.sl package contains S-Lang routines that may be useful
to the Sherpa user. The package also sets the plot configuration
(e.g. "ahelp sherpa.plot" and related pages) to
change the appearance of residual plots.
See the Plotting section of the Sherpa threads for more information
on plotting in Sherpa.
The available routines are:
plot_rprofr() |
Display a radial profile of 2D data, fit, and residuals
(units of counts).
See "ahelp plot_rprof".
|
plot_rprofd() |
Display a radial profile of 2D data, fit, and residuals
(units of counts/error).
See "ahelp plot_rprof".
|
plot_eprofr() |
Display an elliptical profile of 2D data, fit, and residuals
(units of counts).
See "ahelp plot_eprof".
|
plot_eprofd() |
Display a elliptical profile of 2D data, fit, and residuals
(units of counts/error).
See "ahelp plot_eprof".
|
lpfd() |
A short form for 'lplot 2 fit delchi'. |
lpfr() |
A short form for 'lplot 2 fit resid'. |
The available variables are:
_sherpa_plotfns_version_string |
Contains the version of the script as a string. |
_sherpa_plotfns_version |
Contains the version of the script as an integer. |
The plot_rprofr() and plot_rprofd() functions are
described in "ahelp plot_rprof".
The plot_eprofr() and plot_eprofd() functions are
described in "ahelp plot_eprof".
The remaining functions are described below:
This is a short form for
sherpa> lplot 2 fit delchi
If an argument is given then it is taken to be the
dataset to be plotted - e.g.
sherpa> lplot 2 fit dnum delchi dnum
This is a short form for
sherpa> lplot 2 fit resid
If an argument is given then it is taken to be the
dataset to be plotted - e.g.
sherpa> lplot 2 fit dnum resid dnum
The variables are:
Contains the version number of the script as a string in the format
"a.b".
Contains the version number of the script as an integer
equal to a*100 + b (when _sherpa_utils_version_string
is "a.b").
This will display two plots: the first plot will be
the source data together with the best-fit model,
and the second plot will be the residuls of the fit
in units of "sigma" (i.e. the residual divided by the error).
The appearance of the first plot is taken from the
sherpa.fitplot configuration variable
(see 'ahelp sherpa.fitplot'), and the second
plot from the sherpa.resplot configuration variable
(see 'ahelp sherpa.resplot').
This is similar to the previous example, except that
the second plot shows the residuals in the data units.
This is the same as calling lpfd but shows the results for the
fit to the second dataset.
The sherpa_plotfns.sl script makes the following changes to
the Sherpa plot-configuration variables when it is loaded:
sherpa.resplot.x_errorbars |
0 |
sherpa.resplot.symbolstyle |
"bigpoint" |
sherpa.resplot.symbolsize |
1 |
sherpa.resplot.prefunc |
&_sherpa_resid_prefunc |
sherpa.resplot.postfunc |
&_sherpa_resid_postfunc |
The first three changes turn off the drawing of errorbars
along the X-axis, change the symbol to the "bigpoint"
style, and set the symbol size to 1.0 when drawing residual plots.
The last two changes tell Sherpa to call the
_sherpa_resid_prefunc() and _sherpa_resid_postfunc() functions
- which are local (or "private") to the sherpa_plotfns.sl script -
before and after a residual plot is created.
It is within these two functions that the remaining customisations,
which are not possible using the configuration variables,
are made.
Please see the
Advanced customization of Sherpa plots thread for
further information.
Version 1.29 of sherpa_plotfns.sl was released with CIAO 3.2.
The script can now be loaded by saying require("sherpa_plotfns"); rather than having to use () = evalfile("sherpa_plotfns.sl"); The old method will still work.
Version 1.27 of sherpa_utils.sl
was released at the same time as CIAO 3.1. The major changes to
the previous version are:
-
The plot_rprofr() and plot_rprofd() functions have been
added to plot the residuals in units of counts or
sigma (analogous to the "resid" and "delchi" options
of the lplot command). The plot_rprof() command is
kept for backwards compatability, and is the same as
plot_rprofr().
-
The plot_eprofr() and plot_eprofd() functions have
been added to calculate the profiles within elliptical
annuli.
-
The residuals are no longer noramlized by the area
of each annulus.
-
Error bars are now displayed (where the errors are
estimated using the approximations given in
Gehrels, N., 1986, Ap.J., 303, 336).
-
You can give just the model name, rather than the
names of the "xpos" and "ypos" parameters, to distinguish
which model to use to calculate the center of the
profile.
-
The residual plots now contain a line at "y=0".
-
The residual plots are now smaller than the main
plot; previously they were the same size.
Version 1.19 of sherpa_plotfns.sl was released for use with CIAO 3.0.2.
The major changes to the previous version are:
The plot_rprof() function has been added to sherpa_plotfns.sl.
See 'ahelp plot_rprof' for further information.
The _sherpa_plotfns_version and _sherpa_plotfns_version_string
variables have been added to the script.
The sherpa_utils.sl script is now required by sherpa_plotfns.sl
and will be automatically loaded when sherpa_plotfns.sl is.
The residual-plot customisations are designed
to work when residual plots are displayed individually -
e.g.
- or along with the best-fit plot, such as
sherpa> lplot 2 fit 2 delchi 2
The customisations do not look as good if more complicated
plots - such as "lplot 3 fit resid arf" - are created.
- chandra
-
guide
- sherpa
-
bye,
calc_kcorr,
dataspace,
dcounts,
dollarsign,
echo,
eflux,
eqwidth,
erase,
flux,
get,
get_dcounts_sum,
get_dir,
get_eflux,
get_eqwidth,
get_filename,
get_flux2d,
get_flux_str,
get_lfactorial,
get_mcounts_sum,
get_pflux,
get_source_components,
get_verbose,
groupbycounts,
guess,
is,
journal,
list,
list_par,
mcounts,
numbersign,
paramest,
plot_eprof,
plot_rprof,
prompt,
reset,
run,
set,
set_analysis,
set_axes,
set_coord,
set_dataspace,
set_dir,
set_verbose,
setplot,
sherpa-module,
sherpa_utils,
show,
simspec,
use,
version
|