Permalink
Browse files

Move some refs; working on zero sum plots

  • Loading branch information...
1 parent b365c3d commit bff7b41d83470fb37d3d7e9417428c80f6d988ec @williamstein committed Jan 16, 2013
Showing with 65 additions and 2 deletions.
  1. +27 −0 explicit.pyx
  2. +38 −2 go2.sage
  3. BIN {ref → refs}/MazurLtrMay08.PDF
View
@@ -321,3 +321,30 @@ def mean_zero_sum_plot(list zeros, int n, double Xmax):
logX += delta
return v
+
+def zero_sum_plot(list zeros, int n, double Xmax):
+ """
+ Plot this function on a log scale up to X at n sample points:
+
+ (2/log(X)) * sum sin(gamma*log(X))/gamma,
+
+ where gamma runs over positive imaginary parts of the first few
+ zeros of an elliptic curve L-function.
+
+ OUTPUT: list of pairs (x,y), which are points on the plot.
+ """
+ cdef list v = []
+ zeros = [float(x) for x in zeros if x>0]
+
+ # start at X=2
+ cdef double s, gamma, logX=log(2), logXmax = log(Xmax)
+ cdef double delta = logXmax / n
+
+ while logX <= logXmax:
+ s = 0
+ for gamma in zeros:
+ s += sin(gamma*logX)/gamma
+ v.append((logX, 2*s/logX))
+ logX += delta
+
+ return v
View
@@ -57,7 +57,7 @@ def lseries_data(curves=list1+list2, rng="1e5"):
for input, output in f(curves):
print input, output
-def zero_sum_plots(curves=list1+list2, num_zeros=100000, Xmax=1e9, num_points=10000):
+def zero_sum_mean_plots(curves=list1+list2, num_zeros=100000, Xmax=1e9, num_points=10000):
@parallel(ncpus)
def f(lbl):
path = "plots/mean_zero_sums/%s/"%num_zeros
@@ -73,7 +73,7 @@ def zero_sum_plots(curves=list1+list2, num_zeros=100000, Xmax=1e9, num_points=10
for input, output in f(curves):
print input, output
-def zero_sum_animations(curves=list1+list2, num_zeros=[10,20,..,500], Xmax=1e9, num_points=10000):
+def zero_sum_mean_animations(curves=list1+list2, num_zeros=[10,20,..,500], Xmax=1e9, num_points=10000):
@parallel(ncpus)
def f(lbl):
path = "plots/mean_zero_sums/animations/%s-%s"%(Xmax, num_points)
@@ -92,3 +92,39 @@ def zero_sum_animations(curves=list1+list2, num_zeros=[10,20,..,500], Xmax=1e9,
for input, output in f(curves):
print input, output
+
+def zero_sum_plots(curves=list1+list2, num_zeros=100000, Xmax=1e9, num_points=10000):
+ @parallel(ncpus)
+ def f(lbl):
+ path = "plots/zero_sums/%s/"%num_zeros
+ if not os.path.exists(path):
+ os.makedirs(path)
+ fname = "%s/%s-%s-%s-%s.svg"%(path, lbl, num_zeros, Xmax, num_points)
+ if os.path.exists(fname):
+ return "already done"
+ zeros = load("data/%s-zeros-%s.sobj"%(lbl, num_zeros))
+ v = zero_sum_plot(zeros, num_points, Xmax)
+ line(v).save(fname)
+
+ for input, output in f(curves):
+ print input, output
+
+def zero_sum_animations(curves=list1+list2, num_zeros=[10,20,..,500], Xmax=1e9, num_points=10000):
+ @parallel(ncpus)
+ def f(lbl):
+ path = "plots/zero_sums/animations/%s-%s"%(Xmax, num_points)
+ if not os.path.exists(path):
+ os.makedirs(path)
+ fname = "%s/%s.gif"%(path, lbl)
+ if os.path.exists(fname):
+ return "already done"
+ zeros = load("data/%s-zeros-100000.sobj"%lbl)
+ frames = [line(zero_sum_plot(zeros[:n], num_points, Xmax)) for n in num_zeros]
+ ymax = max([f.ymax() for f in frames])
+ ymin = min([f.ymin() for f in frames])
+ A = animate(frames, ymax=ymax, ymin=ymin)
+ A.save(fname)
+
+ for input, output in f(curves):
+ print input, output
+
File renamed without changes.

0 comments on commit bff7b41

Please sign in to comment.