|AHELP for CIAO 4.5 Sherpa v1||
Controlling the integration of model components
The integration of models in CIAO4 Sherpa is controlled by an integration flag in each model structure. There is no longer an "integrate" command as there was in CIAO 3.4.
Sherpa source and background models are integrated over bins in energy-space or wavelength-space before being folded through an instrument, or over bins in counts-space if no instrument model is specified. If integration is turned off, then the model values at the entered data points are used for non-binned data. For binned data, the model values at the left side of the bin are used in the fitting. Changing the integration status of a model component will have no affect if the data are not binned.
There is no control from Sherpa over the integration setting of XSPEC source models. Additionally, there is no integration setting for instrument models.
Certain combinations of additive/integrated and multiplicative/non-integrated model components are not allowed - such as by adding two model components with different integration settings - as they can not produce meaningful results. Sherpa will issue a warning when it detects an unacceptable combination.
In general, the relevant parameters of a model (e.g., positions, radii, amplitudes) match up with the COORD setting. If you are working in image coordinates, model parameters will also refer to image coordinates. This can change, however, if you change the integrate setting of the model.
If you create a model, e.g. a beta2d model, and turn integration off, you will get the model value at a point (x,y). In that case, the units are just "counts" since the rest of the beta2d expression is unitless (see "ahelp beta2d" for details).
When you turn integrate on, you are telling Sherpa to bin up the model values for you. Sherpa evaluates the model at (x_lo, y_lo) and (x_hi, y_hi), and bins it so that you get all the counts that happened in that bin, not just at some particular point in data space. Since the bin size is being taken into account, the value really means "counts/bin" or "counts/pixel", not simply "counts".
To see the difference that integrate makes, use the image_model command to display the model values in ds9. Change the integrate setting and image the model again to see how the values change.
sherpa> set_model(xsphabs.abs1*powlaw1d.p1) sherpa> p1.integrate True sherpa> p1.integrate=False sherpa> p1.integrate False
Define a model and turn off the integration for the "p1" component.
See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.
- list_model_ids, show_bkg_model, show_bkg_source
- add_model, add_user_pars, clean, create_model_component, delete_bkg_model, delete_model, delete_model_component, get_model, get_model_autoassign_func, get_model_component, get_model_component_image, get_model_component_plot, get_model_plot, get_num_par, get_order_plot, get_par, get_pileup_model, get_source, get_source_component_image, get_source_component_plot, image_model, image_model_component, image_source, image_source_component, integrate1d, link, load_table_model, load_template_model, load_user_model, normal_sample, reset, save_model, save_source, set_bkg_model, set_full_model, set_model_autoassign_func, set_pileup_model, set_source, set_xsabund, set_xscosmo, set_xsxsect, set_xsxset, t_sample, uniform_sample
- get_lrt_plot, get_lrt_results, get_pvalue_plot, get_pvalue_results, plot_cdf, plot_lrt, plot_model, plot_model_component, plot_pdf, plot_pvalue, plot_scatter, plot_source, plot_source_component, plot_trace
- delete_psf, load_conv
- save_delchi, save_resid
- calc_chisqr, calc_energy_flux, calc_model_sum, calc_photon_flux, calc_source_sum, calc_stat, eqwidth
- contour_model, contour_ratio, contour_resid, get_ratio, get_resid