Search code examples
functionruntime-erroridl-programming-language

IDL function GAUSSFIT.pro error


I'm trying to use the built-in IDL function gaussfit.pro, and every time I try, I get the following error:

% Keyword parameters not allowed in call. 
% Execution halted at: $MAIN$

I'm only trying to get the function to work right now, so I'm just running the sample code from the gaussfit help file, which calls the function like so:

yfit = GAUSSFIT(x, y, coeff, NTERMS=nterms)

This call doesn't even include a keyword parameter, so I'm baffled. I've also tried calling it with keywords set (e.g. NTERMS=nterms), and I get the same error.

I have IDL version 8.3.0, if that make a difference. If anyone could help, I would really appreciate it!


Solution

  • I'm wondering if you are getting the correct GAUSSFIT. Maybe you have a third party library in your !path that has a GAUSSFIT routine? Check with:

    IDL> print, file_which('gaussfit.pro')
    

    or, after attempting to call GAUSSFIT:

    IDL> help, /source
    

    The docs don't indicate that anything in GAUSSFIT has changed since IDL 8.3, so you should be OK there.