Breaking on Math Warnings? [message #13880] |
Thu, 07 January 1999 00:00  |
Scott Norton
Messages: 6 Registered: October 1998
|
Junior Member |
|
|
Can anyone tell me how to have a program "break" on math warnings in
IDL?
For instance, if Gauss2Dfit doesn't converge, how can I "respond" to
that warning?
Or,
If I get a "% Program caused arithmetic error: Floating underflow", how
do I "check"
for this?
The CATCH procedure explicitely says that it does not "catch" these
types of errors...
"Calling CATCH establishes an error handler for the current procedure
that intercepts all errors that can be handled by IDL, excluding
non-fatal warnings such as math errors."
Thanks!
-Scott
Scott_Norton@surromed.com
|
|
|
Re: Breaking on Math Warnings? [message #14023 is a reply to message #13880] |
Fri, 08 January 1999 00:00  |
Dr. G. Scott Lett
Messages: 14 Registered: February 1998
|
Junior Member |
|
|
check_math() won't report convergence errors. It only reports your computer
system's integer and floating point errors.
If you want to see what gauss2dfit does in the event of non-convergence, you
can read the source code (gauss2df.pro ?) in the library. You'll probably
need to read the required curvefit.pro as well.
Good hunting
--
G. Scott Lett, Ph.D.
Scientific Computing, Numerical Analysis
slett@holistiicmath.com
Scott Norton <norton@optics.rochester.edu> wrote in message
news:36954CB0.75814D7A@optics.rochester.edu...
> I just found the answer to my own question. Sorry for taking up bandwidth.
> The key command to use is CHECK_MATH(). Although I now need to
> see if it works for finding convergence errors as when using the Guass2DFit
> routine
> (convergence errors are not listed in the table of returned math errors
> shown
> in the HELP menu on CHECK_MATH() ).
> -Scott
>
>
|
|
|