Skip to content

Instantly share code, notes, and snippets.

View jonas-eschle's full-sized avatar

Jonas Eschle jonas-eschle

View GitHub Profile
@jonas-eschle
jonas-eschle / package.py
Created July 28, 2023 17:49
zfit for spack
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
# ----------------------------------------------------------------------------
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
# This is a template package file for Spack. We've put "FIXME"
@jonas-eschle
jonas-eschle / Ipatia2_zfit.py
Created August 8, 2022 11:16
zfit implementation (draft) of ipatia function
import numpy as np
import tensorflow_probability as tfp
import tensorflow as tf
import zfit
import zfit.z.numpy as znp
sq2pi = np.sqrt(2.0 * np.arccos(-1.0))
sq2pi_inv = 1.0 / sq2pi
@jonas-eschle
jonas-eschle / demo_with_zfit.py
Created March 31, 2021 23:03
Demo of tensorwaves using zfit for inference
#!/usr/bin/env python
import expertsystem as es
import graphviz
import matplotlib.pyplot as plt
import pandas as pd
import zfit # import here to suppress TF warnings :)
from expertsystem.amplitude.dynamics.builder import (
create_relativistic_breit_wigner_with_ff,
)
name = "Jonas"
age = 41
running_time = 0.2
jumping_time = 0.1
tot_exercise_time = running_time + jumping_time
# make it a direct message
message = name
is_good = abs(tot_exercise_time - 0.3) < 0.001
if is_good: # TODO: what is the ideal time?
@jonas-eschle
jonas-eschle / binned_chi2.ipynb
Created May 16, 2017 15:13 — forked from alexpearce/binned_chi2.ipynb
Notebook to reproduce Alex Rogozhnikov's binned chi^2 demonstration plot
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.