Skip to content

Commit

Permalink
Merge pull request #5927 from edgarcosta/underlyingdata
Browse files Browse the repository at this point in the history
Fixing Underlying Data
  • Loading branch information
edgarcosta authored Mar 12, 2024
2 parents 8b76b85 + 99e4f70 commit 638a663
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions lmfdb/modular_curves/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1214,9 +1214,18 @@ def modcurve_data(label):
bread = get_bread([(label, url_for_modcurve_label(label)), ("Data", " ")])
if not LABEL_RE.fullmatch(label):
return abort(404)
if label == coarse_label:
labels = [label]
else:
labels = [label, coarse_label]
tables = ["gps_gl2zhat_fine" for lab in labels]
return datapage(labels, tables, title=f"Modular curve data - {label}", bread=bread)

label_tables_cols = [(label, "gps_gl2zhat_fine", "label")]
if label != coarse_label:
label_tables_cols.append((coarse_label, "gps_gl2zhat_fine", "label"))
# modcurve_models
label_tables_cols.append((coarse_label, "modcurve_models", "modcurve"))
# modcurve_modelmaps
label_tables_cols.append((coarse_label, "modcurve_modelmaps", "domain_label"))
# modcurve_points
label_tables_cols.append((coarse_label, "modcurve_points", "curve_label"))

print(label_tables_cols)
labels, tables, label_cols = map(list, zip(*label_tables_cols)) # transpose

return datapage(labels, tables, title=f"Modular curve data - {label}", bread=bread, label_cols=label_cols)

0 comments on commit 638a663

Please sign in to comment.