Skip to content
Snippets Groups Projects
Commit d39cd537 authored by Alexander Heidelbach's avatar Alexander Heidelbach
Browse files

Update README for new inputs

parent a0fb787f
Branches
Tags v1.0
No related merge requests found
......@@ -3,9 +3,13 @@
This is an easy-to-use wrapper for my commonly used [`zfit`](https://github.com/zfit/zfit) modules for simple binned and unbinned fits of distributions. `dist_fitter` is aiming to provide a `JSON` based IO format for quick fits with `zfit` with not much of the usually required lines of codes and handling of `zfit` classes.
## Lightweight Example (6 lines of code)
Install: `pip3 install git+https://gitlab.etp.kit.edu/aheidelbach/zfitwrapper`
```python
from zfitwrapper import *
# Define overall fit space
obs = set_obs("Example", (-3, 3))
obs = utilities.set_obs("Example", (-3, 3))
# Define model properties (or read from JSON)
modelparameter = {
......@@ -25,13 +29,13 @@ modelparameter = {
}
# Initialize model
model = Model(obs=obs, modelstring="Model", models=modelparameter)
model = Models.Model(obs=obs, modelstring="Model", models=modelparameter)
# Simulate some data
arr = np.random.randn(10000)
# Initialize and execute fit
fit = Fitter(arr, model)
fit = Fitter.Fitter(arr, model)
fit.fit()
```
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment