Exemplo n.º 1
0
def test_draw_pdf_linear():
    f = linear
    draw_pdf(f, {'m': 1., 'c': 2.}, bound=(-10, 10))
Exemplo n.º 2
0
from probfit.pdf import cauchy, rtv_breitwigner
from probfit.plotting import draw_pdf
from collections import OrderedDict
import matplotlib.pyplot as plt

bound = (5.24, 5.32)

arg = OrderedDict(m=5.28, gamma=1)
draw_pdf(cauchy, arg=arg, bound=bound, label='cauchy'+str(arg), density=True)

arg = OrderedDict(m=-5.28, gamma=2)
draw_pdf(cauchy, arg=arg, bound=bound, label='cauchy'+str(arg), density=True)

arg = OrderedDict(m=5.28, gamma=1)
draw_pdf(rtv_breitwigner, arg=arg, bound=bound, label='bw'+str(arg), density=True)

arg = OrderedDict(m=-5.28, gamma=2)
draw_pdf(rtv_breitwigner, arg=arg, bound=bound, label='bw'+str(arg), density=True)

plt.grid(True)
plt.legend().get_frame().set_alpha(0.5)
Exemplo n.º 3
0
def test_draw_pdf():
    f = gaussian
    draw_pdf(f, {'mean': 1., 'sigma': 2.}, bound=(-10, 10))
Exemplo n.º 4
0
def test_draw_pdf_linear():
    f = linear
    draw_pdf(f, {"m": 1.0, "c": 2.0}, bound=(-10, 10))
Exemplo n.º 5
0
from probfit.pdf import exponential
from probfit.plotting import draw_pdf
import matplotlib.pyplot as plt

_arg = {"lambda": 0.5}
draw_pdf(exponential,
         arg=_arg,
         bound=(0, 5),
         label=str(_arg),
         density=False,
         bins=100)

_arg = {"lambda": 1.0}
draw_pdf(exponential,
         arg=_arg,
         bound=(0, 5),
         label=str(_arg),
         density=False,
         bins=100)

_arg = {"lambda": 1.5}
draw_pdf(exponential,
         arg=_arg,
         bound=(0, 5),
         label=str(_arg),
         density=False,
         bins=100)

plt.grid(True)
plt.legend().get_frame().set_alpha(0.5)
Exemplo n.º 6
0
# -*- coding: utf-8 -*-
from collections import OrderedDict

import matplotlib.pyplot as plt

from probfit.pdf import johnsonSU
from probfit.plotting import draw_pdf

bound = (-10, 10)

arg = OrderedDict(mean=2, sigma=1, nu=-4, tau=0.5)
draw_pdf(johnsonSU,
         arg=arg,
         bound=bound,
         label=str(arg),
         density=False,
         bins=200)

arg = OrderedDict(mean=-3, sigma=2, nu=+4, tau=0.1)
draw_pdf(johnsonSU,
         arg=arg,
         bound=bound,
         label=str(arg),
         density=False,
         bins=200)

