| AHELP for CIAO 4.5 Sherpa v1 | load_conv |
Context: psfs |
Synopsis
Load a 1D convolution kernel
Syntax
load_conv( modelname, filename|model )
Description
The load_conv command loads a one-dimensional general convolution kernel from a file (FITS or ASCII) or Sherpa model, e.g. a PSF kernel. A source model may be convolved (folded) with the loaded kernel via the set_model command, e.g. 'set_model(conv(beta1d.b1))', where "conv" is the name assigned to the convolution kernel by load_conv().
For two-dimensional convolution, refer to "ahelp load_psf".
- modelname - a name for the convolution model
- filename|model - the name of a file, including path, which contains the convolution image (e.g. a PSF image), or the name of a Sherpa model to use in creating the convolution model
Example 1
sherpa> load_conv("conv", "psf.dat")
sherpa> set_model(conv(gauss1d.g1))The load_conv function loads a convolution kernel from the ASCII file psf.dat and assigns it the id 'conv'. The set_model function is then used to assign a 1D Gaussian model convolved with the file-based PSF kernel to source data set 1.
Example 2
sherpa> load_conv("conv", "psf.fits")
sherpa> set_model(2, conv(beta1d.b1))The load_conv function loads a convolution kernel from the FITS file psf.fits and assigns it the id 'conv'. The set_model function is then used to assign a 1D Beta model convolved with the file-based PSF kernel to source data set 2.
Example 3
sherpa> load_conv("conv", gauss1d.psf)
sherpa> set_model(conv(gauss1d.g1))The load_conv function creates a model-based PSF convolution kernel using the Sherpa 1D Gaussian model component 'gauss1d.psf', and assigns it the id 'conv'. The set_model function is then used to assign a PSF-convolved 1D Gaussian model to source data set 1 (i.e., the PSF Gaussian model "psf" is convolved with a second Gaussian model, "g1"). The Gaussian model "psf" is evaluated on the source data set grid.
sherpa> load_conv("conv", gauss1d.psf)
sherpa> set_model(conv(gauss1d.g1))
sherpa> show_model()
Model: 1
apply_rmf(apply_arf((38564.6089269 * (convolutionkernel.conv) o (gauss1d.g1))))
Param Type Value Min Max Units
----- ---- ----- --- --- -----
psf.fwhm thawed 10 1.17549e-38 3.40282e+38
psf.pos thawed 0 -3.40282e+38 3.40282e+38
psf.ampl thawed 1 -3.40282e+38 3.40282e+38
g1.fwhm thawed 10 1.17549e-38 3.40282e+38
g1.pos thawed 0 -3.40282e+38 3.40282e+38
g1.ampl thawed 1 -3.40282e+38 3.40282e+38
See Also
- data
- get_bkg_plot
- info
- list_model_ids, show_bkg_model, show_bkg_source
- modeling
- 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, integrate, 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
- plotting
- 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
- psfs
- contour_kernel, contour_psf, delete_psf, get_kernel, get_psf, image_kernel, image_psf, load_psf, plot_kernel, plot_psf, set_psf, show_kernel, show_psf
- saving
- save_delchi, save_resid
- utilities
- calc_chisqr, calc_energy_flux, calc_model_sum, calc_photon_flux, calc_source_sum, calc_stat, eqwidth
- visualization
- contour_model, contour_ratio, contour_resid, get_ratio, get_resid

![[Sherpa Logo]](../imgs/sherpa_logo_navbar.gif)