Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lmfdb/artin_representations/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,11 @@ def artin_postprocess(res, info, query):
cache = knowl_cache(gp_labels)
return [ArtinRepresentation(data=x, knowl_cache=cache) for x in res]


class ArtinDownload(Downloader):
table = db.artin_reps
title = "Artin representations"

def modify_query(self, info, query):
query['Hide'] = 0

Expand Down
2 changes: 2 additions & 0 deletions lmfdb/elliptic_curves/elliptic_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,11 @@ def make_modcurve_link(label):
ListCol("mwgens", "ec.mordell_weil_group", "MW-generators", mathmode=True, default=False),
])


class ECDownloader(Downloader):
table = db.ec_curvedata
title = "Elliptic curves"

def modify_query(self, info, query):
if info.get("optimal") == "on":
query["__one_per__"] = "lmfdb_iso"
Expand Down
1 change: 1 addition & 0 deletions lmfdb/elliptic_curves/test_browse_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def test_jump(self):
self.check_args("/EllipticCurve/Q/?jump=4x%5E3+%2B+4x+%2B+1", '91a1')
#
# Various search combinations

def test_search(self):
r"""
Check that various search combinations work.
Expand Down
1 change: 1 addition & 0 deletions lmfdb/galois_groups/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class GG_download(Downloader):
}
),
}

def modify_query(self, info, query):
_set_show_subs(info)

Expand Down
6 changes: 5 additions & 1 deletion lmfdb/groups/abstract/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3038,6 +3038,7 @@ class SubgroupSearchArray(SearchArray):
sorts = [("", "ambient order", ['ambient_order', 'ambient_counter', 'quotient_order', 'counter']),
("sub_ord", "subgroup order", ['subgroup_order', 'ambient_order', 'ambient_counter', 'counter']),
("sub_ind", "subgroup index", ['quotient_order', 'ambient_order', 'ambient_counter', 'counter'])]

def __init__(self):
abelian = YesNoBox(name="abelian", label="Abelian", knowl="group.abelian")
cyclic = YesNoBox(name="cyclic", label="Cyclic", knowl="group.cyclic")
Expand Down Expand Up @@ -3142,6 +3143,7 @@ def search_types(self, info):
class ComplexCharSearchArray(SearchArray):
sorts = [("", "group", ['group_order', 'group_counter', 'dim', 'label']),
("dim", "degree", ['dim', 'group_order', 'group_counter', 'label'])]

def __init__(self):
faithful = YesNoBox(name="faithful", label="Faithful", knowl="group.representation.faithful")
dim = TextBox(
Expand Down Expand Up @@ -3216,6 +3218,7 @@ def __init__(self):
[center_order, center_index] #, nt]

]

def search_types(self, info):
# Note: since we don't access this from the browse page, info will never be None
return [("ComplexCharacters", "Search again"), ("RandomComplexCharacter", "Random")]
Expand Down Expand Up @@ -3251,8 +3254,9 @@ def __init__(self):
)

self.refine_array = [
[group,order,size]
[group, order, size]
]

def search_types(self, info):
# Note: since we don't access this from the browse page, info will never be None
return [("ConjugacyClasses", "Search again")]
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/groups/abstract/web_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -1736,7 +1736,7 @@ def nonsplit_products(self):
nonsplit = []
subs = defaultdict(list)
for sub in self.subgroups.values():
if sub.normal and (sub.split == False):
if sub.normal and (sub.split is False):
pair = (sub.subgroup, sub.quotient)
if pair not in subs:
nonsplit.append(sub)
Expand Down
8 changes: 5 additions & 3 deletions lmfdb/lfunctions/Lfunctionutilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ def Lfactor_to_label_and_link_if_exists(poly):
return label
return '<a href="%s">%s</a>' % (url_for_label(label), label)


def display_isogeny_label(L):
g = L.degree // 2
bad_primes = [factor[0] for factor in L.bad_lfactors]
Expand All @@ -230,12 +231,13 @@ def display_isogeny_label(L):
if g <= 3:
return True
elif g == 4:
return any(not(p in bad_primes) for p in [2,3,5])
return any(p not in bad_primes for p in [2, 3, 5])
elif g == 5:
return any(not(p in bad_primes) for p in [2,3])
else: # g == 6
return any(p not in bad_primes for p in [2, 3])
else: # g == 6
return not (2 in bad_primes)


def lfuncDShtml(L, fmt):
""" Returns the HTML for displaying the Dirichlet series of the L-function L.
fmt could be any of the values: "analytic", "langlands", "abstract"
Expand Down
6 changes: 4 additions & 2 deletions lmfdb/lfunctions/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,14 @@ def common_parse(info, query):

