[ifit-users] ifit - a fits.m function correction

farhi farhi at ill.fr
Sat Mar 23 17:34:15 CET 2019


Hello Jiri,

many thanks for reporting and finding fix to iFunc/fits with additional 
parameters. This has been pushed to the repo.

The current repo is not stabilized these days, as I'm changing the way 
importers are made available to iLoad. Also, I'm working hard to 
dramatically improve the data set handling speed. The current iData 
objects are slow to load, check and manipulate.

Cheers, Emmanuel.

Le 2019-03-22 13:43, Jiri Novak a écrit :
> _________________________________________________________________
> 
>  WARNING: Viruses are often found in attached files of type
>  document (.xls .doc etc.) and compressed (.zip .rar etc.).
>  Please be EXTREMELY careful when opening this kind of file.
>  In case of doubt, please contact the sender for confirmation.
> 
> Dear Emmanuel,
> I'm writing regarding a possible deficiency in the fits.m script of
> the iFit package and a possible correction for the (supposed)
> malfunction.
> 
> Symptoms:
> The reported behaviour concerns iFit versions 1.9 and 2.0.1. Having
> Matlab 2017a.
> It seems that one cannot fit data with a model taking additional
> arguments beyond parameters  (e.g. say additional parameters, which
> are never fitted). To check that, please find attached a simple pair
> of scripts (a model Gauss2ConstArg.m and the initialization script of
> the fit init_Gauss2ConstArg.m).
> 
> The possibility of the usage of additional parameters of the model
> function and the fits function is documented at
> http://ifit.mccode.org/Fit.html#mozTocId345729
> 
> A solution:
> A small change in the "Objects/@iFunc/fits.m" script corrects for the 
> problem:
> Line 486 of Objects/@iFunc/fits.m (iFit version 1.9
> Replace
>  % [output.modelValue, model] = feval(model, pars2, a.Axes{:});    %
> this also changed pars_out into iFunc
> 
> with
> [output.modelValue, model] = feval(model, pars2,
> a.Axes{:},varargin{:}); % this also changed pars_out into iFunc
> 
> the command is few lines (10 or so) further in iFit 2.0.1 (I do not
> have the version installed, just have corrected the problem at master
> student computer a hour ago)
> 
> Now calling of iFit and of models with additional parameters seems to 
> work fine.
> 
> Otherwise, let me thank you for the iFit package - I like it very
> much. Great work !
> 
> Best wishes,
> Jiri

-- 
FARHI Emmanuel <farhi at ill.fr>
Groupe DS/CS, ILL4/156, Tel (33) 4 76 20 71 35
ILL, Grenoble


More information about the ifit-users mailing list