import numpy as np from numpy import nan add_legend_handle = [ 'alpha2.yoda', '_alpha2.yoda' ] xpoints = { 'alpha2.yoda' : [-52.82, -47.26, -41.7, -36.14, -30.58, -25.02, -19.46, -13.899999999999999, -8.34, -2.7799999999999963, 2.7800000000000034, 8.34, 13.899999999999999, 19.46, 25.02, 30.58, 36.14, 41.7, 47.26, 52.82], '_alpha2.yoda' : [-52.82, -47.26, -41.7, -36.14, -30.58, -25.02, -19.46, -13.899999999999999, -8.34, -2.779999999999992, 2.780000000000008, 8.34, 13.899999999999999, 19.46, 25.02, 30.58, 36.14, 41.7, 47.26, 52.82], } xedges = { 'alpha2.yoda' : [-55.6, -50.04, -44.48, -38.92, -33.36, -27.8, -22.24, -16.68, -11.12, -5.56, 7.105427357601002e-15, 5.56, 11.12, 16.68, 22.24, 27.8, 33.36, 38.92, 44.48, 50.04, 55.6], '_alpha2.yoda' : [-55.6, -50.04, -44.48, -38.92, -33.36, -27.8, -22.24, -16.68, -11.12, -5.56, 1.5987211554602254e-14, 5.56, 11.12, 16.68, 22.24, 27.8, 33.36, 38.92, 44.48, 50.04, 55.6], } ref_xerrs = [ [abs(xpoints['alpha2.yoda'][i] - xedges['alpha2.yoda'][i]) for i in range(len(xpoints['alpha2.yoda']))], [abs(xedges['alpha2.yoda'][i+1] - xpoints['alpha2.yoda'][i]) for i in range(len(xpoints['alpha2.yoda']))] ] yvals = { 'alpha2.yoda' : [0.0, 2.0158417266187043, 12.404082733812961, 14.062392086330929, 15.348604316546766, 16.4085989208633, 17.290863309352524, 18.015017985611507, 18.590845323741007, 19.492967625899258, 19.48570143884895, 18.584460431654676, 18.020305755395682, 17.293267985611514, 16.419257194244597, 15.34327517985612, 14.062230215827334, 12.405143884892096, 2.0166708633093515, 0.0], '_alpha2.yoda' : [0.0, 2.012837, 12.40588, 14.05754, 15.33854, 16.41664, 17.29466, 18.01051, 18.59279, 19.48715, 19.49121, 18.59754, 18.01042, 17.30047, 16.41809, 15.34666, 14.06506, 12.40594, 2.013834, 0.0], } xerrs = { 'alpha2.yoda' : [ [2.780000000000001, 2.780000000000001, 2.780000000000001, 2.780000000000001, 2.7799999999999976, 2.780000000000001, 2.780000000000001, 2.7799999999999994, 2.7800000000000002, 2.7800000000000034, 2.7799999999999963, 2.7799999999999994, 2.780000000000001, 2.7799999999999976, 2.780000000000001, 2.780000000000001, 2.780000000000001, 2.779999999999994, 2.780000000000001, 2.780000000000001], [2.780000000000001, 2.780000000000001, 2.779999999999994, 2.780000000000001, 2.780000000000001, 2.780000000000001, 2.7799999999999976, 2.780000000000001, 2.7799999999999994, 2.7800000000000034, 2.7799999999999963, 2.7800000000000002, 2.7799999999999994, 2.780000000000001, 2.780000000000001, 2.7799999999999976, 2.780000000000001, 2.780000000000001, 2.780000000000001, 2.780000000000001], ], '_alpha2.yoda' : [ [2.780000000000001, 2.780000000000001, 2.780000000000001, 2.780000000000001, 2.7799999999999976, 2.780000000000001, 2.780000000000001, 2.7799999999999994, 2.7800000000000002, 2.780000000000008, 2.779999999999992, 2.7799999999999994, 2.780000000000001, 2.7799999999999976, 2.780000000000001, 2.780000000000001, 2.780000000000001, 2.779999999999994, 2.780000000000001, 2.780000000000001], [2.780000000000001, 2.780000000000001, 2.779999999999994, 2.780000000000001, 2.780000000000001, 2.780000000000001, 2.7799999999999976, 2.780000000000001, 2.7799999999999994, 2.780000000000008, 2.779999999999992, 2.7800000000000002, 2.7799999999999994, 2.780000000000001, 2.780000000000001, 2.7799999999999976, 2.780000000000001, 2.780000000000001, 2.780000000000001, 2.780000000000001], ], } yerrs = { 'alpha2.yoda' : [ [0.0, 0.17038115424135045, 1.048345178098522, 1.1884985443481642, 1.2972034244056072, 1.3867925855280612, 1.4613551187816318, 1.5225574925942036, 1.571224400973121, 1.6474678771659446, 1.646851317340275, 1.5706840813847152, 1.5230061415365381, 1.4615579790419313, 1.387689876900322, 1.2967536095638916, 1.188485071499758, 1.0484352750931885, 0.17045069452184136, 0.0], [0.0, 0.17038115424135045, 1.048345178098522, 1.1884985443481642, 1.2972034244056072, 1.3867925855280612, 1.4613551187816318, 1.5225574925942036, 1.571224400973121, 1.6474678771659446, 1.646851317340275, 1.5706840813847152, 1.5230061415365381, 1.4615579790419313, 1.387689876900322, 1.2967536095638916, 1.188485071499758, 1.0484352750931885, 0.17045069452184136, 0.0], ], '_alpha2.yoda' : [ [0.0, 0.001037268, 0.002575138, 0.002741204, 0.002863378, 0.002962299, 0.003040484, 0.00310277, 0.003152528, 0.00322746, 0.003227796, 0.003152931, 0.003102763, 0.003040995, 0.00296243, 0.002864135, 0.002741937, 0.002575144, 0.001037525, 0.0], [0.0, 0.001037268, 0.002575138, 0.002741204, 0.002863378, 0.002962299, 0.003040484, 0.00310277, 0.003152528, 0.00322746, 0.003227796, 0.003152931, 0.003102763, 0.003040995, 0.00296243, 0.002864135, 0.002741937, 0.002575144, 0.001037525, 0.0], ], } variation_yvals = { } # lists for ratio plot ratio0_yvals = { 'alpha2.yoda' : [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], '_alpha2.yoda' : [1.0, 0.9985094431874153, 1.000144893115082, 0.9996549601020124, 0.9993442845786366, 1.0004900527568186, 1.0002195778533176, 0.999749765134006, 1.0001046039717467, 0.9997015525798376, 1.000282697606157, 1.0007037905885632, 0.999451410229667, 1.0004164634697432, 0.9999289130908426, 1.0002206061029475, 1.0002012329573073, 1.0000641762091025, 0.99859329384831, 1.0], } ratio0_yerrs = { 'alpha2.yoda' : [ [1.0, 0.08452109706407421, 0.08451613880652223, 0.08451610060733698, 0.08451605094849829, 0.08451620959329892, 0.08451602980350863, 0.08451601290713458, 0.08451602784122061, 0.08451601155778059, 0.08451588578981928, 0.08451599050513131, 0.08451610989344706, 0.08451600820955234, 0.08451599609431452, 0.08451608892906866, 0.08451611538560172, 0.08451617206714149, 0.08452082966187761, 1.0], [1.0, 0.08452109706407421, 0.08451613880652223, 0.08451610060733698, 0.08451605094849829, 0.08451620959329892, 0.08451602980350863, 0.08451601290713458, 0.08451602784122061, 0.08451601155778059, 0.08451588578981928, 0.08451599050513131, 0.08451610989344706, 0.08451600820955234, 0.08451599609431452, 0.08451608892906866, 0.08451611538560172, 0.08451617206714149, 0.08452082966187761, 1.0], ], '_alpha2.yoda' : [ [1.0, 0.0005145582544021815, 0.00020760406515028245, 0.0001949315580998864, 0.00018655624582836485, 0.00018053332976732575, 0.00017584338882347306, 0.00017223241200636961, 0.0001695742148945824, 0.00016557047966938844, 0.00016564946405083947, 0.0001696541587308961, 0.00017218148471598288, 0.00017584848638962821, 0.00018042411815306805, 0.00018667037946111178, 0.0001949859274038831, 0.00020758679011665486, 0.0005144741360012631, 1.0], [1.0, 0.0005145582544021815, 0.00020760406515028245, 0.0001949315580998864, 0.00018655624582836485, 0.00018053332976732575, 0.00017584338882347306, 0.00017223241200636961, 0.0001695742148945824, 0.00016557047966938844, 0.00016564946405083947, 0.0001696541587308961, 0.00017218148471598288, 0.00017584848638962821, 0.00018042411815306805, 0.00018667037946111178, 0.0001949859274038831, 0.00020758679011665486, 0.0005144741360012631, 1.0], ], } ratio0_variation_vals = { } ratio_band_edges = { }