Skip to content

Commit

Permalink
Merge pull request #6207 from LMFDB/main
Browse files Browse the repository at this point in the history
main -> dev
  • Loading branch information
AndrewVSutherland authored Oct 16, 2024
2 parents e48ab71 + 56051e9 commit df49955
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions lmfdb/lfunctions/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1634,11 +1634,20 @@ def getLfunctionPlot(request, *args):
else:
return render_lfunction_exception(err)

# Figure out plotrange
plotrange = 30
if hasattr(pythonL, 'plotpoints'):
F = p2sage(pythonL.plotpoints)
# F[0][0] is the lowest t-coordinated that we have a value for L
# F[-1][0] is the highest t-coordinated that we have a value for L

# fix Z-plot sign so that Z(t) > 0 for t -> 0^+
for t, x in F:
if t > 0:
if x < 0:
F = [(t, -x) for t, x in F]
break

plotrange = min(plotrange, -F[0][0], F[-1][0])
# aim to display at most 25 axis crossings
# if the L-function is nonprimitive
Expand All @@ -1653,8 +1662,17 @@ def getLfunctionPlot(request, *args):
zero_range = zeros[-1]*25/len(zeros)
zero_range *= 1.2
plotrange = min(plotrange, zero_range)

for t, x in F:
if t > 0:
if t < zeros[0]:
assert x > 0
else:
break

else:
# obsolete, because lfunc_data comes from DB?
assert False # double checking my claim
L = pythonL.sageLfunction
if not hasattr(L, "hardy_z_function"):
return None
Expand All @@ -1663,6 +1681,8 @@ def getLfunctionPlot(request, *args):
plotrange = 12
F = [(i, L.hardy_z_function(i).real()) for i in srange(-1*plotrange, plotrange, plotStep)]



interpolation = spline(F)
F_interp = [(i, interpolation(i)) for i in srange(-1*plotrange, plotrange, 0.05)]
p = line(F_interp)
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/local_fields/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def render_field_webpage(args):
abelian = ' and abelian' if the_gal.is_abelian() else ''
galphrase = 'This field is'+isgal+abelian+r' over $\Q_{%d}.$' % p
if the_gal.order() == gn:
autstring = r'\Gal'
autstring = r'\Gal'
prop2 = [
('Label', label),
('Base', r'\(%s\)' % Qp),
Expand Down

0 comments on commit df49955

Please sign in to comment.