X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 22 Sep 2012 06:24 PM by  anon
Serious problem of IDL
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
22 Sep 2012 06:24 PM
    Here is a tiny snippet I used to test the speed of IDL. Originally I thought it would be slow. However it turned out that it was even worse: IDL didn't give correct result! Code: x = interpol([-10d, 10d] * !dpi, 1d8) y = sin(x) t1 = systime(/sec) plot, x, y t2 = systime(/sec) print, t2 - t1 The code is supposed to plot a sine curve between -10pi and 10pi. However, the *plot* procedure only gave less than 2 cycles of the correct curve (about 20% of the whole curve). My platform is IDL 8.2 + OS X 10.8 (Mountain Lion).

    Deleted User



    New Member


    Posts:
    New Member


    --
    05 Oct 2012 04:27 PM
    Dear Jianbao, Your line of code works fine in Windows 7 64bit. I have tried it in a iMac 64bit with 10.8 and the result is good as well. I'm wondering if you need to upgrade the X11 version (Xquartz 2.7.4)?. Cheers, Fernando Exelis VIS

    Deleted User



    New Member


    Posts:20
    New Member


    --
    08 Oct 2012 07:38 AM
    Dear Fernando, I was quite curious to see Exelis Vis' response to this question, for the line of code doesn't work on my station either. I'm running IDL 8.2 on a Windows 7, 64bit machine (Intel Xeon E5620, 12 GB RAM). So, how's that possible? Cheers, Wouter

    Deleted User



    New Member


    Posts:33
    New Member


    --
    15 Oct 2012 02:30 PM
    The problem is in interpol(), in the findgen() call. If findgen() is replaced with dindgen() in the interpol routine, then your results work. The math is a bit strange, too. I don't know why they subtract 1.0 from nout in the denominator; seems better mathematically to subtract 1 which the long nout (or long long, I guess) can deal with.

    Deleted User



    New Member


    Posts:33
    New Member


    --
    15 Oct 2012 02:50 PM
    In fact, for my version/OS of IDL, findgen stops incrementing at index 16777216; I'm on a MacOSX Lion, IDL is 8.0.
    You are not authorized to post a reply.