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

Home » Public Forums » archive » IDL 5.1.1 TRIANGULATE (spherical) bug
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
IDL 5.1.1 TRIANGULATE (spherical) bug [message #13014] Fri, 25 September 1998 00:00
Jonathan Joseph is currently offline  Jonathan Joseph
Messages: 69
Registered: September 1998
Member
Mostly just a warning:

I've told RSI about this. I wonder if it's the
same on other platforms. I'm running hpux 10.20.

It is ironic that I should find a new bug in
TRIANGULATE in 5.1.1, when the only reason I
upgraded from 5.0 in the first place was to
fix a different bug in TRIANGULATE - which it
did. The new bug is really new (ie. not there in 5.0)

The bug only seems to occur when doing a spherical
triangulation with double precision arrays,
and only if you try and pass the first two
arguments (arrays of longitudes and latitudes) as
expressions (created on the fly) - which is exatcly
what SPH_SCAT does to avoid having the original
arrays reorderd

The following line is from SPH_SCAT

TRIANGULATE, 1.0*lon, 1.0*lat, SPHERE=s, tr, FVALUE=fcopy, /DEGREES

try the following code tweaked from the IDL manual

lon = randomu(seed,50) * 360 - 180d
lat = randomu(seed,50) * 180 - 90d
f = dblarr(50) + 1

r = sph_scat(lon,lat,f)

or

triangulate,1.0*lon,1.0*lat,tr,fvalue=f,sphere=s,/degrees

and see if you get the same error:

% Attempt to store into an expression: <DOUBLE Array[50]>.

Yes, I know that there are some simple workarounds,
like re-writing SPH_SCAT to create duplicate arrays
in local variables before calling TRIANGULATE.

I suspect RSI will want to fix this bug in TRIANGULATE

-Jonathan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL 5.1.1 online help - text search messed up
Next Topic: IDL app launched from an icon

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

Current Time: Wed Oct 08 14:52:44 PDT 2025

Total time taken to generate the page: 0.00377 seconds