IDL 5.1.1 TRIANGULATE (spherical) bug [message #13014] |
Fri, 25 September 1998 00:00 |
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
|
|
|