From 1e50408087e2630fc6bce47a5c56dafe1e6ce0d5 Mon Sep 17 00:00:00 2001 From: John Cremona Date: Thu, 13 Oct 2022 14:13:48 +0100 Subject: [PATCH] script updates --- scripts/ec_utils.py | 3 +++ scripts/ecdb.py | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/ec_utils.py b/scripts/ec_utils.py index 899c8e4..e5414bd 100644 --- a/scripts/ec_utils.py +++ b/scripts/ec_utils.py @@ -146,6 +146,9 @@ def map_points(maps, Plist, verbose=0): break for j in range(1, ncurves): if (maps[i][j] != 0) and Qlists[j] == []: + if verbose>1: + print("Mapping points from curve {} to curve {} via {}".format(i,j,maps[i][j])) + print("points to be mapped: {}".format(Qlists[i])) Qlists[j] = [maps[i][j](P) for P in Qlists[i]] nfill += 1 # now we saturate the points just computed at all primes up to maxp diff --git a/scripts/ecdb.py b/scripts/ecdb.py index e1e5924..b1fcdaf 100644 --- a/scripts/ecdb.py +++ b/scripts/ecdb.py @@ -89,12 +89,17 @@ def make_datafiles(infilename, mode='w', verbose=False, prefix="t"): reglist = [1 for F in Elist] else: Plist = get_gens(E, r, verbose) - genlist = map_points(maps, Plist) + # Saturate these points prec0 = mwrank_get_precision() mwrank_set_precision(mwrank_saturation_precision) if verbose: - print("genlist (before saturation) = {}".format(genlist)) - genlist = [Elist[i].saturation(genlist[i], max_prime=mwrank_saturation_maxprime)[0] for i in range(ncurves)] + print("gens (before saturation) = {}".format(Plist)) + Plist, ind, _ = Elist[0].saturation(Plist, max_prime=-1) + if verbose: + print("gens (after saturation) = {}".format(Plist)) + if ind>1: + print("index gain {}".format(ind)) + genlist = map_points(maps, Plist) if verbose: print("genlist (before reduction) = {}".format(genlist)) genlist = [Elist[i].lll_reduce(genlist[i])[0] for i in range(ncurves)]