Exemplo n.º 1
0
def saveFitRes(ftype, xi, eff, nsig, fres):
    """ """
    np.savez(fitresfile(ftype, xi, eff),
             status=np.array([[key, fres[0][key]] for key in fres[0]]),
             fitres=np.array([[p.name, [p.value, p.error * np.sqrt(nsig)]]
                              for p in fres[1]]),
             corr=np.array(fres[2]),
             nsig=nsig)
Exemplo n.º 2
0
def getConc(N):
    """ Concentration matrix for Lambda form-factors """
    print('MULT = {}'.format(MULT))
    data = np.load(fitresfile('upol', 0., False) + '.npz')
    corr = data['corr']
    print(corr)
    errs = [x[1] for x in data['fitres'][:,1]] / np.sqrt(N*MULT)
    print(errs)
    covs = corr * np.outer(errs, errs)
    return np.linalg.inv(covs)
Exemplo n.º 3
0
def readFitRes(ftype, xi, eff):
    """  """
    assert (ftype in FTYPES)
    data = np.load(fitresfile(ftype, xi, eff) + '.npz')
    status = OrderedDict(
        [x, y] for x, y, in zip(data['status'][:, 0], data['status'][:, 1]))
    fitres = OrderedDict(
        [x, y] for x, y, in zip(data['fitres'][:, 0], data['fitres'][:, 1]))
    return {
        'status': status['is_valid'],
        'fitres': fitres,
        'fitcor': data['corr']
    }
Exemplo n.º 4
0
def xiErr(key, xi):
    return np.load(fitresfile(key, xi, False) + '.npz')['fitres'][-1][1][1]
Exemplo n.º 5
0
def allErrs(key, xi=0.):
    """ """
    return [
        x[1][1] for x in np.load(fitresfile(key, xi, False) + '.npz')['fitres']
    ]