class LfuncDownload(Downloader):
table = db.lfunc_search

def postprocess(self, rec, info, query):
rec['mus'] = list(zip(rec['mu_real'], rec['mu_imag']))
rec['nus'] = [(0.5*r, i) for r, i in zip(rec['nu_real_doubled'], rec['nu_imag'])]
rec['nus'] = [(0.5 * r, i)
for r, i in zip(rec['nu_real_doubled'], rec['nu_imag'])]
if info['search_array'].force_rational:
# root_angle is either 0 or 0.5
rec['root_number'] = 1 - int(4*rec['root_angle'])
rec['root_number'] = 1 - int(4 * rec['root_angle'])
return rec

@search_wrap(table=db.lfunc_search,
Expand Down
3 changes: 2 additions & 1 deletion lmfdb/local_fields/family.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ def __init__(self, label=None, base=None, slopes=[], means=[], rams=[], field_ca
assert p.is_prime()
self.pw = p**w
_, self.etame = self.e.val_unit(p)

@lazy_attribute
def scaled_rams(self):
return [r / (self.etame * self.p**i) for (i, r) in enumerate(self.rams, 1)]
return [r / (self.etame * self.p**i) for i, r in enumerate(self.rams, 1)]

@lazy_attribute
def dots(self):
Expand Down
5 changes: 3 additions & 2 deletions lmfdb/local_fields/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ def local_algebra_data(labels):
l = str(f['new_label'])
else:
l = str(f['old_label'])
ans += '<tr><td><a href="%s">%s</a><td>'%(url_for_label(l),l)
ans += '<tr><td><a href="%s">%s</a><td>' % (url_for_label(l), l)
ans += format_coeffs(f['coeffs'])
ans += '<td>%d<td>%d<td>%d<td>' % (f['e'],f['f'],f['c'])
ans += '<td>%d<td>%d<td>%d<td>' % (f['e'], f['f'], f['c'])
ans += transitive_group_display_knowl(f['galois_label'])
if f.get('slopes') and f.get('t') and f.get('u'):
ans += '<td>$' + show_slope_content(f['slopes'],f['t'],f['u'])+'$'
Expand Down Expand Up @@ -1527,6 +1527,7 @@ class FamilySearchArray(EmbeddedSearchArray):
("s", "top slope", ['top_slope', 'ctr_subfamily', 'ctr']),
("ind_of_insep", "Index of insep", ['ind_of_insep', 'ctr_subfamily', 'ctr']),
]

def __init__(self, fam):
degree, qp, c, e, f, topslope, slopes, visible, ind_insep, associated_inertia, jump_set, gal, aut, u, t, inertia, wild, family, packet, hidden = common_boxes()
if fam.packet_count is None:
Expand Down
1 change: 1 addition & 0 deletions lmfdb/modular_curves/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,7 @@ class RatPointSearchArray(SearchArray):
("conductor", "minimal conductor norm", ["conductor_norm", "j_height", "jinv", "degree", "curve_level", "curve_genus", "curve_index", "curve_label"]),
("residue_field", "residue field", ["degree", "residue_field", "curve_level", "curve_genus", "curve_index", "curve_label", "j_height", "jinv"]),
("cm", "CM discriminant", ["cm", "degree", "curve_level", "curve_genus", "curve_index", "curve_label", "j_height", "jinv"])]

def __init__(self):
curve = TextBox(
name="curve",
Expand Down
2 changes: 2 additions & 0 deletions lmfdb/utils/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,13 @@ def review_cols(self, user_shown, statuses):
cols.insert(0, StatusBox())
return cols


class Uploader():
# Override in subclass
title = None
bread = None
learnmore = None

def __init__(self, sections):
self.sections = sections
self.section_lookup = {section.name: section for section in sections}
Expand Down
Loading