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

Home » Public Forums » archive » Re: No enough valid points...
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
Re: No enough valid points... [message #58890] Tue, 26 February 2008 08:29
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
Lasse Clausen wrote:
> On 26 Feb, 16:28, David Fanning <n...@dfanning.com> wrote:
>> Lasse Clausen writes:
>>> I get from time to time the following error message:
>>
>>> IDL: PLOT: Not enough valid and unique points specified.
>>> IDL: Execution halted at: PLOT_ACE_MFI 76 /home/lbnc1/idl_lib/
>>> graphics/plot_ace_mfi.pro
>>> IDL: $MAIN$
>>> IDL: Program caused arithmetic error: Floating illegal operand
>>
>>> Is there a simple way (maybe a compile_opt?) so that this is not an
>>> error and that execution of the program does not stop? Just warn me,
>>> plot an empty coordinate system and continue.
>>
>> Could be time to learn about that CATCH error handling
>> built into IDL. ;-)
>>
>> Cheers,
>>
>> David
>>
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.dfanning.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
> Didn't think of error handling since I still don't think it's an
> error. Good old "I don't see, therefore it's not there"-approach...
>
> Moempf, and even if I use CATCH I still need to include a certain
> block of code in every plot routine I have - and all that to catch an
> error that isn't one. So what if I want to plot only NaNs?
You can split the plot command in two:

plot,[0,0],/nodata, [other graphic keywords]
oplot,x,y
this works even if x and y are array of NaNs!

Ciao,
Paolo
> How's that
> different from wanting to divide by zero or by NaNs? Which, I might
> add here, will not produce an error.
>
> Not happy
> Lasse Clausen
Re: No enough valid points... [message #58894 is a reply to message #58890] Tue, 26 February 2008 07:46 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Lasse Clausen writes:

> Didn't think of error handling since I still don't think it's an
> error. Good old "I don't see, therefore it's not there"-approach...
>
> Moempf, and even if I use CATCH I still need to include a certain
> block of code in every plot routine I have - and all that to catch an
> error that isn't one.

Yeah, always a hurdle to get over. Having children
helps. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: No enough valid points... [message #58897 is a reply to message #58894] Tue, 26 February 2008 07:37 Go to previous message
lasse is currently offline  lasse
Messages: 48
Registered: February 2007
Member
On 26 Feb, 16:28, David Fanning <n...@dfanning.com> wrote:
> Lasse Clausen writes:
>> I get from time to time the following error message:
>
>> IDL: PLOT: Not enough valid and unique points specified.
>> IDL: Execution halted at: PLOT_ACE_MFI 76 /home/lbnc1/idl_lib/
>> graphics/plot_ace_mfi.pro
>> IDL: $MAIN$
>> IDL: Program caused arithmetic error: Floating illegal operand
>
>> Is there a simple way (maybe a compile_opt?) so that this is not an
>> error and that execution of the program does not stop? Just warn me,
>> plot an empty coordinate system and continue.
>
> Could be time to learn about that CATCH error handling
> built into IDL. ;-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Didn't think of error handling since I still don't think it's an
error. Good old "I don't see, therefore it's not there"-approach...

Moempf, and even if I use CATCH I still need to include a certain
block of code in every plot routine I have - and all that to catch an
error that isn't one. So what if I want to plot only NaNs? How's that
different from wanting to divide by zero or by NaNs? Which, I might
add here, will not produce an error.

Not happy
Lasse Clausen
Re: No enough valid points... [message #58898 is a reply to message #58897] Tue, 26 February 2008 07:28 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Lasse Clausen writes:

> I get from time to time the following error message:
>
> IDL: PLOT: Not enough valid and unique points specified.
> IDL: Execution halted at: PLOT_ACE_MFI 76 /home/lbnc1/idl_lib/
> graphics/plot_ace_mfi.pro
> IDL: $MAIN$
> IDL: Program caused arithmetic error: Floating illegal operand
>
> Is there a simple way (maybe a compile_opt?) so that this is not an
> error and that execution of the program does not stop? Just warn me,
> plot an empty coordinate system and continue.

Could be time to learn about that CATCH error handling
built into IDL. ;-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL7 content-assist - I want lower case
Next Topic: Re: Images with coordinate axes, log scale etc.

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

Current Time: Wed Oct 08 20:03:14 PDT 2025

Total time taken to generate the page: 0.00923 seconds