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 2008

URL: http://cxc.harvard.edu/sherpa4.1/copy_data.py.html
AHELP for Sherpa 4.1

copy_data

Context: py.sherpa

Synopsis

Copy a data set by data ID to a new data ID (deep copy)

Syntax

copy_data( fromid, toid )

Description

The copy_data() function performs a deep copy operation in which one data set is fully copied to another.

  • fromid - the id of the source data set
  • toid - id of the destination data set

Example

sherpa> copy_data(2, "src")

The copy_data() function copies one data set to another, by data set ID. Here, the data contained in data set 2 is copied to data set "src".

sherpa> print(get_data(2))
name           = simple.pi
channel        = Float64[1024]
counts         = Float64[1024]
staterror      = None
syserror       = None
bin_lo         = None
bin_hi         = None
grouping       = None
quality        = None
exposure       = 56494.4943719
backscal       = 9.36267570731e-05
areascal       = 1.0
grouped        = False
subtracted     = False
units          = energy
response_ids   = [1]
background_ids = [1]

sherpa> print(gete_data("src"))
name           = 1843.pi
channel        = Float64[1024]
counts         = Float64[1024]
staterror      = None
syserror       = None
bin_lo         = None
bin_hi         = None
grouping       = None
quality        = None
exposure       = 7854.46647487
backscal       = 0.00085461636003
areascal       = 1.0
grouped        = False
subtracted     = False
units          = energy
response_ids   = [1]
background_ids = []

sherpa> copy_data(2, "src")

sherpa> print(gete_data("src"))
name           = simple.pi
channel        = Float64[1024]
counts         = Float64[1024]
staterror      = None
syserror       = None
bin_lo         = None
bin_hi         = None
grouping       = None
quality        = None
exposure       = 56494.4943719
backscal       = 9.36267570731e-05
areascal       = 1.0
grouped        = False
subtracted     = False
units          = energy
response_ids   = [1]
background_ids = [1]

Bugs

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

Last modified: December 2008



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.