          Return a CrateData object of an image from a crate.

get_piximg(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("3c186.radio.fits")
>>> img = get_piximg(cr)
>>> print(img)
Name: PRIMARY Datatype: float32 Unit: JY/BEAM Desc: Eltype: Array Ndim: 4 Dimarr: (1, 1, 1150, 1550)

which can be compared to the dmlist output:

unix% dmlist 3c186.radio.fits 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) JY/BEAM

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

December 2013