arg = OrderedDict(mean=0, sigma=3, nu=+2, tau=0.9)
draw_pdf(johnsonSU,
         arg=arg,
         bound=bound,
         label=str(arg),
Exemplo n.º 7
0
def test_draw_pdf():
    f = gaussian
    draw_pdf(f, {"mean": 1.0, "sigma": 2.0}, bound=(-10, 10))
Exemplo n.º 8
0
from probfit.pdf import Polynomial
from probfit.plotting import draw_pdf
import matplotlib.pyplot as plt
bound = (-10, 10)

p = Polynomial(3)
arg = dict(c_0=0., c_1=1, c_2=2, c_3=3)
draw_pdf(p, arg=arg, bound=bound, label=str(arg), density=False)

p = Polynomial(2)
arg = dict(c_0=0., c_1=1, c_2=2)
draw_pdf(p, arg=arg, bound=bound, label=str(arg), density=False)

plt.grid(True)
plt.legend().get_frame().set_alpha(0.5)
Exemplo n.º 9
0
# -*- coding: utf-8 -*-
from collections import OrderedDict

import matplotlib.pyplot as plt

from probfit.pdf import ugaussian
from probfit.plotting import draw_pdf

bound = (-10, 10)

arg = OrderedDict(mean=2, sigma=1)
draw_pdf(ugaussian, arg=arg, bound=bound, label=str(arg), density=False)

arg = OrderedDict(mean=-3, sigma=2)
draw_pdf(ugaussian, arg=arg, bound=bound, label=str(arg), density=False)

plt.grid(True)
plt.legend().get_frame().set_alpha(0.5)
Exemplo n.º 10
0
from probfit.pdf import johnsonSU
from probfit.plotting import draw_pdf
from collections import OrderedDict
import matplotlib.pyplot as plt

bound = (-10, 10)

arg = OrderedDict(mean=2, sigma=1, nu=-4, tau=0.5)
draw_pdf(johnsonSU, arg=arg, bound=bound, label=str(arg), density=False,
         bins=200)

arg = OrderedDict(mean=-3, sigma=2, nu=+4, tau=0.1)
draw_pdf(johnsonSU, arg=arg, bound=bound, label=str(arg), density=False,
         bins=200)

arg = OrderedDict(mean=0, sigma=3, nu=+2, tau=0.9)
draw_pdf(johnsonSU, arg=arg, bound=bound, label=str(arg), density=False,
         bins=200)

plt.grid(True)
plt.legend().get_frame().set_alpha(0.5)
Exemplo n.º 11
0
from probfit.pdf import cauchy, rtv_breitwigner
from probfit.plotting import draw_pdf
import matplotlib.pyplot as plt

bound = (1, 7.0)

arg = dict(m=5.28, gamma=0.5)
draw_pdf(cauchy, arg=arg, bound=bound, label='cauchy' + str(arg), density=True)

arg = dict(m=5.28, gamma=1.0)
draw_pdf(cauchy, arg=arg, bound=bound, label='cauchy' + str(arg), density=True)

arg = dict(m=5.28, gamma=1.0)
draw_pdf(rtv_breitwigner,
         arg=arg,
         bound=bound,
         label='bw' + str(arg),
         density=True)

arg = dict(m=5.28, gamma=2.0)
draw_pdf(rtv_breitwigner,
         arg=arg,
         bound=bound,
         label='bw' + str(arg),
         density=True)

plt.grid(True)
plt.legend().get_frame().set_alpha(0.5)
Exemplo n.º 12
0
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt

from probfit.pdf import cauchy, rtv_breitwigner
from probfit.plotting import draw_pdf

bound = (1, 7.0)

arg = dict(m=5.28, gamma=0.5)
draw_pdf(cauchy, arg=arg, bound=bound, label="cauchy" + str(arg), density=True)

arg = dict(m=5.28, gamma=1.0)
draw_pdf(cauchy, arg=arg, bound=bound, label="cauchy" + str(arg), density=True)

arg = dict(m=5.28, gamma=1.0)
draw_pdf(rtv_breitwigner, arg=arg, bound=bound, label="bw" + str(arg), density=True)

arg = dict(m=5.28, gamma=2.0)
draw_pdf(rtv_breitwigner, arg=arg, bound=bound, label="bw" + str(arg), density=True)

plt.grid(True)
plt.legend().get_frame().set_alpha(0.5)
Exemplo n.º 13
0
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt

from probfit.pdf import gaussian
from probfit.plotting import draw_pdf

bound = (-10, 10)

arg = dict(mean=2, sigma=1)
draw_pdf(gaussian, arg=arg, bound=bound, label=str(arg), density=True)

arg = dict(mean=-3, sigma=2)
draw_pdf(gaussian, arg=arg, bound=bound, label=str(arg), density=True)

plt.grid(True)
plt.legend().get_frame().set_alpha(0.5)
Exemplo n.º 14
0
def test_draw_pdf_linear():
    plt.figure()
    f = linear
    draw_pdf(f, {'m':1., 'c':2.}, bound=(-10, 10))
Exemplo n.º 15
0
from probfit.pdf import exponential
from probfit.plotting import draw_pdf
import matplotlib.pyplot as plt

_arg = {"lambda": 0.5}
draw_pdf(exponential, arg=_arg, bound=(0, 5), label=str(_arg), density=False,
         bins=100)

_arg = {"lambda": 1.0}
draw_pdf(exponential, arg=_arg, bound=(0, 5), label=str(_arg), density=False,
         bins=100)

_arg = {"lambda": 1.5}
draw_pdf(exponential, arg=_arg, bound=(0, 5), label=str(_arg), density=False,
         bins=100)

plt.grid(True)
plt.legend().get_frame().set_alpha(0.5)
Exemplo n.º 16
0
from probfit.pdf import gaussian
from probfit.plotting import draw_pdf
import matplotlib.pyplot as plt

bound = (-10, 10)

arg = dict(mean=2, sigma=1)
draw_pdf(gaussian, arg=arg, bound=bound, label=str(arg), density=True)

arg = dict(mean=-3, sigma=2)
draw_pdf(gaussian, arg=arg, bound=bound, label=str(arg), density=True)

plt.grid(True)
plt.legend().get_frame().set_alpha(0.5)