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.81395, 1.1051990853658535, 1.242142073170732, 1.3700628048780483, 1.521460060975611, 1.7062533536585358, 1.9422679878048772, 2.250635670731709, 2.6892118902439015, 3.313591463414633, 4.3304573170731695, 6.269734756097559, 11.641984756097582, 399.1451219512193, 0.0, 0.0, 0.0], '_alpha0.yoda' : [0.0, 0.0, 0.0, 0.8104493, 1.106763, 1.24268, 1.372942, 1.522255, 1.705136, 1.941648, 2.250812, 2.681248, 3.314392, 4.330013, 6.27365, 11.64431, 399.1474, 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.0688166150147048, 0.0934221264428386, 0.10500099146864839, 0.11581160982755863, 0.12860643668268149, 0.14422310798914564, 0.16416922837218562, 0.19023337310605518, 0.22729506085848036, 0.28006886462472613, 0.3660117798545102, 0.5299085707900821, 0.9839444854493401, 33.73391226502408, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0688166150147048, 0.0934221264428386, 0.10500099146864839, 0.11581160982755863, 0.12860643668268149, 0.14422310798914564, 0.16416922837218562, 0.19023337310605518, 0.22729506085848036, 0.28006886462472613, 0.3660117798545102, 0.5299085707900821, 0.9839444854493401, 33.73391226502408, 0.0, 0.0, 0.0], ], '_alpha0.yoda' : [ [0.0, 0.0, 0.0, 0.0008438789, 0.0009861536, 0.001044953, 0.001098357, 0.001156541, 0.001224044, 0.001306179, 0.001406329, 0.00153492, 0.001706551, 0.001950572, 0.002347888, 0.003198704, 0.01872767, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0008438789, 0.0009861536, 0.001044953, 0.001098357, 0.001156541, 0.001224044, 0.001306179, 0.001406329, 0.00153492, 0.001706551, 0.001950572, 0.002347888, 0.003198704, 0.01872767, 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, 0.9956991215676639, 1.001415052414406, 1.0004330638506551, 1.002101505939509, 1.0005224843193579, 0.9993451420000787, 0.9996807918326565, 1.0000783464292262, 0.9970385783757713, 1.0002415918178826, 0.9998973971937288, 1.0006244672310312, 1.0001997291656992, 1.0000057073196074, 1.0, 1.0, 1.0], } ratio0_yerrs = { 'alpha0.yoda' : [ [1.0, 1.0, 1.0, 0.08454648936016317, 0.08452968128535242, 0.08453219139467634, 0.0845301466583988, 0.08452830276741852, 0.08452619751920401, 0.0845244988863392, 0.08452428599614616, 0.08452106793186369, 0.0845212415944955, 0.08452035271459205, 0.08451849901221509, 0.08451690206294003, 0.08451540657722681, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.08454648936016317, 0.08452968128535242, 0.08453219139467634, 0.0845301466583988, 0.08452830276741852, 0.08452619751920401, 0.0845244988863392, 0.08452428599614616, 0.08452106793186369, 0.0845212415944955, 0.08452035271459205, 0.08451849901221509, 0.08451690206294003, 0.08451540657722681, 1.0, 1.0, 1.0], ], '_alpha0.yoda' : [ [1.0, 1.0, 1.0, 0.0010367699490140673, 0.0008922859356814922, 0.0008412507897205503, 0.0008016836863896663, 0.0007601520602902894, 0.0007173870148740889, 0.0006725019452522741, 0.0006248585758630519, 0.0005707694531503758, 0.000515015510765896, 0.00045043094924633386, 0.0003744796377098071, 0.00027475590004742565, 4.691945102184854e-05, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 0.0010367699490140673, 0.0008922859356814922, 0.0008412507897205503, 0.0008016836863896663, 0.0007601520602902894, 0.0007173870148740889, 0.0006725019452522741, 0.0006248585758630519, 0.0005707694531503758, 0.000515015510765896, 0.00045043094924633386, 0.0003744796377098071, 0.00027475590004742565, 4.691945102184854e-05, 1.0, 1.0, 1.0], ], } ratio0_variation_vals = { } ratio_band_edges = { }