From PKWI at risoe.dtu.dk Wed Jun 8 10:39:51 2011 From: PKWI at risoe.dtu.dk (=?iso-8859-1?Q?Willendrup=2C_Peter_Kj=E6r?=) Date: Wed, 8 Jun 2011 10:39:51 +0200 Subject: [iFit-users] Test message - please ignore Message-ID: <59105E14-F376-4BD2-9ACA-581BD8D0D9A9@risoe.dtu.dk> -- ------------------------------------------------------------------- Peter Willendrup - Development engineer RIS? DTU Materials Research Division Frederiksborgvej 399 DK-4000 Roskilde Tlf.: (+45) 4677 5862 Mobil.: (+45) 2125 4612 Fax.: (+45) 4766 5758 Email: pkwi at risoe.dtu.dk ------------------------------------------------------------------- From farhi at ill.eu Fri Jun 24 15:07:43 2011 From: farhi at ill.eu (Emmanuel FARHI) Date: Fri, 24 Jun 2011 15:07:43 +0200 Subject: [iFit-users] iFit: release 1.0-RC9 available. Please register to ifit-users. In-Reply-To: References: Message-ID: <4E048C1F.1080608@ill.eu> Dear colleagues, I'm glad to announce the release 1.0-RC9 of iFit, which you can get at . == In a few words =================================================== iFit is an extension of spec1d written by H. Ronnow a long time ago. It handles any dimensionality, and cares about Error and Monitor concepts. Fitting methods are provided, as well as powerful import/export routines for a very large number of data file formats. Data sets can be assembled and manipulated as simple variables. == This new release candidate for version 1.0 has the following improvements from last 1.0-RC8: * A fix for the Monitor handling in the combine operator was committed. * The axis rank 0 has now a coherent definition as Signal/Monitor over all operators. The access to the Signal alone can always be obtained with e.g. get(object,'Signal') or object.Signal * the 'fits' optimization method can now fit a data set directly with an expression, such as >> fits(a,'p(1)*x+p(2)'), which creates a model function transparently and starts the fitting procedure. * the mailing list was set up by Peter W, and you may register there in order for all of us to discuss bugs, and announce updates, fixes, questions and answers. A quick registration form has been added in the ifit.mccode.org welcome page (bottom) as well as in the Install page. == What's next in my mind ? ========================================= A future Jacobian matrix for multi-variable function will be added asap in order to transparently perform coordinate axis transformations (e.g. from angle to q and time to energy). Thanks for your support and suggestions. Emmanuel. -- 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.fr Sat Jun 25 10:04:15 2011 From: farhi at ill.fr (Emmanuel FARHI) Date: Sat, 25 Jun 2011 10:04:15 +0200 (CEST) Subject: [iFit-users] iFit In-Reply-To: References: <4E04AB39.5040105@ill.eu> <26b11ccdc31c770119ca7a4e4b290a6d.squirrel@195.83.126.17> Message-ID: <60d114db0aa9522ff6506a91a3404855.squirrel@195.83.126.17> Hi Linda, On Fri, June 24, 2011 21:44, Linda Udby wrote: > Hi Emmanuel, > > I now got some more time to try out the plotting and fitting routine. > First of all: how do I specify the marker I want for several plots in the > same figure? The easiest is to get the return value from plot, which is an array of handles: h = plot(objects, 'r_+') set(h(2),'marker','o','color','b') > > Secondly: Are you planning do do an easier access to the errors on the > fitted parameters? ... this is quite essential for the usability! There is no generic method to get the error bars. The one used traditionally with MFit spec1d only applies to Marquardt-Levenberg and assumes that parameter distributions are gaussians. In short, yes I'll find a method, but this a math problem, not a programming one. In the mean time, use the method explained in > > Thirdly: I seem to only be able to fit functions with one peak, others > like ngauss and nlorz give the same error message about argument "p": > > s0717=load(iData, [dp '070717']) > plot(s0717) >>> p0717 =fits(s0717,'ngauss',[1 -0.1 0.1 1 0.1 0.1 0],[0 0 0 0 0 0 0]) > ??? Warning: Struct field assignment overwrites a value with class > "double". > See MATLAB 7.0.4 Release Notes, Assigning Structures to Nonstructures > for > details. >> In iData.fits at 172 > ??? Input argument "p" is undefined. > > Error in ==> ngauss at 14 > ngss = (length(p)-1)/3; > > Error in ==> iData.ieval at 59 > Info = feval(model,'identify'); % get identification Info, esp. for > Dimension > > Error in ==> iData.fits at 180 > [dummy, info] = ieval(a, model,'identify'); % model info The MFit/spec1d function can not be used as-is within iFit as they can not be extended to higher dimensionalities. Instead of the old syntax fun(x, p) iFit uses fun(p, x,y,...) also, as mentioned earlier, new functions have a generic mechanism for auto guess for starting parameters and function identification and self plotting. If you want to create a 2 gaussians function, use e.g. >> h=ififmakefunc('gaussx2','Two Gaussians',... 'Amplitude1 Centre1 HalfWidth1 Background1 Amplitude2 Centre2 HalfWidth2 Background2',... 'gauss(p,x)+gauss(p,x)',[1 -0.1 0.1 1 0.1 0.1 0]); creates the gaussx2.m function and returns its handle. You may use both as argument for the function during fits. See for more informations. You can do that within a Dialog with >> ifitmakefunc and fill-in the required informations. Cheers, Emmanuel. > > > cheers > Linda > > P.S. I will report stuff on the mailing list once I get just a little more > started so my questions won't be as stupid > > > > On Fri, 24 Jun 2011, Emmanuel FARHI wrote: > >> And if you wish to redefine the axis type in : >> setaxis(s,1,'A4') or s{1}='A4' >> E. >> On Fri, June 24, 2011 17:45, Linda Udby wrote: >>> Ah, OK, thanks alot!:) >>> L >>> >>> On Fri, 24 Jun 2011, Emmanuel FARHI wrote: >>> >>>> s0690.A4 or get(s0690, 'A4') >>>> >>>> should do it... as aliases are created for all columns in the data >>>> block. >>>> >>>> To get all this information, type disp(s0690) or get(s0690) which both >>>> display a list of defined axes and aliases available for >>>> further use when importing the file. >>>> >>>> E. >>>> >>>> On 06/24/2011 05:24 PM, Linda Udby wrote: >>>> Hi Emmanuel, >>>> >>>> I must be stupid since I can't figure out how to pick which >>>> variables I want to go in my 'spec1d' object frome the >>>> datafile. >>>> Doing something like this >>>> >>>> get(s0690,'Data.VARIA.A4') >>>> >>>> only gives me the first value of the parameter in the datafile, >>>> even though it changes throughout the scan. >>>> >>>> How do I do it? >>>> >>>> best, >>>> Linda >>>> >>>> >>>> -- >>>> 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_/ >>>> >>>> >>> >> >> >> -- >> FARHI Emmanuel >> Groupe DS/CS, ILL4/156, Tel 04 76 20 71 35 >> ILL, Grenoble >> > -- FARHI Emmanuel Groupe DS/CS, ILL4/156, Tel 04 76 20 71 35 ILL, Grenoble