CoCalc Shared Filescode / bounded.sagewsOpen in CoCalc with one click!
Authors: William A. Stein, Andrew Sutherland
%attach compute_lambda.sage
Compiling ./modular_symbol_map.pyx...
t = get_drew_data('11a', 3) len(t)
174257
t.plot_histogram(bins=500)
t.clip_remove(min=-.5, max=.5).plot_histogram(bins=500)
def bmeasure(t, eps): bins = int(10*(t.max() - t.min())/eps) if bins > len(t)/5: raise ValueError("not enough data") counts, endpoints = t.histogram(bins) m = 0 for i, [a,b] in enumerate(endpoints): if a >= -eps and b <= eps: m += counts[i] return m/float(len(t)) / (2*eps)
bmeasure(t, 0.015)
0.686342585950636
line([(eps, bmeasure(t, eps)) for eps in [0.015,0.016,..,1]])
t11_5 = get_drew_data('11a', 5) line([(eps, bmeasure(t11_5, eps)) for eps in [0.04,0.041,..,1]])
t11a3_3_big = drew_data('alpha_11a_3_12000000_13000000.txt') start = 0.06; g = line([(eps, bmeasure(t11a3_3_big, eps)) for eps in [start, start+start/10,..,1]]) show(g, xmin=0, xmax=1, frame=True, gridlines=True) t11a3_3_big.clip_remove(min=-.5, max=.5).plot_histogram(bins=500)
def g(name, start): t = drew_data(name) show(line([(eps, bmeasure(t, eps)) for eps in [start, start+start/10,..,1]]))
g('alpha_11a_3_12000000_13000000.txt', start=0.1)
g(, 0.1)
Error in lines 1-1 Traceback (most recent call last): File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 995, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "", line 3, in g TypeError: drew_data() takes exactly 1 argument (2 given)