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

Home » Public Forums » archive » Re: rebin with missing data?
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: rebin with missing data? [message #10207] Tue, 28 October 1997 00:00
Stein Vidar Hagfors H is currently offline  Stein Vidar Hagfors H
Messages: 32
Registered: May 1997
Member
i001@justwright.com wrote:
>
> Hello,
>
> Does anyone have a routine to resize an array that contains missing data,
> please? The missing data value us that I use corrupts the real data in the
> in-built resizing routines.
>
> If anybody has one, I'd be very grateful for it.

Hi,

I don't have any existing routine per se, but I've done something
similar before with the interpolate routine to do some morphing.

Given e.g., IMAGE=fltarr(100,100), where missing values are flagged
with the value MISSING.

Then, do the following (this assumes that at least one pixel in IMAGE is
missing - otherwise just skip everything!).

mask = make_array(size=size(image))
ix = where(image eq missing)
mask(ix) = 1.0

image = rebin(image,sz1,sz2) ;; Where sz1, sz2 are the final sizes
mask = rebin(mask,sz1,sz2) ;;

;; Now, find all pixels influenced by the missing values:

ix = where(mask)
image(mask) = missing ;; Flag them as missing

That should be it, basically...
[Message index]
 
Read Message
Previous Topic: Re: Memory linits for Unix IDL
Next Topic: Fontifying in wave-mode for emacs???

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

Current Time: Thu Oct 09 15:21:07 PDT 2025

Total time taken to generate the page: 1.36239 seconds