Search code examples
idl-programming-language

Error when using acre.pro routine: "Programs can't be compiled from single statement mode"


I am trying to use acre.pro routine. It is a cosmic ray extraction program used to identify and remove cosmic ray strikes from an image. Here is an excerpt from the documentation of the routine (https://www.boulder.swri.edu/~buie/idl/pro/acre.html)

CALLING SEQUENCE:
;  pro acre,dirty_im,clean_im,thresh,width
INPUTS:
;  dirty_im - Original input image to be cleaned.
;  thresh   - Deviation threshold, in sigma, from background to cause
;                pixel to be fixed.
;  width    - Median smoothing width to get local background reference.
OUTPUTS:
;  clean_im - Final cleaned up image.

I followed the above procedure to use this program, however, IDL gives me two errors:

"Syntax Error" and "Programs can't be compiled from single statement mode."

Here is two of the many things that I've tried and the errors that I got:

IDL> pro acre ,'N1487262225_2cal.IMG','cosmic_clean.IMG',3,7

pro acre ,'N1487262225_2cal.IMG','cosmic_clean.IMG',3,7
           ^
% Syntax error.


IDL> pro acre ,N1487262225_2.IMG,cosmic_clean.IMG,3,7

pro acre ,N1487262225_2.IMG,cosmic_clean.IMG,3,7
                            ^
% Programs can't be compiled from single statement mode.

pro acre ,N1487262225_2.IMG,cosmic_clean.IMG,3,7
                            ^
% Programs can't be compiled from single statement mode.

pro acre ,N1487262225_2.IMG,cosmic_clean.IMG,3,7
                            ^
% Syntax error.

Solution

  • Try:

    IDL> acre, 'N1487262225_2cal.IMG', 'cosmic_clean.IMG', 3, 7