Skip to the navigation links
Last modified: December 2009

URL: http://cxc-newtest.cfa.harvard.edu/ciao4.2/write_pha.sl.html
AHELP for CIAO 4.2

write_pha

Context: sl.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

slsh> cr = read_pha("pha.fits");
slsh> delete_col(cr, "QUALITY");
1
slsh> write_pha(cr, "no_qual.fits");
1

Delete 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

sl.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
sl.crates_contrib
make_table_crate, scale_image_crate, write_columns

Last modified: December 2009