Skip to the navigation links
Last modified: December 2009

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

get_crate_type

Context: py.crates

Synopsis

Return the type of the crate as a string.

Syntax

get_crate_type(crate)

Description

  • crate - input crate

The get_crate_type command returns the type of the input crate in a string. Allowed crate types are 'Crate' (generic), 'Table', 'Image', 'ARF', 'PHA', and 'RMF'. If the crate type is unknown, nothing is returned.

Example 1

>>> cr = read_file("evt2.fits")
>>> print(get_crate_type(cr))
Table

The crate "cr", which contains data from the file evt2.fits, is a TABLECrate.

Example 2

>>> imgcr = read_file("image.fits")
>>> print(get_crate_type(imgcr))
Image

As suggested by the filename, the crate created from the file image.fits is an IMAGECrate.

Bugs

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

See Also

py.crates
get_axis_transform, get_col, get_col_names, get_colvals, get_crate_item_type, get_key, get_key_names, get_keyval, get_number_cols, get_number_rows, get_piximg, get_piximg_shape, get_piximgvals, get_transform, get_transform_matrix

Last modified: December 2009