def render_dimension_table_page(args, bread): fams = get_smf_families() fam_list = [ c for c in fams if c.computes_dimensions() and not c.name in ["Sp4Z", "Sp4Z_2"] ] # Sp4Z and Sp4Z_2 are sub-families of Sp4Z_j info = {'family_list': fam_list, 'args': to_dict(args)} family = get_smf_family(args.get('family')) if not family: flash_error("Space %s not found in databsae", args.get('family')) elif not family.computes_dimensions(): flash_error("Dimension table not available for family %s.", args.get('family')) else: info['family'] = family if 'j' in family.latex_name: # if j is not specified (but could be) set it to zero for consistency (overrides defaults in json files) if not 'j' in info['args'] or not info['args']['j']: info['args']['j'] = '0' if not 'j' in family.latex_name and 'j' in info[ 'args'] and info['args']['j'] != '0': flash_error( "$j$ = %s should not be specified for the selected space %s", info['args']['j'], '$' + family.latex_name + '$') else: build_dimension_table(info, family, info['args']) bread.append(('dimensions', 'dimensions')) return render_template("ModularForm_GSp4_Q_dimensions.html", title='Siegel modular forms dimension tables', bread=bread, info=info)
def by_label(label): bread = [("Modular Forms", url_for('mf.modular_form_main_page')), ('Siegel modular forms', url_for('.index'))] slabel = label.split('.') family = get_smf_family (slabel[0]) if family: if len(slabel) == 1: return render_family_page(family, request.args, bread) if len(slabel) == 2: sam = sample.Samples({ 'collection': slabel[0], 'name': slabel[1]}) if len(sam) > 0: bread.append(('$'+family.latex_name+'$', url_for('.by_label',label=slabel[0]))) return render_sample_page(family, sam[0], request.args, bread) flash_error ("No siegel modular form data for %s was found in the database.", label) return redirect(url_for(".index"))
def by_label(label): bread = [("Modular Forms", url_for('mf.modular_form_main_page')), ('Siegel modular forms', url_for('.index'))] slabel = label.split('.') family = get_smf_family(slabel[0]) if family: if len(slabel) == 1: return render_family_page(family, request.args, bread) if len(slabel) == 2: sam = sample.Samples({'collection': slabel[0], 'name': slabel[1]}) if len(sam) > 0: bread.append(('$' + family.latex_name + '$', url_for('.by_label', label=slabel[0]))) return render_sample_page(family, sam[0], request.args, bread) flash_error( "No siegel modular form data for %s was found in the database.", label) return redirect(url_for(".index"))
def render_dimension_table_page(args, bread): fams = get_smf_families() fam_list = [c for c in fams if c.computes_dimensions() and not c.name in ["Sp4Z","Sp4Z_2"]] # Sp4Z and Sp4Z_2 are sub-families of Sp4Z_j info = { 'family_list': fam_list, 'args': to_dict(args) } family = get_smf_family(args.get('family')) if not family: flash_error("Space %s not found in databsae", args.get('family')) elif not family.computes_dimensions(): flash_error("Dimension table not available for family %s.", args.get('family')) else: info['family'] = family if 'j' in family.latex_name: # if j is not specified (but could be) set it to zero for consistency (overrides defaults in json files) if not 'j' in info['args'] or not info['args']['j']: info['args']['j'] = '0' if not 'j' in family.latex_name and 'j' in info['args'] and info['args']['j'] != '0': flash_error("$j$ = %s should not be specified for the selected space %s", info['args']['j'], '$'+family.latex_name+'$') else: build_dimension_table (info, family, info['args']) bread.append(('dimensions', 'dimensions')) return render_template("ModularForm_GSp4_Q_dimensions.html", title='Siegel modular forms dimension tables', bread=bread, info=info)