mpfitevalexpr not compiled [message #86084] |
Wed, 02 October 2013 02:30  |
Mats Löfdahl
Messages: 263 Registered: January 2012
|
Senior Member |
|
|
I'm using Craig Markwardt's mpfitexpr and I'm trying to use also the companion function mpevalexpr. The problem is that after using mpfitexpr, mpevalexpr is not compiled.
My program stops with the error message:
% Variable is undefined: MPEVALEXPR.
However, right after the program has stopped, I can use it:
IDL> ys = mpevalexpr(fitexpr, xc, p)
And this is happens (and gives reasonable output) without IDL saying anything about compiling mpevalexpr at that point.
From what I understand, mpevalexpr should automatically be compiled when mpfitexpr is used for the first time, since the two functions are in the same file:
IDL> print,routine_info('mpfitexpr',/source,/func)
{ MPFITEXPR /home/mats/idl/bin/markwardt/mpfit/mpfitexpr.pro}
IDL> print,routine_info('mpevalexpr',/source,/func)
{ MPEVALEXPR /home/mats/idl/bin/markwardt/mpfit/mpfitexpr.pro}
I'm wondering if this has to do with mpfitexpr apparently being part of the IDL distribution, while mpevalexpr is not? Judging from the documentation this seems to be the case, since this only the first of the following two web pages exists:
http://www.exelisvis.com/docs/MPFITEXPR.html
http://www.exelisvis.com/docs/MPEVALEXPR.html
However, in my !path, /home/mats/idl/bin/markwardt/mpfit/ appears before any of the /usr/local/rsi/idl_7.1/... entries so I'm not sure why this would matter. Also, the output from routine_info above suggests that it is /home/mats/idl/bin/markwardt/mpfit/mpfitexpr.pro that is compiled.
So I'm confused. Why is mpevalexpr not available right away, why can it be used right after the program stops, and what can I do to avoid the problem?
I'm using IDL Version 7.1.1.
|
|
|