comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Voigt funcion in mpfit
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Voigt funcion in mpfit [message #94814] Wed, 25 October 2017 04:15 Go to next message
abc is currently offline  abc
Messages: 46
Registered: March 2011
Member
HI, I have set of data of an absorption spectra and I want to fit the voigt profile using mpfit. The function I am using is http://www.heliodocs.com/php/xdoc_print.php?file=$SSW/yohkoh /ucon/idl/metcalf/voigt.pro
But I am getting error as
GDL> res=mpfit('voigt',p0,functargs=fa)
% VOIGT: function VOIGT takes 2 params: 'Result = VOIGT(A,U)'
% Execution halted at: MPFIT_CALL_FUNC_EXTRA 1396 /home/abc/Documents/gdl/pro/pro/mpfit.pro
% MPFIT_CALL 1439 /home/abc/Documents/gdl/pro/pro/mpfit.pro
% MPFIT 3185 /home/abc/Documents/gdl/pro/pro/mpfit.pro
% $MAIN$
Kindly help
Re: Voigt funcion in mpfit [message #94815 is a reply to message #94814] Wed, 25 October 2017 08:01 Go to previous messageGo to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
It looks the program is using the intrinisc IDL Voigt function which has 2 parameters:

http://www.harrisgeospatial.com/docs/VOIGT.html

--Wayne


On Wednesday, October 25, 2017 at 7:15:59 AM UTC-4, abc wrote:
> HI, I have set of data of an absorption spectra and I want to fit the voigt profile using mpfit. The function I am using is http://www.heliodocs.com/php/xdoc_print.php?file=$SSW/yohkoh /ucon/idl/metcalf/voigt.pro
> But I am getting error as
> GDL> res=mpfit('voigt',p0,functargs=fa)
> % VOIGT: function VOIGT takes 2 params: 'Result = VOIGT(A,U)'
> % Execution halted at: MPFIT_CALL_FUNC_EXTRA 1396 /home/abc/Documents/gdl/pro/pro/mpfit.pro
> % MPFIT_CALL 1439 /home/abc/Documents/gdl/pro/pro/mpfit.pro
> % MPFIT 3185 /home/abc/Documents/gdl/pro/pro/mpfit.pro
> % $MAIN$
> Kindly help
Re: Voigt funcion in mpfit [message #94818 is a reply to message #94814] Wed, 25 October 2017 12:28 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Wednesday, October 25, 2017 at 7:15:59 AM UTC-4, abc wrote:
> HI, I have set of data of an absorption spectra and I want to fit the voigt profile using mpfit. The function I am using is http://www.heliodocs.com/php/xdoc_print.php?file=$SSW/yohkoh /ucon/idl/metcalf/voigt.pro
> But I am getting error as
> GDL> res=mpfit('voigt',p0,functargs=fa)
> % VOIGT: function VOIGT takes 2 params: 'Result = VOIGT(A,U)'

First of all, the VOIGT you linked to is a procedure, not a function. MPFIT only works with functions, not procedures. It tries to call VOIGT() as a function, and it gets the system version. Is that what you want?

Second of all, VOIGT has two inputs. How are those meant to be passed? You don't show it in your example.

Third, where is the data? What you showed is just a bare call to VOIGT. Don't you want to compare the VOIGT function results to some data? MPFIT() by itself wants you to compute the residuals. Or, if you don't want to do that, you can use MPFITFUN instead, but you still need data.

Fourth, what are the parameters? Are you trying to solve for A and V?

Craig
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Voigt funcion in mpfit
Next Topic: IDLDE with ubuntu16.04 trouble the windows

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:13:48 PDT 2025

Total time taken to generate the page: 0.00440 seconds