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

Jump to: Description · Examples · Bugs · See Also

AHELP for CIAO 4.9 Sherpa v1


Context: data


Pack PHA data into a PHACrate


pack_pha( [id])


The pack_pha command packs data from a Sherpa data object into a PHACrate. The crates write_pha command ("ahelp write_pha") can then be used to create an output file containing the data. The commands may be combined into one step, but then the crate is hidden and cannot be used for other analysis in the session.

  • id - the id of the dataset to pack; if not given, uses the default dataset id (id=1 by default, see "ahelp get_default_id")

For more information on what crates are and how to use them, see "ahelp crates" .

Example 1

sherpa> spec=pack_pha()

Pack the default dataset into a PHACrate named "spec".

Example 2

sherpa> write_pha(pack_pha("src"), "src.pha")

The pack_pha command is combined with write_pha to get the data from the "src" object and create an output file.


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

See Also

dataspace1d, dataspace2d, datastack, fake, fake_pha, load_arf, load_arrays, load_ascii, load_bkg, load_bkg_arf, load_bkg_rmf, load_data, load_grouping, load_image, load_multi_arfs, load_multi_rmfs, load_pha, load_quality, load_rmf, load_staterror, load_syserror, load_table, pack_image, pack_table, unpack_arf, unpack_arrays, unpack_ascii, unpack_bkg, unpack_data, unpack_image, unpack_pha, unpack_rmf, unpack_table
get_default_id, list_bkg_ids, list_data_ids
add_model, add_user_pars, load_table_model, load_template_model, load_user_model, save_model, save_source
save_arrays, save_data, save_delchi, save_error, save_filter, save_grouping, save_image, save_pha, save_quality, save_resid, save_staterror, save_syserror, save_table

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: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.