bug in CONTOUR [message #4416] |
Wed, 31 May 1995 00:00  |
paul
Messages: 22 Registered: June 1991
|
Junior Member |
|
|
I've discovered a bug in CONTOUR which occurs when you try to use
keywords C_LABEL and DOWNHILL at the same time. The bug has the
unfortunate side effect of corrupting your IDL session. So far it looks
like the bug is independent of platform -- it occurs on either our
DECSTATION or ALPHA workstations. Has anybody else ran across this
one? Does anyone know if its fixed in version 4.0?
Here is the session log: [IDL. Version 3.6 (ultrix mipsel)]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;
IDL> lev=indgen(14) & c_label=replicate(0,14)
IDL> contour,dist(20),levels=lev,/down ; works fine
IDL> contour,dist(20),levels=lev,c_label=c_label ; works fine
IDL> contour,dist(20),levels=lev,/down,c_label=c_label ; bombs out
% Array has a corrupted descriptor: <No name>. ; IDL dumps core
% Execution halted at $MAIN$ (CONTOUR). ; if you try to
; do more work
____________________________________________________________ _______________
Paul Ricchiazzi email: paul@icess.ucsb.edu
Institute for Cumputational Earth System Science
University of California, Santa Barbara
If I have seen farther than | If I have not seen as far as
others, it is by standing on | others, it is because giants
the shoulders of giants. | were standing on my shoulders.
|
Isaac Newton | Hal Abelson
____________________________________________________________ _______________
--
____________________________________________________________ _______________
Paul Ricchiazzi email: paul@icess.ucsb.edu
Institute for Cumputational Earth System Science
University of California, Santa Barbara
If I have seen farther than | If I have not seen as far as
others, it is by standing on | others, it is because giants
the shoulders of giants. | were standing on my shoulders.
|
Isaac Newton | Hal Abelson
____________________________________________________________ _______________
|
|
|
Re: bug in CONTOUR [message #4419 is a reply to message #4416] |
Wed, 31 May 1995 00:00   |
afl
Messages: 51 Registered: December 1994
|
Member |
|
|
In article <3qichn$90t@ucsbuxb.ucsb.edu>, paul@crseo.ucsb.edu (Paul Ricchiazzi)
writes:
|>
|>
|> I've discovered a bug in CONTOUR which occurs when you try to use
|> keywords C_LABEL and DOWNHILL at the same time. The bug has the
|> unfortunate side effect of corrupting your IDL session. So far it looks
|> like the bug is independent of platform -- it occurs on either our
|> DECSTATION or ALPHA workstations. Has anybody else ran across this
|> one? Does anyone know if its fixed in version 4.0?
|>
|>
|> Here is the session log: [IDL. Version 3.6 (ultrix mipsel)]
|>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;
|>
|>
|> IDL> lev=indgen(14) & c_label=replicate(0,14)
|>
|> IDL> contour,dist(20),levels=lev,/down ; works fine
|>
|> IDL> contour,dist(20),levels=lev,c_label=c_label ; works fine
|>
|> IDL> contour,dist(20),levels=lev,/down,c_label=c_label ; bombs out
|> % Array has a corrupted descriptor: <No name>. ; IDL dumps
|> core
|> % Execution halted at $MAIN$ (CONTOUR). ; if you try to
|> |> ; do more
|> work
Or maybe IDL is confused about your use of the c_label keyword.
If all elements are zero, why not just omit the c_label keyword?
To test my theory, make c_label(3)=1 and re-run your code!
--
Andrew F. Loughe email: afl@cdc.noaa.gov
University of Colorado, CIRES voice: (303) 492-0707
Campus Box 449 fax: (303) 497-7013
Boulder, CO 80309-0449 USA
|
|
|
Re: bug in contour [message #36072 is a reply to message #4416] |
Tue, 19 August 2003 10:06   |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
R.G. Stockwell wrote:
> So, the combo of
> 1) xylog=1,
> 2) /fill or /cell,
> 3) particular range of values (i.e. it almost looks like there are no
> major ticks being plotted
Good idea
a workaround is to use ytickv and yticks. Then they are major ticks.
pro test_contour
erase
loadct,15
x=findgen(100)
y=findgen(100)/99.*70+20
z=findgen(100,100)
CONTOUR,z,x,y,/ylog,ystyle=1,/fill,ytickv=[20,30,40,50],ytic ks=3
end
Reimar
>
> cause a bug in the axis labelling
>
> IDL 6.0, win2000
>
> -bob
--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
|
|
|
Re: bug in contour [message #36073 is a reply to message #4416] |
Tue, 19 August 2003 09:55   |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Richard G. French wrote:
> On 8/19/03 11:11 AM, in article bhteob$a6fd$1@zam602.zam.kfa-juelich.de,
> "Reimar Bauer" <R.Bauer@fz-juelich.de> wrote:
>
>> Richard G. French wrote:
>>
>>> On 8/19/03 9:08 AM, in article bht7hc$akln$1@zam602.zam.kfa-juelich.de,
>>> "Reimar Bauer" <R.Bauer@fz-juelich.de> wrote:
>>>
>>>> Dear all,
>>>>
>>>>
>>>> we found a special bug in contour.
>>>>
>>>> We can't explain where the 1.3 at the yaxis comes from.
>>>>
>>>> This happens only by /fill not by fill=0 and not by /cell_fill.
>>>>
>>>> The value is alog10 of yrange[0]. If you change the yrange starting at
>>>> 40 then it is 1.6
>>>>
>>>> I have informed CREASO too.
>>>>
>>>> regards
>>>>
>>>> Reimar
>>> I'm missing something, Reimar. I just ran test_contour and I don't get
>>> any contours on the screen at all. I'm not sure what you mean by the 1.3
>>> at the y axis - I get no labels at all on the axis tick marks - just the
>>> words 'test' along each axis. Please let me/us know how to illustrate
>>> the bug you mentioned.
>>>
>>> Dick French
>>
>> Dear Dick,
>>
>> this result which you desribe for the axis I would expect to have too but
>> I haven't.
>>
>> I believe you see no contours because you'll have no default colortable
>> loaded. I missed to add a line to load a colortable.
>>
>> I see on the xaxis no ticklabels only a title and on the y axis I got
>> one ticklabel the 1.3 and two times a title with a small distance.
>>
>> We have tried idl5.6 windows and idl6.0 beta Linux. Both the same
>> results.
>>
>> regards
>>
>> Reimar
>>
>
> Dear Reimar - tried it again, loading a color table first. Still get the
> same result: no tick labels on either axis, and no contours. I am running
> IDL6.0 on Mac OS X10.2.
>
> Dick
Dear Dick,
that's good news and bad news. This seems to be another bug. What happens by
this example:
pro test_contour
erase
loadct,15
x=findgen(100)
y=findgen(100)/99.*70+20
z=findgen(100,100)
CONTOUR,z,x,y, /ylog,ystyle=1,/fill
end
I see 1.3 in the middle of yaxis and filled contures.
Reimar
--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
|
|
|
Re: bug in contour [message #36074 is a reply to message #4416] |
Tue, 19 August 2003 09:41   |
Richard French
Messages: 173 Registered: December 2000
|
Senior Member |
|
|
On 8/19/03 11:11 AM, in article bhteob$a6fd$1@zam602.zam.kfa-juelich.de,
"Reimar Bauer" <R.Bauer@fz-juelich.de> wrote:
> Richard G. French wrote:
>
>> On 8/19/03 9:08 AM, in article bht7hc$akln$1@zam602.zam.kfa-juelich.de,
>> "Reimar Bauer" <R.Bauer@fz-juelich.de> wrote:
>>
>>> Dear all,
>>>
>>>
>>> we found a special bug in contour.
>>>
>>> We can't explain where the 1.3 at the yaxis comes from.
>>>
>>> This happens only by /fill not by fill=0 and not by /cell_fill.
>>>
>>> The value is alog10 of yrange[0]. If you change the yrange starting at 40
>>> then it is 1.6
>>>
>>> I have informed CREASO too.
>>>
>>> regards
>>>
>>> Reimar
>> I'm missing something, Reimar. I just ran test_contour and I don't get any
>> contours on the screen at all. I'm not sure what you mean by the 1.3 at
>> the y axis - I get no labels at all on the axis tick marks - just the
>> words 'test' along each axis. Please let me/us know how to illustrate the
>> bug you mentioned.
>>
>> Dick French
>
> Dear Dick,
>
> this result which you desribe for the axis I would expect to have too but I
> haven't.
>
> I believe you see no contours because you'll have no default colortable
> loaded. I missed to add a line to load a colortable.
>
> I see on the xaxis no ticklabels only a title and on the y axis I got
> one ticklabel the 1.3 and two times a title with a small distance.
>
> We have tried idl5.6 windows and idl6.0 beta Linux. Both the same results.
>
> regards
>
> Reimar
>
Dear Reimar - tried it again, loading a color table first. Still get the
same result: no tick labels on either axis, and no contours. I am running
IDL6.0 on Mac OS X10.2.
Dick
|
|
|
|
|
Re: bug in contour [message #36078 is a reply to message #4416] |
Tue, 19 August 2003 07:49   |
R.G. Stockwell
Messages: 363 Registered: July 1999
|
Senior Member |
|
|
"Reimar Bauer" <R.Bauer@fz-juelich.de> wrote in message
news:bht7hc$akln$1@zam602.zam.kfa-juelich.de...
> Dear all,
>
>
> we found a special bug in contour.
>
> We can't explain where the 1.3 at the yaxis comes from.
>
> This happens only by /fill not by fill=0 and not by /cell_fill.
>
> The value is alog10 of yrange[0]. If you change the yrange starting at 40
> then it is 1.6
>
> I have informed CREASO too.
>
> regards
>
> Reimar
Yep, it quacks like a bug.
It seems that the ytickname is being ignored in that situation.
Also, I do see the same type of problem with the /cell keyword
(the following prints "19" on the y-axis, and not where the y-axis should
have a value of 19).
pro test_contour
erase
x=findgen(100)
y=findgen(100)/99.*70+20
z=randomn(seed,100,100) ;random looks pretty imho
CONTOUR,z,x,y,ylog=1,/cell
end
also interesting,
> CONTOUR,z,x,y,ylog=1,yr=[16,90],/cell,ytickname=string(findg en(10))
prints a "16"
> CONTOUR,z,x,y,ylog=1,yr=[17,90],/cell,ytickname=string(findg en(10))
prints "17"
> CONTOUR,z,x,y,ylog=1,yr=[18,90],/cell,ytickname=string(findg en(10))
printms "18"
> CONTOUR,z,x,y,ylog=1,yr=[19,90],/cell,ytickname=string(findg en(10))
also prints "18"
> CONTOUR,z,x,y,ylog=1,yr=[20,90],/cell,ytickname=string(findg en(10))
prints "19"
> CONTOUR,z,x,y,ylog=1,yr=[22,90],/cell,ytickname=string(findg en(10))
prints,"20"
> CONTOUR,z,x,y,ylog=1,yr=[10,90],/cell,ytickname=string(findg en(10))
behaves as expected
> CONTOUR,z,x,y,ylog=1,yr=[40,90],/cell,ytickname=string(findg en(10))
prints,"2"
> CONTOUR,z,x,y,ylog=1,yr=[40,100],/cell,ytickname=string(find gen(10))
behaves properly
also, to switch x and y, the bug appears on the x axis
> CONTOUR,z,y,x,xlog=1,xr=[20,90],/cell,ytickname=string(findg en(10))
prints,"19" on the x axis.
So, the combo of
1) xylog=1,
2) /fill or /cell,
3) particular range of values (i.e. it almost looks like there are no major
ticks being plotted
cause a bug in the axis labelling
IDL 6.0, win2000
-bob
|
|
|
|
|
Re: bug in contour [message #36152 is a reply to message #4416] |
Thu, 21 August 2003 06:03  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Chris Lee wrote:
> In article <bhtlgr$ao62$1@zam602.zam.kfa-juelich.de>, "Reimar Bauer"
> <R.Bauer@fz-juelich.de> wrote:
>
>
>> R.G. Stockwell wrote:
>>
>>> So, the combo of
>>> 1) xylog=1,
>>> 2) /fill or /cell,
>>
>>> 3) particular range of values (i.e. it almost looks like there are no
>>> major ticks being plotted
>> Good idea
>> a workaround is to use ytickv and yticks. Then they are major ticks.
>> pro test_contour
>> erase
>> loadct,15
>> x=findgen(100)
>> y=findgen(100)/99.*70+20
>> z=findgen(100,100)
>> CONTOUR,z,x,y,/ylog,ystyle=1,/fill,ytickv=[20,30,40,50],ytic ks=3 end
>> Reimar
>>
>>> cause a bug in the axis labelling
>>> IDL 6.0, win2000
>>> -bob
>>
>
> The bug is caused by IDL plotting in log coordinates for the axis, 1.3
> is alog10(20). Try giving the contour a range between 11 and 99, the
> number you get on the axis is alog10(min_range)
>
> pro contour_test
> x=findgen(100)
> y=findgen(100)/99.*70+20
> z=findgen(100,100)
> number=14
> CONTOUR,z,x,y,/ylog,ystyle=1,/fill,yrange=[number,max(y)]
> ;the axis will show 1.14 for number=14
> end
>
> For some reason, this only happens with when using /fill (I don't see a
> problem using /cell_fill) and when the range is less than one unit in
> log_10 space (1->10,10->100, 100->1000 etc.). Setting 'number=9' above
> fixes the problem, but doesn't lood good.
>
> --
> Chris.
Dear Chris,
someone from CREASO informed me that this bug does not occure with IDL6.0
windows.
with idl6.0beta linux I have this bug.
I will get 6.0 soon. But if you or someone else could confirm this bug in
the 6.0 version then you should do a request to RSI or CREASO.
Reimar
--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
|
|
|
Re: bug in contour [message #36153 is a reply to message #36072] |
Thu, 21 August 2003 01:37  |
Chris Lee
Messages: 101 Registered: August 2003
|
Senior Member |
|
|
In article <bhtlgr$ao62$1@zam602.zam.kfa-juelich.de>, "Reimar Bauer"
<R.Bauer@fz-juelich.de> wrote:
> R.G. Stockwell wrote:
>
>> So, the combo of
>> 1) xylog=1,
>> 2) /fill or /cell,
>
>> 3) particular range of values (i.e. it almost looks like there are no
>> major ticks being plotted
> Good idea
> a workaround is to use ytickv and yticks. Then they are major ticks.
> pro test_contour
> erase
> loadct,15
> x=findgen(100)
> y=findgen(100)/99.*70+20
> z=findgen(100,100)
> CONTOUR,z,x,y,/ylog,ystyle=1,/fill,ytickv=[20,30,40,50],ytic ks=3 end
> Reimar
>
>> cause a bug in the axis labelling
>> IDL 6.0, win2000
>> -bob
>
The bug is caused by IDL plotting in log coordinates for the axis, 1.3
is alog10(20). Try giving the contour a range between 11 and 99, the
number you get on the axis is alog10(min_range)
pro contour_test
x=findgen(100)
y=findgen(100)/99.*70+20
z=findgen(100,100)
number=14
CONTOUR,z,x,y,/ylog,ystyle=1,/fill,yrange=[number,max(y)]
;the axis will show 1.14 for number=14
end
For some reason, this only happens with when using /fill (I don't see a
problem using /cell_fill) and when the range is less than one unit in
log_10 space (1->10,10->100, 100->1000 etc.). Setting 'number=9' above
fixes the problem, but doesn't lood good.
--
Chris.
|
|
|