Return, as an array, the names of the model components
      in the source expression of a dataset.
     
 
cpts = get_source_components();
cpts = get_source_components( dnum ); 
 
      
	The routine is loaded into Sherpa with the call
       
        require ("sherpa_utils"); 
      
	The functions returns a String_Type array which contains the names
	of the components used to define the source expression.
	If no argument is given then dataset number 1 is 
	assumed, otherwise it uses the argument (dnum) as the 
	dataset number to use.
	for dataset number 1.
	This routine complements
	get_source_expr() which returns the full source
	expression.
       
     
sherpa> paramprompt off
sherpa> source = xsphabs[gal] * ( xsmekal[clus] + xspowerlaw[pl] )
sherpa> print( get_source_expr )
(gal * (clus + pl))
sherpa> cpts = get_source_components
sherpa> cpts
String_Type[3]
sherpa> print( cpts )
gal
clus
pl  
	  
	    Here we set up a source expression consisting of
	    a plasma model plus a powerlaw, both absorbed by the
	    "xsphabs" model.
	    The get_source_expr() routine returns a string listing
	    the full source expression, so we use the get_source_components()
	    routine from sherpa_utils.sl to break it down into its
	    compnenets (here "gal", "clus", and "pl").
	   
	  
	    Since we are using dataset number 1 then we do not
	    need to provide arguments to either the get_source_expr()
	    or get_source_components() routines. This means that
	    we can call these routines without the trailing "()".
	   
	 
 
sherpa> paramprompt off
sherpa> source 3 = xsphabs * ( xsmekal + xspowerlaw )
sherpa> print( get_source_expr(3) )
(xsphabs * (xsmekal + xspowerlaw))
sherpa> cpts = get_source_components(3)
sherpa> print( cpts )
xsphabs
xsmekal
xspowerlaw  
	  
	    This is very similar to the previous example except that
	    we are using dataset 3 - and so have to include it when calling
	    both get_source_expr() and get_source_components() - and
	    we do not provide our own names for the source components -
	    and so they default to the model names.
	   
	 
 
      
	Please see "ahelp sherpa_utils" for information on
	how to load these routines into Sherpa.
       
     
- 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_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_plotfns,
sherpa_utils,
show,
simspec,
use,
version
 
 
 
 |