[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDV #LFE-633121]: IDV - statistical operators



Hi HP-

> I am awfully sorry that I screwed this one up. I must have answered when
> I was in a state of confusion of some sort.

Been there, done that. ;-)

> Anyway., what I would like to see is the statistics pixel-by-pixel over
> an image sequence, e.g. the average image of the sequence.

Here's a Jython method that will take the average of a sequence of
images:

def average(grid):
   from ucar.unidata.data.grid import GridUtil
   if (GridUtil.isTimeSequence(grid)):
       len = grid.length
       avg = grid[0]
       for i in range(len-1):
          avg = avg + grid[i+1]
       return avg/len
   return grid

you could use a similar method for calculating other statistical
parameters.

Eventually, we'll move this into the core.

Don



Ticket Details
===================
Ticket ID: LFE-633121
Department: Support IDV
Priority: Urgent
Status: Open