View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

How to ignore “ERROR: floating point operation”

h8tsgnah8 wrote on Feb 17, 2011

When running a script which implements the "imexamine" function and the circular photometry function "a", occasionally a pixel in an image returns the error quoted in the title. This error causes the script to close down completely. I was wondering if there was a way to "ignore" this error or to turn off similar error reports such that the script would keep going regardless. If this is possible is it advisable? Can it cause problems with the iraf program?
Incase it is important, I'm running iraf 2.14.1 in conjunction with DS9 on the Ubuntu 10.04 "lucid lynx" system. If there are any other details needed then please ask.

Mike Fitzpatrick wrote on Feb 17, 2011

See the file $iraf/pkg/ecl/Notes.ecl in your IRAF system, specifically the "Trapping Errors" section. The ECL allows you to trap the errors and take some action as a result, but you'll have to decide yourself whether you can continue processing or need to move on to the next image. If an error is detected, issuing a 'flpr command will remove a corrupted binary from the process cache, however also be careful of commands that modify their input image since this may not be recoverable.

An FPE error is sometimes data-related, it is also sometime a coding error. In the long run it would be good to find the actual cause and fix it rather than trying to work around the problem.

Last post on Feb 17, 2011