Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix a bug; start working on gibbs.

  • Loading branch information...
commit d76c60952ee2fe9ad2ccf490381805d59675ea3b 1 parent 8724e38
@williamstein authored
Showing with 61 additions and 6 deletions.
  1. +49 −0 explicit.pyx
  2. +12 −6 go2.sage
View
49 explicit.pyx
@@ -599,3 +599,52 @@ def zeta_eps(int B, double T):
eps = Psi0X/X - 1 + zeta_oscillatory(X, 0, T) - (-log(2*PI) - log(1-1/(X*X))/2)/X
v.append((X, eps))
return v[1:]
+
+
+#################################################################
+#
+# Gibbs -- plot related to Gibbs phenom for elliptic
+# curve L-series.
+#
+#################################################################
+
+def oscillatory_gibbs(list zeros, int n, double Xmin, double Xmax):
+ """
+ Plot this function on a linear scale from Xmin to Xmax, at n sample points:
+
+ f(X) = 2 * sum sin(gamma*X)/gamma,
+
+ where the sum is over gamma that are the positive imaginary parts
+ of the first few zeros of an elliptic curve L-function (the zeros
+ in the input list "zeros").
+
+ OUTPUT: list of pairs (log(X),f(X)), which are points on the plot.
+ """
+ raise NotImplementedError
+ 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 += delta
+
+ return v
+
+
+
+
+
+
+
+
+
+
+
+
View
18 go2.sage
@@ -45,7 +45,7 @@ def aplist_data(curves=list1, rng="1e9"):
for input, output in f(curves):
print input, output
-def lseries_data(curves=list1+list2, rng="1e5"):
+def lseries_data(curves=list1+list2, rng="1e4"):
B = int(eval(rng))
@parallel(ncpus)
def f(lbl):
@@ -53,7 +53,7 @@ def lseries_data(curves=list1+list2, rng="1e5"):
zeros_sobj = 'data/%s-zeros-%s.sobj'%(lbl, B)
if not os.path.exists(zeros_sobj):
v = E.lseries().zeros(B)
- v = [int(ap) for ap in v]
+ v = [float(z) for z in v]
save(v, zeros_sobj)
for input, output in f(curves):
@@ -61,7 +61,11 @@ def lseries_data(curves=list1+list2, rng="1e5"):
def zeros(lbl, num_zeros=10000):
assert num_zeros <= 10000
- return load("data/%s-zeros-10000.sobj"%lbl)[:num_zeros]
+ file = "data/%s-zeros-%s.sobj"%(lbl,num_zeros)
+ if os.path.exists(file):
+ return load(file)
+ else:
+ return load("data/%s-zeros-10000.sobj"%lbl)[:num_zeros]
def aplist(lbl,B):
return load("data/%s-aplist-%s.sobj"%(lbl,B))
@@ -537,7 +541,8 @@ class PechaKucha:
def oscillatory(self, lbl, B=1e30):
target = "oscillatory-no_log-%s.gif"%lbl
if self.done(target): return
- z = zeros(lbl)
+ print "Plotting oscillatory plot (no log) for %s"%lbl
+ z = zeros(lbl,500)
v = [line(zero_sum_no_log_plot(z[:k], 10000, B), thickness=.4, figsize=[10,4]) for k in [5,50,..,500]]
ymax = max([g.ymax() for g in v])
ymin = min([g.ymin() for g in v])
@@ -547,7 +552,7 @@ class PechaKucha:
def bite(self, lbl, B=1e30):
target = "bite-%s.svg"%lbl
if self.done(target): return
- z = zeros(lbl)
+ z = zeros(lbl,500)
t = TimeSeries(zero_sum_distribution1(z, 100000, math.log(B)))
g = t.plot_histogram(bins=1000)
mean = t.mean(); sd = t.standard_deviation()
@@ -559,7 +564,8 @@ class PechaKucha:
def pechakucha():
m = PechaKucha()
- for lbl in ['11a', '37a', '5077a', '389a']:
+ #for lbl in ['11a', '37a', '5077a', '389a', '5002c1', '5021a1']:
+ for lbl in ['5002c1', '5021a1','431b1','443c1']:
m.data_plots(lbl)
m.oscillatory(lbl)
m.bite(lbl)
Please sign in to comment.
Something went wrong with that request. Please try again.