Exemplo n.º 1
0
for category in pt.ecal_regions:

    print "Beginning category ", category,
    if "gold" in category:
        print " ...skipping: gold"
        continue
    if "bad" in category:
        print " ...skipping: bad"
        continue
    print

    #Get runrange and time info from the the runranges file
    d = pt.read_run_range(path=data_path, file=runRangeFile)
    #Get variables information from the stability monitoring .tex file
    d = pt.append_variables(path=data_path,
                            file=stabilityFile,
                            data=d,
                            category=category)

    #Get variables to make plots of (data, not mc or err vars)
    variables = []
    timeVars = [
        'Nevents', 'UnixTime', 'run_number', 'UnixTime_min', 'UnixTime_max',
        'run_min', 'run_max', 'date_min', 'date_max', 'time'
    ]
    for label in d.columns.values.tolist():
        if "MC" not in label and label not in timeVars and "_err" not in label:
            variables.append(label)

    #Loop over the vars
    for var in variables:
Exemplo n.º 2
0
print "Starting plotmaking..."
for category in pt.ecal_regions:

    print "Beginning category ", category,
    if "gold" in category: 
        print " ...skipping: gold"
        continue
    if "bad"  in category: 
        print " ...skipping: bad"
        continue
    print

    #Get runrange and time info from the the runranges file
    d = pt.read_run_range(path=data_path,file=runRangeFile)
    #Get variables information from the stability monitoring .tex file
    d = pt.append_variables(path=data_path,file=stabilityFile,data=d,category=category)

    #Get variables to make plots of (data, not mc or err vars)
    variables = []
    timeVars = ['Nevents', 'UnixTime', 'run_number', 'UnixTime_min', 'UnixTime_max', 'run_min', 'run_max', 'date_min', 'date_max', 'time']
    for label in d.columns.values.tolist():
        if "MC" not in label and label not in timeVars and "_err" not in label:
            variables.append(label)

    #Loop over the vars
    for var in variables:

        #Get associated monte carlo info, or a placeholder
        varmc = var.replace("data","MC")
        if 'MC' not in varmc:
            print "[WARNING] MC counterpart not found for ", var