About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2007

URL: http://cxc.harvard.edu/sherpabeta/get_data.py.html
AHELP for Sherpa 4.0 Beta get_data Context: py.sherpa

Synopsis

Return a Sherpa data set by ID.

Syntax

get_data([id])

Description

The Sherpa data ID ties together data, model, fit results and plotting information in a single structure. The ID can be a string or integer. If no ID is given, then the first Sherpa data set is returned.

Example

sherpa> get_data()
sherpa> get_data(1)
sherpa> get_data("src")

The get_data() function returns a variable that grants access to all the information contained in a data set. For example, data that had been read from a simple ASCII file has the following information:

	  >>> print get_data()
          name      = foo.dat
          x         = Float64[124]
          y         = Float64[124]
          staterror = None
          syserror  = None	  
	  

While data read from a PHA file has more complex information, including arrays for grouping and quality flags as well as the data:

	  >>> print get_data()
	  name           = s0_mar24_bin.pha
	  channel        = Int16[512]
	  counts         = Int32[512]
	  staterror      = None
	  syserror       = None
	  bin_lo         = None
	  bin_hi         = None
	  grouping       = Int16[512]
	  quality        = Int16[512]
	  exposure       = 33483.25
	  backscal       = 0.044189453125
	  areascal       = 1.0
	  grouped        = True
	  subtracted     = False
	  units          = energy
	  response_ids   = [1]
	  background_ids = []
	  

Bugs

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

Last modified: December 2007



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-2004. All rights reserved.