Exemple #1
0
def main(nop, nod, out, fnu=1):
    '''
    Using parameters in nop and data in nod, print a plot to out
    '''
    nop = nuosc.read_param_file(nop)
    nod = nuosc.read_data(nod)

    h = make_og(nod, fnu)
    params = nop_params(nop, fnu)
    title_og(h, **params)
    shape_linlog_og(h)

    c = make_canvas_og()
    h.Draw("CONTZ")

    lovere = math.pi / (2*1.267*abs(float(nop['atm'])))
    g1 = make_vac_osc(h, lovere)
    g2 = make_vac_osc(h, 3*lovere)
    l = make_base_line(h)
    lt = make_text("1300 km", 1250, math.log10(3), 90)
    where = 1500
    g1t = make_text("1{}^{st} vac. osc. max",where,g1.Eval(1.10*where),15)
    g2t = make_text("2{}^{nd} vac. osc. max",where,g2.Eval(1.10*where),15)

    for o in [l, g1, g2, lt, g1t, g2t]:
        o.Draw("same")
    
    c.Print(out)
Exemple #2
0
def main(nop, nod, out, fnu=1):
    '''
    Using parameters in nop and data in nod, print a plot to out
    '''
    nop = nuosc.read_param_file(nop)
    nod = nuosc.read_data(nod)

    h = make_og(nod, fnu)
    params = nop_params(nop, fnu)
    title_og(h, **params)
    shape_linlog_og(h)

    c = make_canvas_og()
    h.Draw("CONTZ")

    lovere = math.pi / (2 * 1.267 * abs(float(nop['atm'])))
    g1 = make_vac_osc(h, lovere)
    g2 = make_vac_osc(h, 3 * lovere)
    l = make_base_line(h)
    lt = make_text("1300 km", 1250, math.log10(3), 90)
    where = 1500
    g1t = make_text("1{}^{st} vac. osc. max", where, g1.Eval(1.10 * where), 15)
    g2t = make_text("2{}^{nd} vac. osc. max", where, g2.Eval(1.10 * where), 15)

    for o in [l, g1, g2, lt, g1t, g2t]:
        o.Draw("same")

    c.Print(out)
Exemple #3
0
def augment_parameters(fnu, **par):
    legend_order = ['dcp-45', 'dcp0', 'dcp+45', 't130']
    draw_order = ['dcp-45','dcp0','dcp+45','t130']
    anti_draw_order = ['dcp+45','dcp0','dcp-45','t130']
    draw_options = {
        'dcp-45': ("hbar same", 'lf', '#delta_{cp} = -#pi/2', ROOT.kBlue, 1001),
        'dcp0':   ("hbar same", 'lf', '#delta_{cp} = 0',      ROOT.kRed, 1001),
        'dcp+45': ("hbar same", 'lf', '#delta_{cp} = +#pi/2', ROOT.kGreen, 1001),
        't130':   ("L",    'lf', '#theta_{13}=0 (solar term)', ROOT.kYellow, 0)
        }
    typ = par['idname'].split('_')[-1]
    par['legend_index' ] = legend_order.index(typ)
    if par['neutrino'].startswith('-'):
        par['draw_index'] = anti_draw_order.index(typ)
    else:
        par['draw_index'] = draw_order.index(typ)
    par['draw_opts'] = draw_options[typ]
    if par['atm'].startswith("-"):
        par['hier'] = 'IH'
    else:
        par['hier'] = 'NH'
    return nop_params(par, fnu)