comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Summation Image arrays
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Summation Image arrays [message #92739] Fri, 19 February 2016 11:08 Go to next message
Ali Gamal is currently offline  Ali Gamal
Messages: 98
Registered: June 2013
Member
hi,
I have two images as

I=STOKESOUT(*,*,*,0)
V=STOKESOUT(*,*,*,3)
where
IDL> help,stokesout
STOKESOUT FLOAT = Array[500, 1000, 20, 4]

I want to do
sum(I+V),
but I want it appears as image not one value
How can I do it?
Re: Summation Image arrays [message #92740 is a reply to message #92739] Fri, 19 February 2016 12:16 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 2/19/16 12:08 PM, Ali Gamal wrote:
> hi,
> I have two images as
>
> I=STOKESOUT(*,*,*,0)
> V=STOKESOUT(*,*,*,3)
> where
> IDL> help,stokesout
> STOKESOUT FLOAT = Array[500, 1000, 20, 4]
>
> I want to do
> sum(I+V),
> but I want it appears as image not one value
> How can I do it?
>
>

Do you mean add up all the values of either I or V in a particular x-y
location? i.e.,

s = total(I + V, dimension=3)

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Re: Summation Image arrays [message #92741 is a reply to message #92739] Sat, 20 February 2016 04:36 Go to previous messageGo to next message
Ali Gamal is currently offline  Ali Gamal
Messages: 98
Registered: June 2013
Member
On Friday, February 19, 2016 at 9:08:43 PM UTC+2, Ali Gamal wrote:
> hi,
> I have two images as
>
> I=STOKESOUT(*,*,*,0)
> V=STOKESOUT(*,*,*,3)
> where
> IDL> help,stokesout
> STOKESOUT FLOAT = Array[500, 1000, 20, 4]
>
> I want to do
> sum(I+V),
> but I want it appears as image not one value
> How can I do it?

If I use total(I+v), the output is one value
I want to do total(I+v) but still as image
Re: Summation Image arrays [message #92742 is a reply to message #92741] Sun, 21 February 2016 13:36 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 2/20/16 5:36 am, Ali Gamal wrote:
> On Friday, February 19, 2016 at 9:08:43 PM UTC+2, Ali Gamal wrote:
>> hi,
>> I have two images as
>>
>> I=STOKESOUT(*,*,*,0)
>> V=STOKESOUT(*,*,*,3)
>> where
>> IDL> help,stokesout
>> STOKESOUT FLOAT = Array[500, 1000, 20, 4]
>>
>> I want to do
>> sum(I+V),
>> but I want it appears as image not one value
>> How can I do it?
>
> If I use total(I+v), the output is one value
> I want to do total(I+v) but still as image
>

Sorry, dimension is a parameter, not a keyword for TOTAL:

s = total(I + V, 3)

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Adding or averaging multiple grid arrays returns all NaNs
Next Topic: Naming the file as open through dialogue_pickfile

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:13:02 PDT 2025

Total time taken to generate the page: 0.00591 seconds