| AHELP for CIAO 4.2 | write_pha |
Context: py.crates |
Synopsis
Write a PHACrate to an output file.
Syntax
write_pha(crate, filename)
Description
- crate - input PHACrate object
- filename - name of the output file
The write_pha command creates an output file for the input PHACrate, overwriting any existing file with the same name. The output columns are chosen to match the OGIP PHA file format definition. The command returns a "1" if the file is written successfully.
Example
>>> cr = read_pha("pha.fits")
>>> delete_col(cr, "QUALITY")
1
>>> write_pha(cr, "no_qual.fits")
1Delete the QUALITY column from the crate, then write it out to the file no_qual.fits.
Bugs
See the bug pages on the CIAO website for an up-to-date listing of known bugs.
See Also
- py.crates
- add_col, add_key, add_piximg, delete_col, delete_key, delete_piximg, is_pha, read_arf, read_file, read_pha, read_rmf, write_arf, write_file, write_rmf
- py.crates_contrib
- make_table_crate, scale_image_crate, write_columns
![[CIAO Logo]](../imgs/ciao_logo_navbar.gif)