copy_data
- sherpa.astro.ui.copy_data(fromid: IdType, toid: IdType) None
Copy a data set, creating a new identifier.
After copying the data set, any changes made to the original data set (that is, the
fromididentifier) will not be reflected in the new (thetoididentifier) data set.- Parameters:
- Raises:
sherpa.utils.err.IdentifierErr – If there is no data set with a
fromididentifier.
See also
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)