Skip to content

skluth/ConstrainedFit

Repository files navigation

README for ConstrainedFit

General scheme of implemetation:

The constrained fit solver is initialised with arrays (lists)
containing the measurements (data and covariance matrix), and
optionally lists defining names for the measurements.  As fit
parameters another array (list) is given which contains the intial
values.  Finally the name of a python function expected to calculate
the constraints is passed.

The constraints are implemented as a python function, which receives
the measured parameters (data values) and the unmeasured parameters
(fit parameters) and returns the result of all constraint calculations
in normal form as an array (list).

The installation depends on ROOT with the pyroot extension available,
so make sure you have defined PYTHONPATH and LD_LIBRARY_PATH if ROOT
is not in the default paths.

Examples:

The examples refer to the lecture of V. Blobel which is reproduced
here.

There three example python scripts show how a constrained fit could be
implemented.  The scripts reproduce the results shown in the lecture.

To run them e.g. with the triangle area constrained fit:

$> python
>>> import triangleExample
>>> triangleExample.run()

<printout>

>>>

About

Constrained fits with python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages