|AHELP for CIAO 4.2||
Set the image values in a data array.
- 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.
>>> cr = read_file("image.fits") >>> vals = get_piximgvals(cr) >>> expo = get_keyval(cr, "EXPOSURE") >>> newvals = vals/expo >>> set_piximgvals(cr, newvals) 1 >>> 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.
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.
See the bug pages on the CIAO website for an up-to-date listing of known bugs.