Skip to the navigation links
Last modified: December 2009

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

set_piximgvals

Context: sl.crates

Synopsis

Set the image values in a data array.

Syntax

set_piximgvals(crate, values);

Description

  • crate - input IMAGECrate object
  • values - array of values

The set_piximgvals command sets the image values in the input IMAGECrate data array. The command returns a "1" if the values are successfully added.

The value is only changed in the crate; the input file is unaffected. The write_file command ("ahelp write_file") can be used to save the modified crate to a file.

Example

slsh> cr = read_file("image.fits");
slsh> vals = get_piximgvals(cr);
slsh> expo = get_keyval(cr, "EXPOSURE");
slsh> newvals = vals/expo;
slsh> set_piximgvals(cr, newvals);
1
slsh> write_file(cr, "div_image.fits");
1

Divide the values from image.fits by the exposure time from the EXPOSURE header keyword. Set the new values in the crate, then write out the new image values in div_image.fits.

CHANGES IN CIAO 4.2

The command was renamed from set_imagevals to set_piximgvals in CIAO 4.2 to avoid a conflict with a ChIPS command of the same name.

Bugs

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

See Also

sl.crates
add_piximg, copy_piximgvals, delete_piximg, get_piximg, get_piximg_shape, get_piximgvals, set_colvals, set_keyval

Last modified: December 2009