Dispense
Navigation
Tips - Dritte
PmWiki
pmwiki.org
edit SideBar
|
Index
Single run multi group sequential fit
This is the flow of information in mujpy to produce the sequential fit by
dofit_singlerun_multigroup_sequential Back to Fit Types
dashboard, containing a dict, is a json file
- key "model_guess" contains a list, like that of A1 fits, plus
- component dicts, which contains "pardicts", a list of
- parameter dicts, contains extra keys
- "function_multi", a list of as many strings as groups, to evaluate a distinct parameter value vs p = Minuit parameter array
- "error_propagation_multi", a list of as many strings as groups, to evaluate a distinct parameter-error value vs p = Minuit parameter array
aux int2min produces the minuit list of guess parameter values by scanning the model components, as in A1 fits
aux int2_multigroup_method_key takes care of passing the right parameter to the right component method. It produces a list of [method, keys], one per method, where
- method is the python function from mucomponents mumodel that calculates the component, and
- keys is a list of lists of lambda functions, typically
key_as_lambda = eval('lambda p:'+pardict["function_multi"][l]) , for the l-th group, or key_as_lambda = eval('lambda p:'+pardict["function"]) to be used as
f = method(t,*argv) , where t is the 1-d time array, argv is a list of the dashboard parameter values for that component, and f is an array with the same shape as t
- argv is calculated in
_add_multigroup_ as [[key(p) for key in groups_key] for groups_key in keys] , assuming that p is the array of parameter values passed by Minuit at this iteration
The convention for A2 sequential fits is that
- if "flag": "~" or "!" the parameter is a Minuit parameter, and "function" is empty, the key is in the form "p[k]" with k the index of the parameter
- if "flag": "=" the parameter is missing and the key is specified either by "function": "p[k]", with k the index of a previous parameter as written by the user, with reference to internal, dashboard parameter indexing, or by "function_multi", same syntax.
- indices are recomputed by aux translate, since the dashboard parameters with "flag":"=" de-synchronize dashboard and Minuit indices.
aux mint2int translates back best fit values to component parameters
mumodel _load_data_ preloads time, asymmetry and asymmetry errors, methods and key lists, alpha. The last is deprecated, only needed for linear "da" corrections.
mumodel _chisquare_ is the cost function.
mumodel _add_single_ assigns the correct parameters to each component, calculated from the Minuit array of parameters
the_model._load_data_(time,asymmetry,...) ,
m = Minuit(the_model._chisquare_,names,*values)
m.errors = errors , etc
m.migrad()
Minuit migrad() method calls
the_model._chisquare_ , which in turns calls
the_model._add_single_(x,*argv) , where argv is the Minuit array of parameters. Their assignment to component methods is performed
- scanning the method list
- scanning the keys list of each method and evaluating each key
Back to Fit Types
|
|
Single run multi group global fit
This is the flow of information in mujpy to produce the global fit by
dofit_singlerun_multigroup_userpardicts Back to Fit Types
The dashboard, is a json file containing a dict
a new key is introduced
- "userpardicts_guess", a list of dicts pardict, each containing the follwing keys
- "name"
- "value"
- "flag"
- "error"
- "limits"
besides the usual
- key "model_guess", which contains a list, in the order of their appearance in the model-name string, of
- component dicts, with a key "pardicts", a list of
- parameter dicts, with usual keys, among which
- "flag", can only be "=", referred either to "function" or, if it exists, to
- "function_multi", a list of as many strings as groups, to evaluate a distinct parameter value vs p = Minuit parameter array
- "error_propagation_multi", a list of as many strings as groups, to evaluate a distinct parameter-error value vs p = Minuit parameter array
aux int2min_multigroup produces the Minuit list of guess parameter values by scanning the userpardicts list (different from the sequential case!)
aux int2_multigroup_method_key takes care of passing the right parameter to the right component method. It produces a list of [method, keys], like that of the sequential case, above.
aux mint2int_multigroup is invoked by summary_global for translating back best fit values to component parameters
mumodel _load_data_multigroup_ preloads time, asymmetry and asymmetry errors, methods and key lists.
mumodel _chisquare_ is the cost function.
mumodel _add_multigroup_ assigns the correct parameters to each component, calculated from the Minuit array of parameters
the_model._load_data_multigroup_(time,asymmetry,...) ,
m = Minuit(the_model._chisquare_,names,*values)
m.errors = errors , etc
m.migrad()
Minuit migrad() method calls
the_model._chisquare_ , which in turns calls
the_model._add_multigroup_(x,*argv) , where argv is the Minuit array of parameters. Their assignment to component methods is performed
- scanning the method list
- scanning the keys list of each method
Back to Fit Types
|
Index
|