Ejemplo n.º 1
0
                    sheet.cell(column=colstart+coli,row=rowstart-1).value.split("-")[0])

    data = np.asarray(data)
    return data,labels

if __name__ == '__main__':

    argparser = argparse.ArgumentParser(description="Script to make bar plots")
    argparser.add_argument('-xls','--xls',help="the filename of the XLSX file")
    argparser.add_argument('-sheets','--sheets',nargs="+",help="the sheet in the XLSX file")
    argparser.add_argument('-labels','--labels',nargs="+",help="the labels")
    argparser.add_argument('-out','--out',help="the output prefix")
    argparser.add_argument('-yunit','--yunit',help="the unit of the y axis",default="")
    args = argparser.parse_args()

    wb = sheetslib.open_book(args.xls)

    if len(args.sheets) == 2 :
        ncol = 1
        nrow = 2
    else:
        ncol = 2
        nrow = int(np.ceil(len(args.sheets)/2.0))

    props = dict(facecolor='white',edgecolor='white', alpha=0.8)
    letters = ["A)","B)","C)","D)"]
    widths = [0,3.25,7]

    figs = [plt.figure(i,figsize=(widths[ncol],5))
            for i in range(1,4)]
    ylabels = ["AUD","MUD","MSD"]
Ejemplo n.º 2
0
        description="Program to perform error analysis of order parameters")
    argparser.add_argument('-xls',
                           '--xls',
                           help="the filename of the XLSX file")
    argparser.add_argument('-sheet',
                           '--sheet',
                           help="the sheet in the XLSX file")
    argparser.add_argument('-sysoffs',
                           '--sysoffs',
                           nargs="+",
                           type=int,
                           help="the system column offset")
    argparser.add_argument('--hasexp', action="store_true", default=False)
    args = argparser.parse_args()

    wb = sheetslib.open_book(args.xls)

    allparams = []
    for sysoff in args.sysoffs:
        res, labels, data, errors = sheetslib.extract_sheet(
            wb, args.sheet, sysoff)
        avparams = _average_group(data, res, args.hasexp)
        allparams.extend(avparams)

    resnames = sorted(list(set([p.resname for p in allparams])))
    for resname in resnames:
        scoreddata = croc.ScoredData()
        bootdata = np.zeros((len(allparams), 2))
        for i, param in enumerate(allparams):
            if param.resname == resname:
                scoreddata.add(param.value, 1)