| 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");
1Divide 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.
![[CIAO Logo]](../imgs/ciao_logo_navbar.gif)