import numpy as np from numpy import nan add_legend_handle = [ 'alpha0.yoda', '_alpha0.yoda' ] xpoints = { 'alpha0.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], '_alpha0.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 = { 'alpha0.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], '_alpha0.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['alpha0.yoda'][i] - xedges['alpha0.yoda'][i]) for i in range(len(xpoints['alpha0.yoda']))], [abs(xedges['alpha0.yoda'][i+1] - xpoints['alpha0.yoda'][i]) for i in range(len(xpoints['alpha0.yoda']))] ] yvals = { 'alpha0.yoda' : [0.0, 2.1761438848920855, 12.44853417266188, 13.706372302158268, 14.772061151079141, 15.643983812949633, 16.360224820143888, 16.9120917266187, 17.361708633093524, 18.408111510791347, 18.392985611510817, 17.352938848920864, 16.91131834532374, 16.34728057553957, 15.640991007194238, 14.750971223021587, 13.709239208633088, 12.449007194244617, 2.175494604316546, 0.0], '_alpha0.yoda' : [0.0, 2.176809, 12.4488, 13.70037, 14.76032, 15.64289, 16.35417, 16.91922, 17.34917, 18.40849, 18.40492, 17.3513, 16.91846, 16.35848, 15.64216, 14.75822, 13.70963, 12.44887, 2.176339, 0.0], } xerrs = { 'alpha0.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], ], '_alpha0.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 = { 'alpha0.yoda' : [ [0.0, 0.18392871096107163, 1.0521032390452194, 1.158412314604251, 1.2484770236690266, 1.3221681645498429, 1.3827011305924313, 1.429341566165516, 1.4673435244644821, 1.5557785792758392, 1.5544980780378832, 1.4666022800382048, 1.4292774042672565, 1.3816059302244417, 1.3219146720519916, 1.246695985343517, 1.1586534185955546, 1.0521413636961308, 0.1838726866565482, 0.0], [0.0, 0.18392871096107163, 1.0521032390452194, 1.158412314604251, 1.2484770236690266, 1.3221681645498429, 1.3827011305924313, 1.429341566165516, 1.4673435244644821, 1.5557785792758392, 1.5544980780378832, 1.4666022800382048, 1.4292774042672565, 1.3816059302244417, 1.3219146720519916, 1.246695985343517, 1.1586534185955546, 1.0521413636961308, 0.1838726866565482, 0.0], ], '_alpha0.yoda' : [ [0.0, 0.001054739, 0.00252231, 0.002646067, 0.002746519, 0.002827439, 0.002891006, 0.002940525, 0.002977653, 0.003067213, 0.003066915, 0.002977836, 0.002940459, 0.002891387, 0.002827373, 0.002746324, 0.002646962, 0.002522317, 0.001054625, 0.0], [0.0, 0.001054739, 0.00252231, 0.002646067, 0.002746519, 0.002827439, 0.002891006, 0.002940525, 0.002977653, 0.003067213, 0.003066915, 0.002977836, 0.002940459, 0.002891387, 0.002827373, 0.002746324, 0.002646962, 0.002522317, 0.001054625, 0.0], ], } variation_yvals = { } # lists for ratio plot ratio0_yvals = { 'alpha0.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], '_alpha0.yoda' : [1.0, 1.0003056393065421, 1.0000213541075949, 0.9995620794455348, 0.9992051785489472, 0.99993008092039, 0.9996299060550542, 1.0004214897539894, 0.9992777995899768, 1.0000205610015145, 1.0006488554246307, 0.99990555784613, 1.0004223002920547, 1.0006850940380376, 1.000074739049797, 1.0004914101498008, 1.000028505693202, 0.9999889795031461, 1.0003881396358227, 1.0], } ratio0_yerrs = { 'alpha0.yoda' : [ [1.0, 0.08452047322697719, 0.08451623496007542, 0.08451633218965184, 0.08451610177485772, 0.08451607853591556, 0.0845160225970703, 0.08451595398550323, 0.08451607819679378, 0.08451592540406976, 0.08451581004146697, 0.08451607493156175, 0.08451602501247192, 0.08451594892741598, 0.08451604322539173, 0.08451619669610771, 0.0845162449179469, 0.0845160860845637, 0.08451994608109528, 1.0], [1.0, 0.08452047322697719, 0.08451623496007542, 0.08451633218965184, 0.08451610177485772, 0.08451607853591556, 0.0845160225970703, 0.08451595398550323, 0.08451607819679378, 0.08451592540406976, 0.08451581004146697, 0.08451607493156175, 0.08451602501247192, 0.08451594892741598, 0.08451604322539173, 0.08451619669610771, 0.0845162449179469, 0.0845160860845637, 0.08451994608109528, 1.0], ], '_alpha0.yoda' : [ [1.0, 0.0004846825650282331, 0.00020261903650786638, 0.00019305378123891603, 0.00018592659290469826, 0.0001807365076445252, 0.00017670942983866487, 0.00017387115961367306, 0.00017150691000102558, 0.00016662290415841486, 0.00016674372854837897, 0.0001716041314918357, 0.00017387520830468463, 0.00017687266005126143, 0.00018076687076282573, 0.00018617919854076181, 0.00019307869384415838, 0.000202611899940592, 0.0004847748176012237, 1.0], [1.0, 0.0004846825650282331, 0.00020261903650786638, 0.00019305378123891603, 0.00018592659290469826, 0.0001807365076445252, 0.00017670942983866487, 0.00017387115961367306, 0.00017150691000102558, 0.00016662290415841486, 0.00016674372854837897, 0.0001716041314918357, 0.00017387520830468463, 0.00017687266005126143, 0.00018076687076282573, 0.00018617919854076181, 0.00019307869384415838, 0.000202611899940592, 0.0004847748176012237, 1.0], ], } ratio0_variation_vals = { } ratio_band_edges = { }