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

Home » Public Forums » archive » INTERPOLATE function - Question
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: INTERPOLATE function - Question [message #92846 is a reply to message #92838] Thu, 10 March 2016 13:43 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Wednesday, March 9, 2016 at 2:52:45 PM UTC-5, wlandsman wrote:

>
> if you do this you will the find same percentage of non-zero pixels in the small array as the big one. In your case, 1 out of 4 pixels should be nonzero so 136/4. =34 pixels in each dimension, small_int[0:33,0:33]

OK, I will somewhat modify my previous answer. In general, there is no reason to expect the same fraction of non-zero pixels when you are *interpolating*. If you want to have the same fraction then use

small_int = rebin(small,nint[0],nint[1], /sample)
or
small_int = congrid(small,nint[0],nint[1] )

But any fractional pixel position less than 1 pixel away will be interpolated and thus non-zero. So in dimension if small[1] is non-zero, then any pixel position between 0 and 2 will be interpolated.

The corner pixel [0,0] is a special case, because all interpolated positions will have a X,Y value less than one. (Remember that [0,0] specifies the lower left hand corner of a pixel, with [0.5, 0.5] in the middle.)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: power law fit with a constant
Next Topic: IDL on Mac Funning Yosemite?

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

Current Time: Wed Oct 08 17:29:18 PDT 2025

Total time taken to generate the page: 0.00417 seconds