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

Home » Public Forums » archive » something (wrong?) with CONGRID?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
something (wrong?) with CONGRID? [message #75807] Sun, 01 May 2011 19:10
JP is currently offline  JP
Messages: 55
Registered: April 2008
Member
Hi IDLers,

I think I came across a bug with CONGRID, but I'll be happy to be shown wrong.

in the following example all goes as expected:

a = lindgen(95, 74)
b = congrid(a, 95*10, 74*10)
Histo_b = Histogram(b, BINSIZE=1)
help, b
minmax, Histo_b

I get:
B LONG = Array[950, 740]
100 100

so far, so good, b is an array 10 times larger and wider than a and all the elements of a are repeated 100 times in b.

now I change the size of the array a:

a = lindgen(958, 745)
b = congrid(a, 958*10, 745*10)
Histo_b = Histogram(b, BINSIZE=1)
help, b
minmax, Histo_b

This time I get:
B LONG = Array[9580, 7450]
90 120

the size of b is OK, but there are some elements repeated 90 times and some others repeated 120 times!!?? I was expecting again 100 and 100.

If I go a bit further and do:
Histo_b = REFORM(histo_b, 958, 745)
cgIMAGE, histo_b, SCALE=1

I can see that the values of a repeated 90 times (instead as 100 as expected) are in two columns to the right and the values repeated 120 times are in the last column to the right...


Is there anything wrong with CONGRID or I am missing something there?

This is happening in IDL 8.0 and also in IDL 6.1

cheers

JP
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Object-Graphics: How to compute screen XY from model XY
Next Topic: Re: something (wrong?) with CONGRID?

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

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

Total time taken to generate the page: 0.00526 seconds