import numpy as np from numpy import nan add_legend_handle = [ 'alpha0.yoda', '_alpha0.yoda' ] xpoints = { 'alpha0.yoda' : [-8.36, -5.08, -1.7999999999999998, 1.48, 4.76, 8.04, 11.32, 14.6, 17.88, 21.16, 24.439999999999998, 27.72, 31.0, 34.28, 37.56, 40.84, 44.12, 47.4, 50.68, 53.96], '_alpha0.yoda' : [-8.36, -5.08, -1.7999999999999998, 1.48, 4.76, 8.04, 11.32, 14.6, 17.88, 21.16, 24.439999999999998, 27.72, 31.0, 34.28, 37.56, 40.84, 44.12, 47.4, 50.68, 53.96], } xedges = { 'alpha0.yoda' : [-10.0, -6.72, -3.44, -0.15999999999999992, 3.12, 6.4, 9.68, 12.96, 16.24, 19.52, 22.8, 26.08, 29.36, 32.64, 35.92, 39.2, 42.48, 45.76, 49.04, 52.32, 55.6], '_alpha0.yoda' : [-10.0, -6.72, -3.44, -0.15999999999999992, 3.12, 6.4, 9.68, 12.96, 16.24, 19.52, 22.8, 26.08, 29.36, 32.64, 35.92, 39.2, 42.48, 45.76, 49.04, 52.32, 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, 0.0, 0.0, 0.5669015243902439, 0.9834091463414634, 1.2112606707317075, 1.4258899390243898, 1.667889329268294, 1.9405435975609748, 2.2750021341463404, 2.7171228658536606, 3.2973658536585355, 4.136329268292681, 5.475149390243901, 7.965094512195119, 14.257240853658564, 571.6301829268291, 0.0, 0.0, 0.0], '_alpha0.yoda' : [0.0, 0.0, 0.0, 0.5674469, 0.9830645, 1.212305, 1.428463, 1.664062, 1.939442, 2.275348, 2.70448, 3.286974, 4.133377, 5.474962, 7.961385, 14.25914, 571.6609, 0.0, 0.0, 0.0], } xerrs = { 'alpha0.yoda' : [ [1.6399999999999997, 1.6400000000000001, 1.6400000000000001, 1.64, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6399999999999988, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6399999999999935, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006], [1.6400000000000006, 1.6399999999999997, 1.64, 1.6400000000000001, 1.6399999999999997, 1.6399999999999988, 1.6400000000000006, 1.6399999999999988, 1.6400000000000006, 1.6400000000000006, 1.639999999999997, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006], ], '_alpha0.yoda' : [ [1.6399999999999997, 1.6400000000000001, 1.6400000000000001, 1.64, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6399999999999988, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6399999999999935, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006], [1.6400000000000006, 1.6399999999999997, 1.64, 1.6400000000000001, 1.6399999999999997, 1.6399999999999988, 1.6400000000000006, 1.6399999999999988, 1.6400000000000006, 1.6400000000000006, 1.639999999999997, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006, 1.6400000000000006], ], } yerrs = { 'alpha0.yoda' : [ [0.0, 0.0, 0.0, 0.047938522591388776, 0.08313915943732694, 0.10239223851750591, 0.12053264107265724, 0.14099777496862687, 0.1640264586414148, 0.19229562708113526, 0.22966388743067134, 0.2787019299617889, 0.3496101870188293, 0.4627613937282176, 0.673198277869597, 1.204975093603451, 48.31158012877413, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.047938522591388776, 0.08313915943732694, 0.10239223851750591, 0.12053264107265724, 0.14099777496862687, 0.1640264586414148, 0.19229562708113526, 0.22966388743067134, 0.2787019299617889, 0.3496101870188293, 0.4627613937282176, 0.673198277869597, 1.204975093603451, 48.31158012877413, 0.0, 0.0, 0.0], ], '_alpha0.yoda' : [ [0.0, 0.0, 0.0, 0.0008385254, 0.001103685, 0.001225637, 0.001330426, 0.001435959, 0.001550229, 0.001679116, 0.001830622, 0.002018153, 0.00226312, 0.002604625, 0.003140857, 0.004203396, 0.02661478, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0008385254, 0.001103685, 0.001225637, 0.001330426, 0.001435959, 0.001550229, 0.001679116, 0.001830622, 0.002018153, 0.00226312, 0.002604625, 0.003140857, 0.004203396, 0.02661478, 0.0, 0.0, 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.0, 1.0, 1.0009620288291563, 0.9996495392149386, 1.0008621837508036, 1.0018045298625018, 0.9977052858357377, 0.99943232527094, 1.0001520288040475, 0.9953469657141587, 0.9968484377773835, 0.999286258878056, 0.9999657744053093, 0.9995342789480477, 1.000133205741625, 1.0000537359189356, 1.0, 1.0, 1.0], } ratio0_yerrs = { 'alpha0.yoda' : [ [1.0, 1.0, 1.0, 0.08456234553779192, 0.08454177973290786, 0.08453361113066771, 0.08453151801823292, 0.08453664910158208, 0.08452603633722836, 0.08452547107314747, 0.08452466037398569, 0.08452259844098281, 0.0845218463865511, 0.08452032277928456, 0.08451855490714932, 0.08451671020864049, 0.0845154464752226, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.08456234553779192, 0.08454177973290786, 0.08453361113066771, 0.08453151801823292, 0.08453664910158208, 0.08452603633722836, 0.08452547107314747, 0.08452466037398569, 0.08452259844098281, 0.0845218463865511, 0.08452032277928456, 0.08451855490714932, 0.08451671020864049, 0.0845154464752226, 1.0, 1.0, 1.0], ], '_alpha0.yoda' : [ [1.0, 1.0, 1.0, 0.0014791376701657546, 0.0011223049979817597, 0.0010118688979306228, 0.0009330495738754512, 0.0008609438137181188, 0.0007988632679773068, 0.0007380722746574752, 0.0006737354512030352, 0.0006120500695307417, 0.0005471324580826056, 0.00047571761322917475, 0.00039432764987171556, 0.00029482534826655207, 4.655943789344447e-05, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.0014791376701657546, 0.0011223049979817597, 0.0010118688979306228, 0.0009330495738754512, 0.0008609438137181188, 0.0007988632679773068, 0.0007380722746574752, 0.0006737354512030352, 0.0006120500695307417, 0.0005471324580826056, 0.00047571761322917475, 0.00039432764987171556, 0.00029482534826655207, 4.655943789344447e-05, 1.0, 1.0, 1.0], ], } ratio0_variation_vals = { } ratio_band_edges = { }