Congrid/Rebin Conundrum [message #55931] |
Thu, 13 September 2007 06:11 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Hi Folks,
How do you explain these results?
;**************************************************
Pro test
data=fltarr(4,4)
data[*,0]=[0.145344, 0.169110,0.182731,0.122478]
data[*,1]=[0.115594,0.0440957,0.182731,0.126002]
data[*,2]=[0.131399, 0.135963,0.195779,0.314944]
data[*,3]=[0.0892466,0.166040,0.208135,0.279526]
print,Total(data)/16.
print,(moment(data))[0]
print,rebin(data,1,1)
Print, ''
print,congrid(data,1,1,/INTERP)
print,congrid(data,1,1)
print,congrid(data,1,1,CUBIC=1)
end
;**************************************************
IDL> test
0.163070
0.163070
0.163070
0.145344
0.145344
0.145344
I find the same problem with CMCONGRID, from Craig's
library.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|