Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Documentation Status https://travis-ci.org/dsavoiu/kafe2.svg?branch=master

About

kafe2 is an open-source Python package designed to provide a flexible Python interface for the estimation of model parameters from measured data. It is the spiritual successor to the original kafe package.

kafe2 offers support for several types of data formats (including series of indexed measurements, xy value pairs, and histograms) and data uncertainty models, as well as arbitrarily complex parametric models. The numeric aspects are handled using the scientific Python stack (numpy, scipy, …). Visualization of the data and the estimated model are provided by matplotlib.

While kafe2 supports both Python 2 and Python 3, the use of Python 3 is recommended.

Note

kafe2 is currently in a beta state. Most features are working as intended. However, bugs may occur during use. If you encounter any bugs or have an improvement proposal, please let us know by opening an issue here.

A user guide can be found on kafe2.readthedocs.io.

Requirements

kafe2 needs some additional Python packages. When kafe2 is installed via pip, those packages are automatically installed as dependencies:

Since kafe2 relies on matplotlib for graphics it might be necessary to install external programs:

  • Tkinter, the default GUI used by matplotlib

Optionally, a function minimizer other than scipy.optimize.minimize can be used. kafe2 implements interfaces to two function minimizers and will use them by default if they’re installed:

  • MINUIT, which is included in CERN’s data analysis package ROOT (>= 5.34), or

  • iminuit (>= 1.1.1), which is independent of ROOT

Installation notes (Linux)

The easiest way to install kafe2 is via pip, which is already included for Python >= 2.7.9. Installing via pip will automatically install the minimal dependencies. Please note that commands below should be run as root.

For Python 2:

pip2 install kafe2

For Python 3:

pip3 install kafe2

If you don’t have pip installed, get it from the package manager.

In Ubuntu/Mint/Debian, do:

apt-get install python-pip python3-pip

In Fedora/RHEL/CentOS, do:

yum install python2-pip python3-pip

or use easy_install (included with setuptools):

easy_install pip

You will also need to install Tkinter if it didn’t already come with your Python distribution.

For Python 2, Ubuntu/Mint/Debian:

apt-get install python-tk

For Python 2, Fedora/RHEL/CentOS:

yum install tkinter

For Python 3, Ubuntu/Mint/Debian:

apt-get install python3-tk

For Python 3, Fedora/RHEL/CentOS:

yum install python3-tkinter

Optional: Install ROOT

Note: Starting with Ubuntu 16.10, ROOT is no longer available in the official repositories.

In older versions of Ubuntu (and related Linux distributions), ROOT and its Python bindings can be obtained via the package manager via:

apt-get install root-system libroot-bindings-python5.34 libroot-bindings-python-dev

Or, in Fedora/RHEL/CentOS:

yum install root root-python

This setup is usually sufficient. However, you may decide to build ROOT yourself. In this case, be sure to compile with PyROOT support. Additionally, for Python to see the PyROOT bindings, the following environment variables have to be set correctly:

export ROOTSYS=<directory where ROOT is installed>
export LD_LIBRARY_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH

For more info, refer to http://root.cern.ch/drupal/content/pyroot.

Optional: Install iminuit

iminuit is a Python wrapper for the Minuit minimizer which is independent of ROOT. This minimizer can be used instead of ROOT.

To install the iminuit package for Python, the Pip installer is recommended:

pip install iminuit

You might also need to install the Python headers for iminuit to compile properly.

In Ubuntu/Mint/Debian, do:

apt-get install libpython2-dev libpython3-dev

In Fedora/RHEL/CentOS, do:

yum install python2-devel python3-devel

Release files for kafe2 2.0b2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kafe2 2.0b2
File Size Uploaded
kafe2-2.0b2.tar.gz 224.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kafe2 2.0b2
File Interpreter ABI Platform
kafe2-2.0b2-py3-none-any.whl Python 3 none any Details

Total release size: 507.8 kB

Release files / kafe2-2.0b2.tar.gz

Download URL kafe2-2.0b2.tar.gz
Size 224.8 kB
Tags Source
SHA-256 checksum
How to use checksums
928e542b1d9493e80a02e3b1924b4b27909081054d2ee2bc51dd960c90788f12
BLAKE2b-256 checksum
How to use checksums
7d7377ac0f1b8ef9aadfe22969c8c954e1eac9645312f730d450481e6fc0339a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.2

Release files / kafe2-2.0b2-py3-none-any.whl

Download URL kafe2-2.0b2-py3-none-any.whl
Size 283.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5386fa98ce8521da13d5f497e3cc2a6c66106e091d873539b7e5eb01829c0044
BLAKE2b-256 checksum
How to use checksums
6b6d38da0db92f5f988a02c70a4cf88865324ce7f4b900f9dfd277c77493b238
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.2

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page