copy_data
- sherpa.astro.ui.copy_data(fromid, toid)
Copy a data set, creating a new identifier.
After copying the data set, any changes made to the original data set (that is, the
fromid
identifier) will not be reflected in the new (thetoid
identifier) data set.- Parameters
- Raises
sherpa.utils.err.IdentifierErr – If there is no data set with a
fromid
identifier.
Examples
>>> copy_data(1, 2)
Rename the data set with identifier 2 to “orig”, and then delete the old data set:
>>> copy_data(2, "orig") >>> delete_data(2)