|
|
Re: Adding/Subtracting/Multiplying images together [message #67467 is a reply to message #67466] |
Tue, 21 July 2009 13:56  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Barbara writes:
> I am extremely new to IDL, and am working with an astronomy professor
> looks at fits files. I have been able to split the header and image
> apart, however now I must be able to add images, then multiply them,
> and find the average image. Does anyone know how to do this?
You could try something like this:
image_added = image_1 + image_2
image_multiplied = image_1 * image_2
IDL is a pretty easy language, as these things go. :-)
Cheers,
David
P.S. You *might* have to cast your image data to
a floating point type if you expect floating point
numbers when you do these mathematical processes:
image_added = Float(image_1) + image_2
image_multiplied = Float(image_1) * image_2
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|