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

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

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.

>>> 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).

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

December 2013