Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 6afaeb73 authored by ulrich_y's avatar ulrich_y
Browse files

minor changes to #17

parent 3e714e82
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,8 @@ __all__ = [ ...@@ -18,7 +18,8 @@ __all__ = [
'addsets', 'scaleset', 'addsets', 'scaleset',
'errorband', 'kplot', 'watermark', 'errorband', 'kplot', 'watermark',
'pi', 'alpha', 'GF', 'conv', 'Mmu', 'Mel', 'Mtau', 'pi', 'alpha', 'GF', 'conv', 'Mmu', 'Mel', 'Mtau',
'importvegas', 'exportvegas', 'mulify', 'colours' 'importvegas', 'exportvegas', 'mulify', 'colours', 'printnumber',
'chisq'
] ]
...@@ -29,7 +30,7 @@ from vegas import importvegas, exportvegas ...@@ -29,7 +30,7 @@ from vegas import importvegas, exportvegas
from errortools import mergenumbers, plusnumbers, dividenumbers, timesnumbers,\ from errortools import mergenumbers, plusnumbers, dividenumbers, timesnumbers,\
mergeplots, addplots, divideplots, scaleplot, \ mergeplots, addplots, divideplots, scaleplot, \
combineplots, combineNplots, \ combineplots, combineNplots, \
integratehistogram, mergebins integratehistogram, mergebins, printnumber, chisq
from loader import importreg, pattern, setup, sigma, \ from loader import importreg, pattern, setup, sigma, \
mergeset, mergeseeds, mergefks, \ mergeset, mergeseeds, mergefks, \
addsets, scaleset addsets, scaleset
......
import numpy as np import numpy as np
def chisq(values):
if type(values) == list:
values = np.array(values)
weight = sum(1 / values[:,1]**2)
value = sum(values[:,0] / values[:,1]**2 / weight)
chi = 1./len(values) * sum(
((values[:,0]-value) / values[:,1])**2
)
return chi
def mergenumbers(values, quiet=False): def mergenumbers(values, quiet=False):
if type(values) == list: if type(values) == list:
values = np.array(values) values = np.array(values)
......
...@@ -17,6 +17,7 @@ rc('text.latex', preamble="\n".join([ ...@@ -17,6 +17,7 @@ rc('text.latex', preamble="\n".join([
'\\newcommand{\\D}{\\mathrm{d}}' '\\newcommand{\\D}{\\mathrm{d}}'
])) ]))
def setup_pgf(): def setup_pgf():
plt.rcParams.update({ plt.rcParams.update({
"pgf.texsystem": "pdflatex", "pgf.texsystem": "pdflatex",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment