Recent Changes · Search:

Dispense


Navigation Tips - Dritte


PmWiki

pmwiki.org

edit SideBar

Muzen

< Matlab license without internet | Index | Computer.Recipes >


This is a description of the code. For a primer on Muzen look here.


To compile with debugger on

   make clean
   make muzen-g

then use debugge ddd


Mod VERSION when changing patchlevel (for definitive minor or major upgrade)

Now mk_muzen.version.sh records date hour min of compilation


Different ways of addressing parameters in muzen, e.g. bamu fit in asymmetry (fit_flag=2)

fit: here parameters are read from file bamu.fit or created and then shown in the menu.

When displaying in Main loop the menu is regenerated by recalculating numpar through a cicle on

i=1,nvie, number of vie in the present model [2]

and j=1,linpar(ipunvie(i),fit_flag) the number of parameters of the present via [3 for ba, 5 for mu] (ipunvie(i) is a general order number, e.g. 2 for ba and 4 for mu)

In this process numpar is the zen number for the parameter; vectors kvie(numpar) and kpar(numpar) contain respectively numerical unique identificator for the via to which parameter @numpar@@ belongs (e.g. 2 for ba) and that of the parameter itself (e.g. normally 1 for ampplitude).

numpar is incremented in the process and finally coincides with the total number of model parameters.

numpar=linpar(ipunvie(1),fit_flag)+ ... linpar(ipunvie(nvie),fit_flag)

submin: generates the parameter list passed to minuit. Fixed (!) and free (~) parameters are passed regularly. Parameters sharing their value with one already defined (=) and those linked to another one by a linear relation (+) are not passed directly to minuit and must be reconstructed.

Minuit initialization is constructed from the zen parameter list:

lp=1,numpar

Vector isharm(lp) contains the minuit numbers of the zen parameters lp

e.g. in a bamu model where the lorentzian decay rates are shared and the amplitudes are linked by a linear relation one has the following list of parameters

    lp isharm livie (ipunvie) lipar (linpar) fix
     1   1    BACK   (2)      AMP    (1)     ~
     2   2    BACK   (2)      DELO   (2)     ~
     3   3    BACK   (2)      DEGA   (3)     !
     4   1    MU+.   (4)      AMP    (1)     +
     5   4    MU+.   (4)      GAU    (2)     ~
     6   5    MU+.   (4)      PHDG   (3)     ~
     7   2    MU+.   (4)      DELO   (4)     =
     8   6    MU+.   (4)      DEGA   (5)     !

Here numpar=8, minuit knows only 6 of these and minimizes those which are free. The linear relation for parameter lp=4 would read, e.g.

   2.0*P1

parnuo: distributes parameters to the vie, in a minuit fcn call. Minuit passes the 6 parameters it knows in vector p, to subroutine fcn_par, which cicles on nvie. Each via is identified (by ipunvie, e.g. 2 for ba and 4 for mu) and the required number of parameters is read in succession from p by calling e.g. parnuo(3,ipamin,ipazen,p) for ba, and parnuo(5,ipamin,ipazen,p) for mu.

ipazen is the zen number for the parameter (since symbol fix='#' is never used, ipamin is identical, redundant). The minuit number, i.e. the position in vector p, is obtained as isharm(ipazen).

fcn_summary: in this way gets the parameter values in the order requiresd by the zen menù list.


< Matlab license without internet | Index | Computer.Recipes >

Edit - History - Print - PDF - Recent Changes - Search
Page last modified on January 26, 2008, at 10:01 PM