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 #92845 is a reply to message #92838] Thu, 10 March 2016 11:44 Go to previous messageGo to previous message
dmfl0590 is currently offline  dmfl0590
Messages: 17
Registered: December 2015
Junior Member
Hi

Thank you for pointing out this. I changed the code but I still have something that I don't understand.

When Small[0,0]=0.1
I got 34x34=1156 nonzero pixels i.e. small_int[0:33,0:33] nonzero

When I changed the Small[1,0]=0.1 I didn't got 1156 nonzero pixels as I was expecting (i.e. small_int[34:67,34:67] nonzero). Please see the code below:

Big = randomu(2,136,136)
nint = size(Big, /dimensions)

Small = fltarr(4,4)
Small[1,0]=0.1

n = size(Small, /dimensions)
n = n[0:*]

X = n[0]*findgen(nint[0])/nint[0]
Y = n[0]*findgen(nint[0])/nint[0]

Small_int = fltarr(nint[0],nint[1])
Small_int = INTERPOLATE(reform(Small[*,*]), X, Y, /GRID)

index = WHERE(small_int gt 0, count)
print, count

> IDL 2278

Also for Small[3,3]=0.1 I got 4489 nonzero pixels (the other entries in the Small matrix are zero). I was expecting small_int[101:135,101:135] to be the nonzero part (34 pixels in each direction). How can we explain that? Maybe I did something wrong again...
[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:50:28 PDT 2025

Total time taken to generate the page: 0.00358 seconds