|AHELP for CIAO 4.9||
Set the pixel values in an image crate.
|crate||The image crate.|
|values||A NumPy array of values.|
The set_piximgvals command sets the pixel values in the input IMAGECrate data array. The new array does not need to match the dimensionality or data type of the original data.
Only the crate is changed; the input file is unaffected. The write_file command 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) >>> write_file(cr, "div_image.fits")
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.
See the bug pages on the CIAO website for an up-to-date listing of known bugs.
Refer to the CIAO bug pages for an up-to-date listing of known issues.