STScI Logo

imgets images.imutil


NAME · USAGE · PARAMETERS · DESCRIPTION · EXAMPLES · SEE_ALSO

NAME

imgets -- get the value of an image header parameter as a string

USAGE

imgets image param

PARAMETERS

image
Name of the image to be accessed.
param
Name of the parameter whose value is to be returned.
value = ""
The value of the parameter, returned as a string.

DESCRIPTION

The value of the parameter param of the image image is returned as a string in the output parameter value . The CL type coercion functions int and real may be used to decode the returned value as an integer or floating point value. Both standard image header parameters and special application or instrument dependent parameters may be accessed. If the parameter cannot be found a warning message is printed and the value "0" is returned. Parameter names are case sensitive.

The following standard image header parameters may be accessed with imgets :

	i_pixtype			pixel type (short, real, etc.)
	i_naxis				number of dimensions
	i_naxis[1-7]			length of the axes (x=1,y=2)
	i_minpixval			minimum pixel value or INDEF
	i_maxpixval			maximum pixel value or INDEF
	i_title				image title string
	i_pixfile			pixel storage file name

This task is most useful for image parameter access from within CL scripts. The task imheader is more useful for just looking at the image header parameters.

EXAMPLES

1. Fetch the instrument parameter "HA" (hour angle) from the image header of the image "nite1.1001", and compute and print the hour angle in degrees:

	cl> imgets nite1.1001 HA
	cl> = real(imgets.value) * 15.0
	42.79335

2. Print the number of pixels per line in the same image.

	cl> imgets nite1.1001 i_naxis1
	cl> = int(imgets.value)
	1024

SEE ALSO

imheader, hedit, hselect


Source Code · Search Form · STSDAS