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

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


AHELP for CIAO 4.6 Sherpa v1

get_kernel

Context: psfs

Synopsis

Return kernel plot, image, and contour preferences.

Syntax

get_kernel_plot( [id] )
get_kernel_image( [id] )
get_kernel_contour( [id] )

Description

  • id - the id of the data set to use; if not given, uses the default dataset id (id=1 by default, see "ahelp get_default_id")

What is the difference between the PSF and the kernel?

The point spread function (PSF) is defined by the full (unfiltered) PSF image loaded into Sherpa or the PSF model expression evaluated over the full range of the dataset; both types of PSFs are established with the load_psf() command. The kernel is the subsection of the PSF image or model which is used to convolve the data. This subsection is created from the PSF when the size and center of the kernel are defined by the command set_psf(). While the kernel and PSF might be congruent, defining a smaller kernel helps speed the convolution process by restricting the number of points within the PSF that Sherpa must evaluate.

get_kernel_plot:

returns the data and preferences defining the 1D kernel plot visualized with plot_kernel().

get_kernel_image:

returns a variable containing the 2D data and settings characterizing the kernel visualized with image_kernel().

get_kernel_contour:

returns a variable containing the data and preferences defining the contour plot of the kernel visualized with contour_kernel()

Example 1

sherpa> get_kernel_plot("src")

Returns the data and preferences defining the PSF plot calculated from the PSF model "src".

sherpa> print(get_kernel_plot("src"))
PSF frac: 0.991270796001
x      = [  1.0000e+00   2.0000e+00   3.0000e+00 ...,   5.1820e+03   5.1830e+03
   5.1840e+03]
y      = [  7.6365e-07   1.6777e-06   7.0964e-07 ...,   4.9221e-07   4.3923e-07
   1.0823e-06]
yerr   = None
xerr   = None
xlabel = None
ylabel = PSF data
title  = psf_f1_norm_0.25pix.fits
plot_prefs = {'errstyle': 'line', 'symbolfill': False, 'symbolstyle':
4, 'linestyle': 0, 'symbolsize': 3, 'yerrorbars': True}

sherpa> get_kernel_plot("src").plot_prefs
PSF frac: 0.991270796001
            
{'errstyle': 'line',
 'linestyle': 0,
 'symbolfill': False,
 'symbolsize': 3,
 'symbolstyle': 4,
 'yerrorbars': True}
  
sherpa> get_kernel_plot("src").plot_prefs["linestyle"]=3

Example 2

sherpa> get_kernel_image()

Return the data and settings defining the PSF image for the default dataset.

sherpa> image_kernel()

sherpa> print(get_kernel_image())  
PSF frac: 0.991270796001
name   = PSF_Data
y      = [[  7.6365e-07   1.6777e-06   7.0964e-07 ...,   3.6620e-07   4.2709e-07
    1.2908e-06]
 [  5.0448e-07   1.1551e-06   6.6760e-07 ...,   3.5132e-07   5.2898e-07
    1.0603e-06]
 [  1.5065e-06   1.9085e-06   1.6145e-07 ...,   6.0550e-07   1.0842e-06
    1.6097e-06]
 ..., 
 [  1.6771e-07   3.0185e-07   1.5670e-06 ...,   8.7316e-07   2.3804e-07
    2.2776e-07]
 [  3.6587e-07   1.8109e-08   3.4516e-08 ...,   7.9327e-07   1.4121e-06
    7.3247e-07]
 [  3.2451e-07   1.1731e-08   4.3682e-07 ...,   4.9221e-07   4.3923e-07
    1.0823e-06]]
eqpos  = world
 crval    = [ 248.6211   70.531 ]
 crpix    = [ 4096.5  4096.5]
 cdelt    = [-0.0001  0.0001]
 crota    = 0
 epoch    = 2000
 equinox  = 2000
sky    = physical
 crval    = [ 4064.5  4026.5]
 crpix    = [ 0.5  0.5]
 cdelt    = [ 0.25  0.25]
  

Example 3

sherpa> get_kernel_contour(2)

Return the data and settings defining the PSF contour plot for dataset id=2.

sherpa> contour_kernel(2)

sherpa> print(get_kernel_contour(2))  
PSF frac: 0.991270796001
x0     = [  1.   2.   3. ...,  70.  71.  72.]
x1     = [  1.   1.   1. ...,  72.  72.  72.]
y      = [  7.6365e-07   1.6777e-06   7.0964e-07 ...,   4.9221e-07   4.3923e-07
   1.0823e-06]
xlabel = x0
ylabel = x1
title  = PSF Data: psf_f1_norm_0.25pix.fits
levels = None
contour_prefs = {}

See Also

confidence
get_conf, get_covar, get_int_proj, get_int_unc, get_proj, get_reg_proj, get_reg_unc
contrib
get_chart_spectrum
data
get_areascal, get_arf, get_arf_plot, get_axes, get_backscal, get_bkg, get_bkg_plot, get_bkg_scale, get_coord, get_counts, get_data, get_data_plot, get_dep, get_dims, get_error, get_exposure, get_grouping, get_indep, get_quality, get_rmf, get_specresp, get_staterror, get_syserror
filtering
get_filter
fitting
calc_stat_info, get_fit, get_stat_info
info
get_default_id, list_stats
methods
get_draws, get_iter_method_name, get_iter_method_opt, get_method
modeling
get_model, 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_response, get_source, get_source_component_image, get_source_component_plot, image_source
plotting
get_split_plot
psfs
contour_kernel, contour_psf, delete_psf, get_psf, image_kernel, image_psf, load_conv, load_psf, plot_kernel, plot_psf, set_psf, show_kernel, show_psf
statistics
get_chisqr_plot, get_delchi_plot, get_prior, get_sampler, get_stat
utilities
get_analysis, get_rate
visualization
get_ratio, get_resid, image_getregion

Last modified: December 2013
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:   cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2014. All rights reserved.