From farhi at ill.fr Thu Jan 3 12:00:37 2013 From: farhi at ill.fr (Emmanuel FARHI) Date: Thu, 3 Jan 2013 12:00:37 +0100 (CET) Subject: [Ifit-users] iFit-1.3 standalone for Windows 64 bits available Message-ID: Dear iFit users, *** Happy new year ! *** I have just made available the standalone version of iFit-1.3 for Windows 64 bits systems. It was compiled with Matlab 2010a, under Windows7 64 bits. It does not require any Matlab license, and provides a fully functional Matlab environment for free. Get it at . To install it, double click the MCRInstaller64.exe, and once done, extract the iFit-1.3-pcwin64.zip. Then double click the 'ifit' executable program. Cheers, Emmanuel. ps: Other binary standalones are available for Linux, and MacOSX, both 32 and 64 bits. The Linux version has a set of drag-drop icons in /usr/local/ifit/. Try to drag-drop a set of data files on them ! -- FARHI Emmanuel Groupe DS/CS, ILL4/156, Tel 04 76 20 71 35 ILL, Grenoble From farhi at ill.eu Mon Jan 21 11:14:15 2013 From: farhi at ill.eu (Emmanuel FARHI) Date: Mon, 21 Jan 2013 11:14:15 +0100 Subject: [Ifit-users] Problems combining data with iFit: patch attached In-Reply-To: References: Message-ID: <50FD14F7.7080304@ill.eu> Hello Henrik, here is a patch in order to solve the 'combine' bug you reported. Copy the two attached files into iFit/Objects/@iData/private Emmanuel. On 01/21/2013 09:55 AM, Henrik Jacobsen wrote: > Hi Emmanuel > I am trying to combine two data sets from an experiment I am doing, > but I get in trouble - the normalization to monitor is wrong. I > attached the data files. > Here are the commands I use: > old_l2_1=iData('047103'); > old_l2_2=iData('047104'); > old_l2=combine(old_l2_1,old_l2_2) > plot(old_l2_1); hold on > plot(old_l2_2,'r'); > plot(old_l2,'g'); > > As you can see, none of the data are normalised correctly.. > > I hope you can help me. > > Best > > Henrik -- Emmanuel FARHI,www.ill.eu/computing/people/emmanuel-farhi \|/ ____ \|/ CS-Group ILL4/221, Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~ 6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France /_( \__/ )_\ Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 06 \__U_/ -------------- next part -------------- A non-text attachment was scrubbed... Name: iData_private_binary.m Type: text/x-objcsrc Size: 9314 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: iData_interp.m Type: text/x-objcsrc Size: 1762 bytes Desc: not available URL: From farhi at ill.fr Sat Feb 2 15:27:01 2013 From: farhi at ill.fr (Emmanuel FARHI) Date: Sat, 2 Feb 2013 15:27:01 +0100 (CET) Subject: [Ifit-users] 2D model fit in iFit In-Reply-To: <510AC701.4010902@gmail.com> References: <510AC701.4010902@gmail.com> Message-ID: Hello Maria, You should definitely upgrade to iFit 1.3, from which model definitions are much easier, and also allow model arithmetic. Then you can write: >> y.Expression=@(p,x,y)p(1)*(p(3).*x+p(4).*y)+p(2).*p(5).*(p(3).*x.^2+p(4).*y.^2); >> model.Parameters={ 'viscosity' 'density' 'dia1' 'dia2' 'mfactor' }; >> model.Guess = [1e-5 1 2 .2 1e-5]; >> model=iFunc(model); % make it a model function >> plot(model) >> fits(S, model, [], options, [ 1 1 0 0 0 ]) You can also define a new model from existing ones, such as: >> model2 = model+constant The ifitmakefunc will also work to perform the few lines above via a dialogue box. Emmanuel. On Thu, January 31, 2013 20:33, Maria Thomsen wrote: > Dear Emmanuel Farbi, > > I participated in your introductionary course in iFit at the University > of Copenhagen one year ago and have used iFit ever since. > I have now run into a problem with a self-defined model. I have measured > the parameters x,y,p and have the following model expression for p > model='p(1).*(p(3).*x+p(4).*y)+p(2).*p(5).*(p(3).*x.^2+p(4).*y.^2)'; > > I want to make a fit by keeping p(1) and p(2) fixed and use p(3), p(4) > and p(5) as fitting parameters. > I get the error: > > Expression or statement is incorrect--possibly unbalanced (, {, or [. > > Error in ==> iData.ieval at 59 > Info = feval(model,'identify'); % get identification Info, esp. for > Dimension > > Error in ==> iData.fits at 232 > [dummy, info] = ieval(a, model,'identify'); % model info > > Error in ==> mfactor2D_iFit at 70 > [pars, criteria, message, output]=fits(S, model, [guess.p1 guess.p2 > guess.p3 guess.p4 guess.p5], > options, [1 1 0 0 0]); > > I have defined S=iData(x,y,p) > I have also tried to define the model using "ifitmakefunc" (file > attached), but get the same error. > > I have made a test in 1D, with the model > model='p(1).*p(3).*x+p(2).*p(5).*p(3).*x.^2'; and that works fine. > > Hope you can help > > Best regards > > Maria Thomsen > PhD student > University of Copenhagen > -- FARHI Emmanuel Groupe DS/CS, ILL4/156, Tel 04 76 20 71 35 ILL, Grenoble From farhi at ill.fr Mon Feb 4 18:15:45 2013 From: farhi at ill.fr (Emmanuel FARHI) Date: Mon, 4 Feb 2013 18:15:45 +0100 (CET) Subject: [Ifit-users] iFit bug :) In-Reply-To: References: Message-ID: <2b0cde611f672ae623972a4ea577f019.squirrel@195.83.126.17> Hello Sandor, you indded found a bug when plotting final fit results from the 'output' of 'fits'. To solve it, add after line 39 of Libraries/Optimizers/fminplot.m, before the 'else' keyword, [dummy, best] = sort(fvalHistory); % sort in ascending order best= best(1); this should solve the problem. An other way to plot the same thing is to use: >> plot(a, output.modelValue) Thanks for using iFit and reporting issues. Emmanuel. On Mon, February 4, 2013 14:35, Sandor Toth wrote: > Dear Sir/Madamme, > > I get an error message after the following code: > > a=load(iData, [ ifitpath 'Data/sv1850.scn' ]); > options=fminimfil('defaults'); > options.OutputFcn='fminplot'; > > [p,criteria,message,output]= fits(a, gauss, [], options); > > fminplot(output); > > > The error message: > > Undefined function or variable "best". > > Error in fminplot (line 126) > g=plot(iterHistory, fvalHistory,'b-', > > > version(iData) > iFit/iData version 1.3 (Nov. 29, 2012) by E.Farhi, P. Willendrup and > Y.Debab, (c) ILL/DS/CS EUPL. > Matlab version > 8.0.0.783 (R2012b) > > Best regards, > > Sandor Toth > > > > Dr. S?ndor T?th > > Laboratory for Neutron Scattering (LNS) > Paul Scherrer Institute > WHGA 150 > CH-5232 Villigen PSI > Switzerland > > phone: +41 56 310 31 23 > fax: +41 56 310 29 39 > > email: sandor.toth at psi.ch > web: http://www.psi.ch/lns/sandor-toth > > -- FARHI Emmanuel Groupe DS/CS, ILL4/156, Tel 04 76 20 71 35 ILL, Grenoble From farhi at ill.eu Tue Feb 12 16:32:19 2013 From: farhi at ill.eu (Emmanuel FARHI) Date: Tue, 12 Feb 2013 16:32:19 +0100 Subject: [Ifit-users] iFit bug :) In-Reply-To: References: <2b0cde611f672ae623972a4ea577f019.squirrel@195.83.126.17> <474AC6C2-A824-4AE1-8CA9-79C8DBBB45F2@psi.ch> Message-ID: <511A6083.1000709@ill.eu> Hi Sandor, The allocation a(2)=iData(..) should work if 'a' is already an iData array. It does work on the iFit 1.3 release I have... Alternatively you can write >> a=[]; >> a=[ iData(rand(10)) iData(peaks) ]; The labels can be made 'TeX' like by setting the Interpreter to TeX (right click on a label in edit mode (with the Arrow tool from the toolbar). The symbol for 'xi' is '\xi', not '/xi'. Thanks for using iFit and reporting, Emmanuel. On 02/11/2013 12:18 PM, Sandor Toth wrote: > Dear Emmanuel, > > I am working on arrays of iData. Like a = zeros(iData,2,1) > I would like to assign an iData to the second element of the array: > a(2) = iData(rand(10)); > > However this does not work. Is it possible to make such an assignment? > > Best regards, > > Sandor > > > On Feb 5, 2013, at 11:00 AM, Sandor Toth wrote: > >> Is it possible to interpret axis labels as Matlab does? >> Like writing '/xi' string on the x axis is written by the Greek character xi? >> >> Sandor >> >> On Feb 4, 2013, at 6:15 PM, Emmanuel FARHI wrote: >> >>> Hello Sandor, >>> >>> you indded found a bug when plotting final fit results from the 'output' >>> of 'fits'. >>> To solve it, add after line 39 of Libraries/Optimizers/fminplot.m, before >>> the 'else' keyword, >>> >>> [dummy, best] = sort(fvalHistory); % sort in ascending order >>> best= best(1); >>> >>> this should solve the problem. >>> >>> An other way to plot the same thing is to use: >>> >>>>> plot(a, output.modelValue) >>> Thanks for using iFit and reporting issues. >>> >>> Emmanuel. >>> >>> On Mon, February 4, 2013 14:35, Sandor Toth wrote: >>>> Dear Sir/Madamme, >>>> >>>> I get an error message after the following code: >>>> >>>> a=load(iData, [ ifitpath 'Data/sv1850.scn' ]); >>>> options=fminimfil('defaults'); >>>> options.OutputFcn='fminplot'; >>>> >>>> [p,criteria,message,output]= fits(a, gauss, [], options); >>>> >>>> fminplot(output); >>>> >>>> >>>> The error message: >>>> >>>> Undefined function or variable "best". >>>> >>>> Error in fminplot (line 126) >>>> g=plot(iterHistory, fvalHistory,'b-', ? >>>> >>>> >>>> version(iData) >>>> iFit/iData version 1.3 (Nov. 29, 2012) by E.Farhi, P. Willendrup and >>>> Y.Debab, (c) ILL/DS/CS EUPL. >>>> Matlab version >>>> 8.0.0.783 (R2012b) >>>> >>>> Best regards, >>>> >>>> Sandor Toth >>>> >>>> >>>> >>>> Dr. S?ndor T?th >>>> >>>> Laboratory for Neutron Scattering (LNS) >>>> Paul Scherrer Institute >>>> WHGA 150 >>>> CH-5232 Villigen PSI >>>> Switzerland >>>> >>>> phone: +41 56 310 31 23 >>>> fax: +41 56 310 29 39 >>>> >>>> email: sandor.toth at psi.ch >>>> web: http://www.psi.ch/lns/sandor-toth >>>> >>>> >>> >>> -- >>> FARHI Emmanuel >>> Groupe DS/CS, ILL4/156, Tel 04 76 20 71 35 >>> ILL, Grenoble >>> > -- Emmanuel FARHI,www.ill.eu/computing/people/emmanuel-farhi \|/ ____ \|/ CS-Group ILL4/221, Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~ 6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France /_( \__/ )_\ Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 06 \__U_/ From farhi at ill.eu Tue Feb 12 17:31:25 2013 From: farhi at ill.eu (Emmanuel FARHI) Date: Tue, 12 Feb 2013 17:31:25 +0100 Subject: [Ifit-users] 2D model fit in iFit In-Reply-To: <5110175C.3020308@gmail.com> References: <510AC701.4010902@gmail.com> <511008D7.80509@gmail.com> <0053f7682789d1521fe7b36a5815d990.squirrel@195.83.126.17> <5110175C.3020308@gmail.com> Message-ID: <511A6E5D.1050000@ill.eu> An HTML attachment was scrubbed... URL: From farhi at ill.fr Thu Mar 28 17:41:29 2013 From: farhi at ill.fr (farhi) Date: Thu, 28 Mar 2013 17:41:29 +0100 Subject: [Ifit-users] iFit 1.3.1 available as source code and stand-alone Message-ID: Dear iFit users, The iFit release 1.3.1 is now available at . It provides the following changes: 1.3.1: Support for loading CIF/CFL/ShelX structure, EZD/MRC/CCP4 electron density formats. Load/save of YAML/JSON/XML files. New Rietveld model that uses a McStas neutron diffractometer model to convolve the structure factors and fit with diffractometer data. Added TAS neutron spectrometer resolution computation ResLibCal. iData commandhistory can be saved as a Matlab script. Added nlorz and ngauss Models. Fix of iData/combine with scalar Monitor values. Better memory handling in iData/load. iFunc support parameter constraints fix/min/max/assign as object.=. Fix in reading text files with changing columns number. Execution speed improvement in all object operators. Allow fitting of event data sets. You can get it as source code (requires a Matlab license) or as standalone (no need for a license). The standalone is currently available for Linux 32 and 64bits (with Debian packages and zip), Mac OSX 32bits (but should run on 64 as well), Windows 32 bits (but should run on 64 as well). Missing dedicated standalone for remaining systems will be added afterwards. Thanks for using iFit, and do not hesitate to report issues and questions. E. Farhi. PS: it seems that the interpolation methods have changed since Matlab 2012b. If you experience bugs, send them to me (with details and associated commands/files) so that I can fix them. -- FARHI Emmanuel Groupe DS/CS, ILL4/156, Tel (33) 4 76 20 71 35 ILL, Grenoble