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

URL: http://cxc.harvard.edu/ciao/crates_utils.html
AHELP for CIAO 4.5

crates_utils

Context: contrib

Synopsis

Utility routines for Crates (CIAO contributed package).

Syntax

import crates_contrib.utils
from crates_contrib.utils import *

Description

The crates_contrib.utils module provides utility routines for CIAO users, and is provided as part of the CIAO contributed scripts package.

Loading the routines

The module can be loaded into ChIPS, Sherpa, or Python scripts by saying one of the following:

from crates_contrib.utils import *
from crates_contrib.all import *

where the second line will load in all the Crates contributed routines, not just the utils module.

Contents

The utils module currenly provides the following routines and classes:

Routine or Class Description
write_columns() Write out a set of arrays to a file as a table (ASCII or FITS format)
write_arrays() Write arrays to an ASCII file
make_table_crate() Create a table crate from a set of arrays
make_image_crate() Create an image crate from an array
add_colvals Add a column to a table crate
scale_image_crate() Scale the data in an image crate (useful for display purposes)
smooth_image_crate() Smooth the data in an image crate (useful for display purposes)
read_ds9_contours() Read in the contours from a DS9 *.con file with optional coordinate conversion
SimpleCoordTransform Support transformations between the different coordinate systems of an image

Deprecated routines

Routine Replacement
add_keyval set_key in pycrates

See the ahelp file for the routine and the contributed scripts page for further information.

Changes in the December 2012 Release

The module has been updated to work with the updated Crates module in CIAO 4.5.

No conversion of 32-bit integers to 64-bit integers

As the Crates module can now write out 32-bit integer values correctly, the add_colvals, make_image_crate, make_table_crate, and write_columns routines no longer convert arrays with a data type of np.int32 to np.int64 (this only happened on 64-bit builds of CIAO 4.4).

Deprecated routine: add_keyval

The addition of the set_key routine to Crates means that add_keyval is no longer necessary and so it has been deprecated.

Bugs

See the bugs pages for an up-to-date listing of known bugs.

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


Last modified: November 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.