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

Home » Public Forums » archive » Interesting IDLgrContour 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
Interesting IDLgrContour Bug [message #21813] Tue, 19 September 2000 00:00 Go to next message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Hi Folks,

I ran into an interesting little IDLgrContour bug today
that gave me a few hours of fun. Apparently, the
contour algorithm cannot see positive data that is less
than 1. As a result, it reports the contour range incorrectly.
Here is a very short example:

; Create test data.
data = Dist(40)

; Normalize the Y values from 20 to 39 to be less than 0.
data[*,20:39] = data[*,20:39]/Max(data)

; Create contour plot.
x = findgen(40)
y = findgen(40)
theContour = Obj_New('IDLgrContour', data, Geomx=x, Geomy=y)

; Get the Y range of the data.
theContour->GetProperty, YRange=theBadRange

; Print it. Expect 0 to 39.

Print, theBadRange
0.000000 19.8495

Whoops! Of course, this will cause the scaling to be
completely off when you go to put the plot into your
view.

The work around is to get the contour range from
the X and Y vectors. I don't think too many people
will run into this, but it can be distracting. :-)

I've tested this in IDL 5.3.1 and IDL 5.4 beta on
Windows NT 4.0.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Interesting IDLgrContour Bug [message #21855 is a reply to message #21813] Sat, 23 September 2000 00:00 Go to previous message
Harold Cline is currently offline  Harold Cline
Messages: 13
Registered: September 2000
Junior Member
Thank you very much for understanding and also for being persistent in
plowing through this with us.

Have a great weekend,
Harold Cline, RSI

David Fanning wrote:
>
> Harold Cline (harold@rsinc.com) writes:
>
>> The bug itself is already being investigated, I wanted to follow-up on
>> the customer service issue.
>>
>> Upon investigating the reply, I find that it was simply a
>> miscommunication. My apologies to David if he felt he was being brushed
>> aside. The tech support engineer intended to convey that it is beyond
>> the scope of technical support to address a bug when it is presented
>> within a large section of code or an application. In order to
>> effectively deal with the bug, we need to be presented with the smallest
>> possible case or example which illustrates the bug. Please refer to
>> this tech tip for details:
>> http://www.researchsystems.com/services/output.cfm?tip_id=29 88.
>>
>> I apologize for this misundertanding and am in turn following up with
>> technical support to make sure that we do not cause a similar
>> misunderstanding in the future.
>
> The misunderstanding was probably entirely my fault.
> I discovered the problem in an IDL graphics objects
> program, which--as anyone who has written one knows--
> can be quite large. However, the suspect code was
> quite small and isolated to just 8-10 lines in the
> larger program. I wrote a small test program to
> illustrate the differences between the object program
> and identical code in a direct graphics contour plot,
> and I offered an explanation of what I thought was the
> problem with the IDLgrContour object.
>
> But what I probably failed to do was indicate as clearly
> as I could have where the isolated code was in the
> larger program. I frankly don't blame the engineer
> for telling me to spend some more time on it. I think
> I would have done the same thing under the circumstances.
>
> Subsequent discussions with RSI engineers about the
> problem have, of course, proved once again that nothing
> with computer software is as simple as it seems. But
> I think we have all come to a better understanding of
> what the problem is. I now understand *why* the problem
> occurs and can see that RSI has reasonable arguments
> for how the contour object works. I think I demonstrated
> to their satisfaction that under particular circumstances
> their approach doesn't produce the expected result. I'm
> perfectly satisfied now that we both understand one another.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
Re: Interesting IDLgrContour Bug [message #21856 is a reply to message #21813] Sat, 23 September 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Harold Cline (harold@rsinc.com) writes:

> The bug itself is already being investigated, I wanted to follow-up on
> the customer service issue.
>
> Upon investigating the reply, I find that it was simply a
> miscommunication. My apologies to David if he felt he was being brushed
> aside. The tech support engineer intended to convey that it is beyond
> the scope of technical support to address a bug when it is presented
> within a large section of code or an application. In order to
> effectively deal with the bug, we need to be presented with the smallest
> possible case or example which illustrates the bug. Please refer to
> this tech tip for details:
> http://www.researchsystems.com/services/output.cfm?tip_id=29 88.
>
> I apologize for this misundertanding and am in turn following up with
> technical support to make sure that we do not cause a similar
> misunderstanding in the future.

The misunderstanding was probably entirely my fault.
I discovered the problem in an IDL graphics objects
program, which--as anyone who has written one knows--
can be quite large. However, the suspect code was
quite small and isolated to just 8-10 lines in the
larger program. I wrote a small test program to
illustrate the differences between the object program
and identical code in a direct graphics contour plot,
and I offered an explanation of what I thought was the
problem with the IDLgrContour object.

But what I probably failed to do was indicate as clearly
as I could have where the isolated code was in the
larger program. I frankly don't blame the engineer
for telling me to spend some more time on it. I think
I would have done the same thing under the circumstances.

Subsequent discussions with RSI engineers about the
problem have, of course, proved once again that nothing
with computer software is as simple as it seems. But
I think we have all come to a better understanding of
what the problem is. I now understand *why* the problem
occurs and can see that RSI has reasonable arguments
for how the contour object works. I think I demonstrated
to their satisfaction that under particular circumstances
their approach doesn't produce the expected result. I'm
perfectly satisfied now that we both understand one another.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Interesting IDLgrContour Bug [message #21857 is a reply to message #21813] Sat, 23 September 2000 00:00 Go to previous message
Harold Cline is currently offline  Harold Cline
Messages: 13
Registered: September 2000
Junior Member
Hi David & Pavel,

The bug itself is already being investigated, I wanted to follow-up on
the customer service issue.

Upon investigating the reply, I find that it was simply a
miscommunication. My apologies to David if he felt he was being brushed
aside. The tech support engineer intended to convey that it is beyond
the scope of technical support to address a bug when it is presented
within a large section of code or an application. In order to
effectively deal with the bug, we need to be presented with the smallest
possible case or example which illustrates the bug. Please refer to
this tech tip for details:
http://www.researchsystems.com/services/output.cfm?tip_id=29 88.

I apologize for this misundertanding and am in turn following up with
technical support to make sure that we do not cause a similar
misunderstanding in the future.

Best Regards,
Harold Cline
IDL Product Manager

Pavel Romashkin wrote:

> Harold Cline wrote:
>>
>> I will be investigating this.
>
> Investigating the reply or the bug, Harold? :-)
>
> No offense meant. I'm afraid I'm addicted to IDL, too :-(
>
> Cheers,
> Pavel
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: ASSOC
Next Topic: Announcement from RSI

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

Current Time: Fri Oct 10 00:22:37 PDT 2025

Total time taken to generate the page: 0.00842 seconds