Chandra X-Ray Observatory (CXC)
Skip to the navigation links
Last modified: December 2012

URL: http://cxc.harvard.edu/ciao/is_pha.html
Jump to: Description · Example · Bugs · See Also


AHELP for CIAO 4.5

is_pha

Context: crates

Synopsis

Determine if the crate dataset contains a PHA file and its type.

Syntax

is_pha(cratedataset)
is_pha_type1(cratedataset)
is_pha_type2(cratedataset)

Description

The is_pha command returns True if the crate dataset contains a PHA file (type I or II) and False otherwise. The _type1 and _type2 variants return True if the dataset is a type 1 or type 2 PHA data set respectively.

Example

>>> cds = read_pha("src.pi")
>>> cr = read_file("src.pi")
>>> is_pha(cds)
True
>>> is_pha(cr)
False

The routine requires a CrateDataset object - as returned by read_pha - and not a Crate.

Bugs

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

Refer to the CIAO bug pages for an up-to-date listing of known issues.

See Also

crates
col_exists, is_rmf, is_virtual, key_exists, read_pha, write_pha

Last modified: December 2012
CXC logo

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2012. All rights reserved.