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

Jump to: Description · Example · Bugs · See Also

AHELP for CIAO 4.9


Context: crates


Return a CrateData object of an image from a crate.




Argument Description
crate The image crate.

The get_piximg command returns a CrateData object representing the contents of the image within the crate. To retrieve just the image data (without any metadata), use copy_piximgvals or get_piximgvals.


>>> cr = read_file("")
>>> img = get_piximg(cr)
>>> print(img)
  Name:     PRIMARY
  Datatype: float32
  Unit:     JY/BEAM
  Eltype:   Array
     Ndim:     4
     Dimarr:   (1, 1, 1150, 1550)

which can be compared to the dmlist output:

unix% dmlist cols
Columns for Image Block PRIMARY
ColNo  Name                 Unit        Type             Range
   1   PRIMARY[1550,1150,1,1] JY/BEAM      Real4(1550x1150x1x1) -Inf:+Inf            
Physical Axis Transforms for Image Block PRIMARY
Group# Axis# 
   1   1,2    POS(X) = (#1) 
                 (Y)   (#2)
   2   3      Z                    = #3 
   3   4      #AXIS4               = #4 
World Coordinate Axis Transforms for Image Block PRIMARY
Group# Axis# 
   1   1,2    EQPOS(RA ) = (+116.250) +SIN[(-0.0005)* (POS(X)-(+774.0419))]
                   (DEC)   (+38.1183)      (+0.0005)  (   (Y) (+575.1304)) 
   2   3      FREQ                 = +1.4351E+09  +21875000.0 * (Z  -1.0)
   3   4      STOKES               = #AXIS4 

Information about the image can be found in fields and methods of the return value - for instance the pixel data (.values) and the pixel units (.unit):

>>> print(img.values.shape)
(1, 1, 1150, 1550)
>>> print(img.unit)


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

add_col, add_piximg, copy_piximgvals, cratedata, create_vector_column, create_virtual_column, delete_piximg, get_axis_transform, get_col, get_col_names, get_colvals, get_crate_item_type, get_crate_type, get_key, get_key_names, get_keyval, get_number_cols, get_number_rows, get_piximg_shape, get_piximgvals, get_transform, get_transform_matrix, set_piximgvals

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: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.