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

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


AHELP for CIAO 4.9

is_pha

Context: crates

Synopsis

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

Syntax

is_pha(dataset)
is_pha_type1(dataset)
is_pha_type2(dataset)

Description

Argument Description
dataset A CrateDataset object.

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 (e.g. the return value of read_file).

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 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:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.