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

Home » Public Forums » archive » Re: Conditional averaging
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Conditional averaging [message #32724 is a reply to message #32723] Wed, 06 November 2002 14:04 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
klassen@rowan.edu (David Klassen) writes:

> I have a set of arrays which I wish to average in a pixel-by-pixel fashion;
> that is, I want to create an average array. The problem is that there are
> points I wish to exclude from the averaging procedure (all of them have
> been given a particular value, say, -100).

> I think I can get them to add so that the 'bad pixel' flags don't contribute
> to the sum, however, I can't simply divide by the number of arrays, as each
> point in the array has had a different number of good pixels put into its
> sum. Is there an easy way to keep track of the number points which went
> into to the sum?

A = RANDOMN(SEED, 100, 100, 10) ;Simulated data
A(20:30,20:30) = -100
AVG = TOTAL(A,3) / TOTAL(A NE -100,3)

William Thompson
[Message index]
 
Read Message
Read Message
Previous Topic: Conditional averaging
Next Topic: 3D Plot

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

Current Time: Tue Dec 02 08:19:59 PST 2025

Total time taken to generate the page: 1.91762 seconds