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

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


AHELP for CIAO 4.9 Sherpa v1

set_data

Context: data

Synopsis

Set a source dataset

Syntax

set_data( [id], data )

Description

The set_data command establishes a dataset from a Sherpa data object.

  • id - the id of the dataset to use; if not given, uses the default dataset id (id=1 by default, see "ahelp get_default_id")
  • data - a dataset, e.g. created by unpack_data ("ahelp unpack_data") or unpack_pha ("ahelp unpack_pha")

Example 1

sherpa> filt = unpack_data("data.filtered")
sherpa> set_data("filtered",filt)

Unpack data from the file "data.filtered", using the default settings, and set it as dataset "filtered".

Example 2

sherpa> pha1 = unpack_pha("3c273.pi")
sherpa> set_data(pha1[0])

PHA data is unpacked and set as a dataset. Since the unpack_pha command output is a list - in order to handle Type I and II PHA files - it's necessary to specify which element ("[0]") to provide to set_data.

Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

confidence
set_conf_opt, set_covar_opt, set_proj_opt
data
copy_data, dataspace1d, dataspace2d, datastack, delete_data, fake, get_axes, get_bkg_plot, get_counts, get_data, get_data_plot, get_dep, get_dims, get_error, get_quality, get_specresp, get_staterror, get_syserror, group, load_ascii, load_data, load_grouping, load_quality, set_areascal, set_arf, set_backscal, set_bkg, set_coord, set_counts, set_exposure, set_grouping, set_quality, set_rmf, set_staterror, set_syserror, ungroup, unpack_ascii, unpack_data
filtering
get_filter, load_filter, set_filter
info
get_default_id, list_data_ids, list_response_ids
methods
set_iter_method, set_iter_method_opt, set_method, set_method_opt
modeling
clean, get_par, set_bkg_model, set_full_model, set_par, set_pileup_model, set_source, set_xsabund, set_xscosmo, set_xsxsect, set_xsxset
plotting
plot_data, set_xlinear, set_xlog, set_ylinear, set_ylog
saving
save_error, save_filter, save_grouping, save_quality, save_staterror, save_syserror
statistics
set_prior, set_sampler, set_sampler_opt, set_stat
utilities
calc_data_sum, calc_data_sum2d, calc_ftest, calc_kcorr, calc_mlr, calc_model_sum2d, calc_source_sum2d, get_rate, set_analysis, set_default_id
visualization
contour, contour_data, contour_ratio, get_ratio, get_resid, histogram1d, histogram2d, image_data, image_setregion, rebin

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:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.