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

Home » Public Forums » archive » Chunk Array Decimation
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: Chunk Array Decimation [message #63719 is a reply to message #32363] Tue, 18 November 2008 02:52 Go to previous messageGo to previous message
Wout De Nolf is currently offline  Wout De Nolf
Messages: 194
Registered: October 2008
Senior Member
On Mon, 17 Nov 2008 13:40:45 -0800 (PST), Keflavich
<keflavich@gmail.com> wrote:

> Does anyone know how to implement this algorithm using a median
> stack of each pixel instead of simply adding / averaging?

The 'dual histogram loop' approach to drizzling, which you use, loops
over the index-frequencies and not over the index-values like e.g. the
'single histogram' loop does. In the first case, intermediate results
(partial sums) are calculated each iteration while in the second case,
final results (total sums) are calculated each iteration.

As far as I know, there is no 'intermediate' median (i.e. the
equivalent to a partial sum). So maybe the single histogram loop is
what you need:

data=[1,2,3,4,5]
inds=[4,4,1,2,1]

mx=max(inds)
vec3=fltarr(mx+1)
h=histogram(inds,reverse_indices=ri,OMIN=om)
for j=0L,n_elements(h)-1 do if ri[j+1] gt ri[j] then $
vec3[j+om]=median(data[ri[ri[j]:ri[j+1]-1]])

Does this help?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ASTER Data
Next Topic: reading slices of FITS files

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

Current Time: Wed Oct 08 17:46:43 PDT 2025

Total time taken to generate the page: 0.00537 seconds